Dreamer-Toby / STEPQuant
git clone https://github.com/Dreamer-Toby/STEPQuant.git
STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization
+0
stars, 24h Β· #32,579
+~0
stars, 7 days Β· #33,054
+101
stars, 30 days Β· #4,864
95
β
total
2
forks Β· 1 open issues
Star history (as recorded here)
LanguagePython
Licenseβ
Created2026-09-29 (23d ago)
Last push6d ago
Watchers0
OwnerUser
GitHub topics
Links
- GitHub: github.com/Dreamer-Toby/STEPQuant
- Homepage: https://arxiv.org/abs/2609.38169
- Releases Β· Issues Β· Hacker News mentions
README excerpt
# STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization Welcome to the official code repository for **STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization**. Your star means a lot to us in developing this project! βββ βΆ Watch the introduction video ## π° News - [2026/10/12] π₯ STEPQuant ranked #3 on π€ Hugging Face Daily Papers! - [2026/09/30] π Our paper is available on arXiv. - [2026/09/29] π STEPQuant code is available in this repository. ## π Overview **STEPQuant** compresses the persistent recurrent states of Delta-rule models. It decides **when** errors will last and **where** they will affect the output, then spends precision accordingly. Fixed-size state per request still means growing memory under concurrency. Uniform low-bit quantization also feeds its errors into every subsequent state update. ## π§© Method - **When β lifetime-aware bit allocation:** Give more bits to state units with larger, longer-lived errors; protect a few high-risk units in FP16. - **Where β key-row-aware dual-axis fitting:** Scale key rows and value columns separately, prioritizing rows that matter most to the readout. Allocation is calibrated once; packed-state kernels and asynchronous writeback keep inference efficient. ## π Results **Seven long-generation tasks Β· BF16 weights with quantized states Β· Average acc (%)** | Model | FP32 | INT8 | INT6 | STEPQuant@6 | STEPQuant@4 | | :-- | --: | --: | --: | --: | --: | | Qwen3.8-27B | 80.60 | 71.86 | 45.04 | **80.59** | **80.51** | | Kimi-Linear-48B-A3B-Instruct | 61.52 | 56.02 | 45.70 | **61.47** | **58.52** | In the paper's serving memory accounting, **STEPQuant@6** compresses recurrent-state memory by **5.03Γ / 5.08Γ** and reduces total memory by **68.7% / 53.7%** on Qwen / Kimi, respectively. Paper-reported results. Memory accounting uses W4/AWQ weights and five prefix-state slots per request (Figure 3(c)). Full-model decode throughput uses BF16 weights, batches 32β512, and 128 prompt + 1024 decode tokens (Appendix F.5). Task evaluations use NVIDIA A800 GPUs. The 4/6-bit budgets are nominal; FP16 pivots and scales add storage. ## βοΈ Quick Start Run from the repository root. The tested stack uses **SGLang 0.5.12**, **PyTorch 2.11.0**, and **Triton 3.7.1**. You need model checkpoints, a CUDA toolkit, and four GPUs for this Qwen example. **1. Reuse environments and set `model_path` in `configs/models.json`.** [code] If the serving helper prints an `export CUDA_HOME=...` command, run it. **2. Calibrate once, then serve.** [code] **3. Evaluate.** Stop the manually launched server first; the evaluation suite starts its own. [code] For Kimi setup, the zero-shot short-task protocol (2048 output tokens, thinking disabled), and paired FP32 decode benchmarks, see the usage guide. ## π Contact If you have further questions, please open an issue or contact yaobingchen0515@gmail.com or xuhb2001@gmail.com. Discussions and potential collaborations are also welcome.