r/LocalLLaMA • • 10h 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.

131 Upvotes

26 comments sorted by

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.

  1. Actual model size vs nominal quantization

Looking at the Qwen3.8-27B checkpoints on Hugging Face:

  • SQ4: 17.6 GB
  • SHI4: 23.5 GB
  • Bartowski Q4_K_M: 17.44 GB
  • Bartowski Q6_K: 23.86 GB

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:

  • Raw decoding throughput without speculative decoding?
  • Throughput on open-ended reasoning and coding workloads?
  • MTP acceptance rates for each workload?
  • Comparisons against llama.cpp using equivalent speculative decoding settings and KV-cache precision?
  1. Actual reasoning capabilities

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

7

u/Sad-Size2723 8h 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 7h 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.

1

u/Sad-Size2723 4h 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.

5

u/pmttyji 9h ago edited 9h ago

We deliberately use the GGUF format so that we can integrate with llama.cpp in the future.

Awesome!

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.

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.

1

u/Sad-Size2723 4h ago

Thanks for the interest! Yeah it should work with 4060 already since it’s the same architecture as 4090. But because we don’t have offloading yet, you can only run smaller models like Qwen3.5-4B or MiniCPM as you requested for now.

Wondering if people are still interested in running smaller models, or larger models like the Inkling 2 mini with cpu offloading are preferred

5

u/modernkennnern 9h ago

We deliberately use the GGUF format so that we can integrate with llama.cpp in the future.

Are there any reasons to use anything else? It's just a file format, right? Does it affect the model itself?

7

u/Sad-Size2723 8h ago

I can see why many custom engines here use their own formats because it's just easier since you don't need to match how llama.cpp works. Making sure the layouts and metadata are prepared properly will take time and Claude Code can still make mistakes unless you do extensive testing.

In terms of performance, there shouldn't be any difference since the model is loaded in to VRAM (and RAM for offloading) for inference.

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.

4

u/Sad-Size2723 8h ago

Haha, getting this into llama.cpp is not that easy. we do need to write the kernels to use this format.

The plan is to refine the kernels within our engine for now, and if there are interests in the future, we would be happy to merge into llama.cpp. I do hope to build the right abstraction that works on most GPUs so that you only need one inference engine.

1

u/LagOps91 6h ago

yeah, it's not easy to get it in there, but i feel there have been so many good ideas that just didn't get anywhere purely because of lacking llama.cpp support.

making your own engine is perfectly fine, it's just that currently we are flooded by different engines using different optimizations instead of efforts to pool progress together.

if it's too hard with llama.cpp, maybe it would be a good idea to also try to work together with other inference engines and get more adaptation that way.

but in the end, i think i can speak for everyone here, we all would love to see for llama.cpp to catch up again just because it's so widely used and many projects directly build on top of it.

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

4

u/Sad-Size2723 9h ago

Curious what you are actually comparing because I couldn't find the 83 tok/s number in my post. But V100 is a very fast card with a memory bandwidth of ~900GB/s, that's certainly more than my A6000. A comparable case is the RTX 3090 with a similar bandwidth, but we got 111 tok/s reported above.

Anyways, the limitation of the V100 is already showing up in your numbers for concurrency with multiple streams. We typically got ~3.5x at C=4 and ~6x at C=8 (tested on A6000 and 5090), but your are getting about 1.8x at C=4 compared to C=1 on the V100.

The reason is that the V100 has the FP16 TOPS of 130. While the A6000 has the INT8 TOPS of 310 and 5090 has the INT8 TOPS of 840, I could imagine 5x slower PP compared to our optimized throughput on the A6000.

3

u/SLxTnT 9h ago

What model and GPU are you comparing to? I can't find any decode numbers under 83 other than 8bit on an RTX A6000, which is a larger model and slower GPU.

0

u/Miserable-Dare5090 vLLM 5h ago edited 5h ago

It’s a similar model in terms of quality, on a GPU that op has mentioned has 310 TOPS at 8 bits, which is twice the tflops than the V100, similar BW (or slightly less) 768GB/s (vs 900).

So either

  1. tops don’t matter for decode ==> op mentioning the a6000 tops doesn’t matter to my point: faster, and way older with shitty optimizations by a newbie like me.
  2. Tops do matter ==> unexplained why raw decode is so low compared to a v100

The truth is, flops gate the prefill and bandwidth gates tje decode. To OPs point, on a 4 bit quant on a 3090, it is getting 111 tps decode, and I’m getting 110 on a V100 already. So the question becomes, where is the improvement concurrency? I’m genuinely curious.

The real challenge nowadays is: optimize for older arch. If this method improves all architecture, why not turing and volta?

1

u/Sad-Size2723 4h ago

Single stream decoding is bandwidth bound, I thought that should be common knowledge here? In terms of the decode speed, I think your case is around the right ballpark that higher bandwidth means higher single stream decoding.

But I am not sure that single stream decoding is what everyone is doing though. For agentic cases that use memory system, web search, and document understanding, the engine needs to be able process lots of tokens, and that’s when prefilling is needed.

I mean, if you are happy with single stream decoding, that’s perfectly fine and V100 is the perfect GPU for that. Probably that’s why people buy the MacBook ultra, which is exactly high bandwidth low tops.

For concurrency, just referencing your numbers. For your case here, hypothetically if our optimization applies, it should be 350 tok/s for C=4, while you’re only getting 180 tok/s. But Volta is old architecture that doesn’t have int8 kernels, so our approach won’t help your situation at all. I am trying to avoid saying ALL GPUs in the title, and mention INT8 throughout the post, but I guess it was still not clear that it doesn’t apply to your case.

2

u/SLxTnT 5h ago

111 vs 110 is well within expectation between those 2 GPUs. The 3090 should theoretically be 4% faster, but the chosen prompt can easily cause that difference with speculative decoding. Even the same prompt can be that far apart without greedy, but greedy is also a way to over inflate decode numbers.

Taking advantage of INT4/INT8 is entirely for prefill, which is why that's the main focus. Decode means nothing with this other than keeping it within the expected speeds, which it apparently does.

What do you get for prefill?

0

u/fragment_me 9h ago

What is this infatuation with speed that everyone has here? Every AI slop repo can speed up an inference engine but they all almost do the same shit. This technique uses a group size of 4 or 8 which is new and interesting. NVFP4 is group size 16. It’s possible that this is better quality than NVFP4.

1

u/Miserable-Dare5090 vLLM 5h ago

Nvfp4 is not very high quality. I hear you that finer grained ops with smller group sizes translatws to some improvement in quality/ppl/kld…But quant aware distills can be almost lossless when coupled w a floating bit quant like nvfp4 (which is still w4a4). But by itself nvfp4 is not that interesting.

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.

1

u/Sad-Size2723 4h ago

Which quant are you using? I think for 4-bit you might still want to stick with nvfp4 since it’s already as fast as the hardware can get you. Our approach here most helps with other GPUs that don’t support nvfp4 natively (non-Blackwell GPUs) or quants that are not 4-bit (like Q2, Q3, Q5 and Q6)

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 ?

3

u/pmttyji 8h ago

Nope, that's different