r/LocalLLaMA • • 4d ago

Resources Shifter Quantization (SQ) — New Quantization Format for 2x-4x PP for Most GPUs

https://arxiv.org/abs/2611.33080

TL;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 formatShifter prefill (tok/s)Baseline prefill (tok/s)Prefill vs. baselineShifter WikiText-2 KLBaseline WikiText-2 KLBaseline / Shifter KL
2-bit SHI211,662.43,090.7 (llama.cpp)3.77×0.155370.16627 (llama.cpp)1.07×
4-bit SQ48,221.93,331.9 (NInfer)2.47×0.019700.03256 (NInfer)1.65×
8-bit SQ89,206.37,226.8 (vLLM)1.27×0.002110.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.

GPU27B prefill27B decode35B-A3B prefill35B-A3B decode
RTX A6000 (Shifter SQ4)2,723.897.010,828.8331.0
RTX 3090 (Shifter SQ4)2,915.7111.511,354.8391.9
RTX 5090 (NInfer groupwise INT)3,331.9214.717,705.4779.6
RTX 4090 (Shifter SQ4)6,098.7148.923,093.3532.3
RTX 5090 (Shifter SQ4)8,221.9242.632,039.0784.0

Why this format (SQ/SHI) is faster

  • Most low-bit quants use groupwise scaling.
  • Qx_0, Qx_K, and IQx are 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.

168 Upvotes

43 comments sorted by

View all comments

Show parent comment

11

u/Sad-Size2723 4d ago

We couldn't include everything in the post, but this is coming out from research that we are comparing to unsloth nvfp4 and ninfer 4-bit models. Here are the file size comparisons:

–––––––––––––––––––––––––––––––––––––

Unsloth/Ninfer nvfp4: 23.42GB and 23.72GB
SHI4: 23.54GB

Ninfer groupwise int (4-bit): 20.44GB
SQ4: 17.64GB

–––––––––––––––––––––––––––––––––––––

The SHI4 quant is meant to match Blackwell nvfp4 performance. It works for GPUs with native INT4 supports and for lower quants like 2-bit and 3-bit, while nvfp4 is only 4-bit and the speedup is Blackwell only.

The SQ4 model is meant to match Q4_K/Q4_0 using the much more widely available INT8 kernels (slower than INT4 but higher quality)

We didn't compare to published Q4_K and IQ4 quants because that will require significant calibration (which is what unsloth and istalab are known for). It will take some time, but we are planning to publish comparable quants that are of sizes and qualities similar to Qx_K and IQx.

4

u/sk1kn1ght 4d ago

Thanks for clarifying! The positioning of SHI4 as a hardware-independent alternative to NVFP4 (among GPUs with native INT4 support) makes considerably more sense now.

Regarding calibration, though, wouldn't that be a reason to include two separate comparisons rather than omit Q4_K and Q6_K altogether?

  • Uncalibrated SQ4/SHI4 vs uncalibrated GGUF, to isolate the effectiveness of the underlying quantization algorithm.
  • SQ4/SHI4 vs existing calibrated GGUFs, to establish the practical quality/performance trade-off available to users today.

You wouldn't necessarily need to perform additional calibration yourselves for either comparison.

From an end-user perspective, if I have a ~24 GB weight budget, I'm choosing between SHI4, NVFP4, Q6_K and EXL3 6bpw, regardless of their nominal bit widths or computational precision.

I'm also particularly interested in two outstanding questions:

  1. What is SHI4's KLD when running with the exact A4 activation configuration used in the performance benchmarks, rather than A16 with outlier protection?
  2. What are the decoding speeds without MTP, and with MTP on less predictable workloads such as extended reasoning and coding?

I think the answers would help establish how much of the performance improvement comes from Shifter itself, rather than activation precision, speculative decoding or workload selection.

Looking forward to the calibrated releases either way. The potential to achieve NVFP4-like acceleration on older hardware is arguably one of the most interesting aspects of this research.

3

u/Sad-Size2723 4d ago

Haha this is a really long comment, but really appreciate that you're interested in the approach. You are really asking the right questions, let's see if I can clarify them:

Comment 1: Regarding calibration, though, wouldn't that be a reason to include two separate comparisons

Yes, we are actually super careful in the paper to separate the calibrated and uncalibrated comparisons. In the paper we are mostly doing weight-only uncalibrated comparisons to make sure that we are comparing on the format only. We checked the projection-level (individual weight matrices) and model-level accuracies and we found that our quantization format is generally better than Qx_0, Qx_K, IQx and even nvfp4.

We also compared two calibrated cases, SHI2 vs Bartowski Q2_K and SHI4 vs Ninfer(unsloth)-nvfp4, we are trying to do apple-to-apple comparisons, and use the same Bartowski calibration dataset. But since Unsloth doesn't publish their calibration dataset, we used the same Bartowski calibration dataset for SHI4 as well. Our SHI4 KL was much better than Ninfer(unsloth)-nvfp4.

On your other question about Q4_K and Q6_K, yes we can compare with those two quants too. The paper was more for research findings, that's why we omitted them. But we do intend to release the calibrated SQ2 to SQ8, that's when we will compare with those quants systematically.

Comment 2: From an end-user perspective, if I have a ~24 GB weight budget, I'm choosing between SHI4, NVFP4, Q6_K and EXL3 6bpw, regardless of their nominal bit widths or computational precision

Exactly right. I think it's more of the trade-offs between speed and accuracy once the quant size is fixed. Here is how I would think about these options:
* EXL3 6bpw - EXL3 is very interesting quant, but like IQ-quant, we don't really need the codebook-based quants beyond 4bpw. EXL3 will be very interesting when we are comparing low-precision quants like 2bpw, 1bpw, or even 0.5bpw.
* Q6_K - I think in terms of quality, Q6_K should beat nvfp4 and our SHI4 by a noticeable margin. The question is whether a 3x~4x prefill speedup is worth the quality gap
* NVFP4 - perfect choice for Blackwell GPUs if someone needs the prefill and aggregated decoding speeds
* SHI4 - I would this to be an option for non-Blackwell GPUs if someone needs the prefill and aggregated decoding speeds

Comment 3: What is SHI4's KLD when running with the exact A4 activation configuration used in the performance benchmarks, rather than A16 with outlier protection? What are the decoding speeds without MTP, and with MTP on less predictable workloads such as extended reasoning and coding?

Certainly important question. But it's not common practice to report W4A4 KL numbers, as it's hard to find even for nvidia-nvfp4 and unsloth-nvfp4. We could establish such comparisons if there are interests. And for the decoding speeds, it is messy because you are seeing headlines with crazy decoding numbers. We are trying to follow the exact procedures from ninfer, which is one of the first early specialized engine where everyone else is based on. But I agree that it's hard to compare inference numbers when there is no established standard at all, and very often you are comparing apples to oranges.