r/LocalLLaMA • u/Sad-Size2723 • 10h ago
Resources Shifter Quantization (SQ) — New Quantization Format for 2x-4x PP for Most GPUs
https://arxiv.org/abs/2611.33080TL;DR
We built new quantization formats, SQ (Shifter Quantization) and SHI (Shifter Integer), to speed up local inference with native INT8 and INT4 kernels. SQ is built around widely available INT8 kernels, so the same format can run across GPUs and handle everything from 2-bit to 8-bit quants. The quantization quality also improves because we use smaller group adjustments.
On Qwen3.8-27B
- 2-bit: Nearly 4× the prefill throughput of llama.cpp Q2_K, with lower WikiText-2 KL.
- 4-bit: About 2.5× the prefill throughput of NInfer groupwise INT, with 39.5% lower KL.
- 8-bit: 27.4% faster prefill than vLLM online FP8, with about a quarter of the KL.
Across GPUs
- Our RTX 4090 beats NInfer's RTX 5090 by 30–83% in prefill across the two SQ4 comparisons (27b and 35b).
- We hit 32,000 tok/s in prefill on one RTX 5090 with Qwen3.6-35B-A3B SQ4.
Easy to use
pip install shifter-launcher
shifter serve hif1000/Qwen3.8-27B-SQ4-GGUF --context-size 32768=======================================================================
Qwen3.8-27B results on one RTX 5090
We use 4,096-token prompts for 2-bit and 8-bit, and NInfer’s 7,680-token prompt for 4-bit.
| Shifter format | Shifter prefill (tok/s) | Baseline prefill (tok/s) | Prefill vs. baseline | Shifter WikiText-2 KL | Baseline WikiText-2 KL | Baseline / Shifter KL |
|---|---|---|---|---|---|---|
| 2-bit SHI2 | 11,662.4 | 3,090.7 (llama.cpp) | 3.77× | 0.15537 | 0.16627 (llama.cpp) | 1.07× |
| 4-bit SQ4 | 8,221.9 | 3,331.9 (NInfer) | 2.47× | 0.01970 | 0.03256 (NInfer) | 1.65× |
| 8-bit SQ8 | 9,206.3 | 7,226.8 (vLLM) | 1.27× | 0.00211 | 0.00774 (vLLM) | 3.67× |
Baseline engines/quantizations:
- llama.cpp - Bartowski Q2_K
- ninfer - NInfer Groupwise INT
- vLLM - vLLM online FP8
SQ4 across four GPUs
We use NInfer’s 7,680-token prompt for prefill and its JSONL, CSV, and SQL prompts for single-request MTP3 decode. All rates are in tok/s.
| GPU | 27B prefill | 27B decode | 35B-A3B prefill | 35B-A3B decode |
|---|---|---|---|---|
| RTX A6000 (Shifter SQ4) | 2,723.8 | 97.0 | 10,828.8 | 331.0 |
| RTX 3090 (Shifter SQ4) | 2,915.7 | 111.5 | 11,354.8 | 391.9 |
| RTX 5090 (NInfer groupwise INT) | 3,331.9 | 214.7 | 17,705.4 | 779.6 |
| RTX 4090 (Shifter SQ4) | 6,098.7 | 148.9 | 23,093.3 | 532.3 |
| RTX 5090 (Shifter SQ4) | 8,221.9 | 242.6 | 32,039.0 | 784.0 |
Why this format (SQ/SHI) is faster
- Most low-bit quants use groupwise scaling.
Qx_0,Qx_K, andIQxare slow because the scales split the dot product into chunks.- NVFP4 and MXFP4 are fast on Blackwell because the hardware supports groupwise scaling natively.
- Our SQ and SHI formats use cheap bit shifts in GPU registers, then run native INT8 or INT4 across the full dot product.
- The idea works from 2-bit to 8-bit.
- The new SQ series works on most GPUs because INT8 kernels are widely available.
- The SHI series aims for NVFP4-like prefill speeds on GPUs with native INT4 kernels.
Why this format (SQ/SHI) improves quality
- Group size matters for quantization quality.
- Smaller groups capture more local variation.
- Common quants use groups like G16, G32, and G64.
- We use G4 and G8 in our low-bit formats to make finer adjustments.
Next steps
- Right now, we support selected model quants on Linux with NVIDIA CUDA. We've tested the RTX 5090, 4090, 3090, and A6000. We want to bring more (calibrated) quants and support for AMD, Intel, and Apple GPUs (M5+) as soon as possible.
- We deliberately use the GGUF format so that we can integrate with llama.cpp in the future. Today, you will still need Shifter to load our SQ and SHI GGUFs
Paper: https://arxiv.org/abs/2611.33080
GitHub: https://github.com/yufenghuang/shifter
We would appreciate your support and feedback.
16
u/sk1kn1ght 8h ago edited 8h ago
I've been looking into Shifter, and while the native integer computation approach is genuinely interesting, I have a few questions regarding the benchmarking methodology, particularly for SQ4 and SHI4.
Looking at the Qwen3.8-27B checkpoints on Hugging Face:
SHI4 is approximately 33.5% larger than SQ4, despite both having a theoretical packed density of 4.5 bpw. Where exactly do those additional 5.9 GB come from? Could you provide a tensor-level breakdown?
2. Quality relative to actual storage requirements
Comparing your published KL divergence results against independent GGUF benchmarks:
Quant| Size (GB)| KLD SQ4| 17.60| 0.01970 SHI4| 23.50| 0.01373 Q4_K_M| 17.44| 0.01390 Q4_K_L| 18.82| 0.01058 Q5_K_M| 20.92| 0.00529 Q6_K| 23.86| 0.00298
Independent Unsloth Q6_K and EXL3 6bpw evaluations report even lower KLD values of 0.00204 and 0.00158, respectively.
Obviously, different evaluation protocols prevent a definitive cross-benchmark comparison, but the discrepancy is substantial enough to warrant investigation.
Why weren't conventional Q4_K_M and Q6_K included as quality baselines for SQ4 and SHI4, respectively? Comparing by nominal bit width rather than actual storage requirements seems somewhat misleading, especially when SHI4 occupies practically the same space as Q6_K.
3. Different activation precision between quality and speed benchmarks
Unless I'm misinterpreting the paper, SHI4's quality evaluation uses A16 activations with outlier protection, whereas the performance evaluation uses A4 MLP activations without that protection.
What is the actual KLD of the exact configuration used to achieve the advertised throughput? Conversely, what throughput does the configuration used for the quality evaluation achieve?
It seems problematic to present quality and performance numbers together when they aren't simultaneously achievable under the same configuration.
4. Speculative decoding and workload selection
The advertised 242.6 t/s for SQ4 and 212.1 t/s for SHI4 are achieved using structured JSONL, CSV and SQL workloads with thinking disabled and MTP3 enabled.
Independent MTP benchmarks demonstrate that acceptance rates vary dramatically depending on the workload, from nearly 100% for predictable structured outputs to around 26–65% for instruction following, reasoning and coding tasks.
Could you provide:
Are there any plans to evaluate SQ4 and SHI4 on established benchmarks such as GPQA Diamond, MMLU-Pro, AIME, LiveCodeBench or agentic tool-calling benchmarks?
KLD is useful, but it doesn't necessarily capture how aggressive activation quantization affects multi-step reasoning, especially over long contexts.
Ultimately, I'd be very interested in a controlled comparison using identical memory budgets, workloads, context lengths, KV-cache precision and speculative decoding settings.
The underlying computational approach looks promising, but the currently available numbers seem to demonstrate an inference acceleration technique more convincingly than a superior quantization technique in terms of quality retained per gigabyte.
Am I missing something in the methodology that would explain these discrepancies?
Tldr: Why such a massive file size difference between shi and sq? Q4 is 17.5~gb at SQ but 23.5~ at SHI with big kld differences too
5
u/pmttyji 9h ago edited 9h ago
Awesome!
Eagerly waiting for this. Will it work with 4060 faster?
EDIT : Can you drop a GGUFs of small models(like Qwen3.5-4B or LFM or MiniCPM)? So many could check instantly.
5
u/modernkennnern 9h ago
Are there any reasons to use anything else? It's just a file format, right? Does it affect the model itself?
3
u/LagOps91 9h ago edited 9h ago
please for the love of god let's have something like that in llama.cpp. pp is just terribly slow and we need better quants anyway.
> 2-bit: Nearly 4× the prefill throughput of llama.cpp Q2_K, with lower WikiText-2 KL.
This just sounds amazing. Q2_K is just rather poor and we are in sore need of a replacement. 4x prefill speed? now that's a huge difference.
it would be amazing if you could make a PR for it there.
7
u/Miserable-Dare5090 vLLM 10h ago
I’m getting 100 tps with the new nvidia nvfp4 qad quant running on a V100 dude, ancient hardware by comparison. You get 83 tps and below with the same MTP3
Prefill may be compute bound but your decode optimization is not there
1
u/ekamenev 8h ago
Thank you for this. I will implement this for my NInfer fork (DGX Spark optimized). It already does decode at 100+t/s and prefill 4k t/s. Wondering which numbers I can get with this.
2
u/This_Maintenance_834 1h ago
this is a very interesting engine. Qwen3.6-35B-A3B at SQ4 run with 480 tps for SINGLE request on PRO6000. I have never seen any local model run at 480 tps locally on any hardware.
I used llama-benchy pp2048 and tg512 for my own testing, number might not be comparable to author.
shifter sort of clamps at concurrency of 8, higher than 8, requests are just queued up. but for local deployment, concurrency of 8 is a lot.
1
u/yamar35 8h ago
Certainly interested in this, especially for AMD cards. Radiance is pretty awesome, but faster with no qual loss? Well, cant say no to that!
EDIT: Would really love to see QFN numbers, especially if this works with MoE? Tp2 r9700s is a super common setup nowadays and supporting that would be amazing.
1
u/sdroege_ 8h ago
Is that the same SQ used by the Strata Hy4 Flash quantizations: https://huggingface.co/strata-engine/Hy4-Flash-Strata ?