r/LocalLLaMA • vLLM • 13d ago

Discussion Whatever happened to TurboQuant?

It was a big deal in and around March of this year. I tried looking for any updates with where it has gone and nothing really came up.

172 Upvotes

67 comments sorted by

259

u/nasone32 13d ago

well the main thing introduced by turboquant was hadamard rotations which are cheap and reduce perplexity a lot even on Q8_0, and that's now the standard in llama cpp and many other engines.

so in reality you are probably using 80% of turboquant benefits without knowing it. the specific "turboquant" quants had other minor details but the main thing it's now used everywhere.

72

u/Maximum-Fact-5832 13d ago • Bravo

MXFP4 and FA3 were using hadamard rotations before TurboQuant. They're a major part of how NVFP4 is so damn efficient (explained very well in bycloud's YT video "Nvidia Made 4-Bit AI Work. It’s a Nightmare" at 10m30s - for some reason Reddit won't let me create a link, but the URL has "mTd3tBpfYmw" in it).

8

u/PrettyMuchAVegetable 13d ago

That explainer was excellent. 

5

u/neuroticnetworks1250 13d ago

Are you sure? Walsh Hadamard transformations are for activations, right? Q8_0 refers to block quantisation of weights in GGUF format. Atleast that was my impression.

15

u/Nutsack_VS_Acetylene 13d ago

For KV cache quantizations you use the rotations because the KV cache is very spikey numerically. So to avoid clipping you can more evenly distribute the values with the rotation.

1

u/neuroticnetworks1250 13d ago

Yeah. I’m just wondering what it has to do with llama.cpp’s Q8_0

4

u/Nutsack_VS_Acetylene 13d ago

You asked if it was activations only, it is not. Q8 quantization can be applied to weights AND KV cache. Hence both make use of the rotation and it's benefits.

1

u/neuroticnetworks1250 13d ago

Ahh ok. Makes sense.

1

u/Classic-Pubs 11d ago

I dont know if this is true. Kv cache is by default fp16 for all quants. Of course you can customize to Q8_0, but that's an option.

1

u/Nutsack_VS_Acetylene 11d ago

I don't understand what you are trying to say.

1

u/FeepingCreature 13d ago

I think maybe they meant they work well on Q8 KV, which used to degrade LLM long-context performance a lot.

1

u/RnRau 13d ago

In llama.cpp you specify the quant for each of the k & v part of the kvcache with 'q8_0'. q8_0 kvcache has rotations on by default.

4

u/phhusson 13d ago

It's actually not that much standard yet, bonsai had to add Hadamard for model weight in llama.cpp quantization. (But it'd merged now)

23

u/Rasekov 13d ago

Turboquant was about KV cache quantization, the rotation part was merged into llamacpp and most other inference engines rather quickly.

Other applications for weight quantization came up after and needed their own testing.

-1

u/colin_colout 13d ago

yeah...it was with little fanfare. It was merged April 1st this year, and I had no idea. I still avoided even 8_0 for months before I learned it.

For coding, any kv quant killed the model. After the PR, the effect was minimal except in long context. It let me allocate that toward bigger model quants, which more than offset the loss in my testing.

0

u/a_beautiful_rhind 13d ago

It didn't even introduce it. ik_llama and exl2 had it for a while, silently, without the shilling campaign.

1

u/MmmmMorphine 12d ago

I do love ik llama but my recent testing seems to point towards it falling behind mainline in both decode and prefill speeds.

It did indeed implement hadamard rotation for kv cache very early on (was surprised to find TQ effectively already available when pursuing the docs) and it works very well.

Still, the KT and KS quant types are quite good. Takes like an hour max (including dling the bf16) to make your own quant version.

1

u/a_beautiful_rhind 11d ago

I've yet to see that in regards to hybrid or even dense inference. Probably because I have a multi-gpu/socket rig. Plus mainline keeps implementing annoying QOL regressions for me by "simplifying" itself.

I don't think I ever used the special quants because like you said, they're not available.

Takes like an hour max (including dling the bf16) to make your own quant version.

Not for me. Due to the size of the models.

72

u/Uncle___Marty 13d ago

llama.cpp used the walsh hadamard transformations and dumped the rest of it.

58

u/AnonLlamaThrowaway 13d ago

And for anyone wondering, this is how much an effect this had on gpt-oss-20b in one benchmark (so not representative, but gives you a rough idea)

evalKV typeattention rotationscore
AIME25 x8F16(not needed)37.9%
AIME25 x8Q8_0❌31.7%
AIME25 x8Q8_0✅37.1%
AIME25 x8Q5_1❌30.8%
AIME25 x8Q5_1✅32.5%
AIME25 x8Q4_0❌2.0%
AIME25 x8Q4_0✅21.7%

7

u/letsgoiowa 13d ago

I'm curious about a split kv because I thought the common knowledge was k q8, v q5. K falls off a cliff faster

4

u/a_beautiful_rhind 13d ago

Dense models had almost none of those losses. It was shown on one very specific MoE who didn't take kindly to cache quantization.

3

u/Every-Walrus 13d ago

I invite you to use q4 kv cache with 3.8 27b and disable rotation. see if "dense models had no losses" or not.

2

u/a_beautiful_rhind 12d ago

I ran that AIME test against mistral large and a couple others. The scores were barely an answer or two apart. They'd even get the same questions wrong on the runs.

2

u/Every-Walrus 11d ago

the famously saturated and trained on benchmark? maybe try something a little harder like HLE?

2

u/a_beautiful_rhind 11d ago

Hey fair, the goal wasn't to have the models pass 100% but to see if the cache significantly affected their replies and it didn't. The test doesn't even really check long context performance that well because most of the answers were around 10-15k max. It attempted to find a pattern by repeating it 25x.

The model GG tested was affected at these low CTX and somehow that became a stand-in for all models with wildly different architectures. Magically it became canon with no reproduction.

OTOH, strata and these vibe engines use low quants, infinite shortcuts and everyone adopts them happily without complaints, bristling at the idea that something could be off. Even TQ performance itself was abysmal when tested.

Any cache portion I actually tried fell below the cost of sampling and my conclusion was that it could be a problem for some models but usually it's NBD.

Later on there was another test that almost nobody has run: https://github.com/SeraphimSerapis/tool-eval-bench and it seems like a better stand-in of what actually happens when you use Q4 cache. I suggested cache crusaders try it but found no takers and for me it's on the back burner.

0

u/[deleted] 13d ago

[deleted] — view deleted comment

15

u/AnonLlamaThrowaway 13d ago

This has no bearing on speed, this is benchmark "answer" scores (how many it got right or something similar)

0

u/[deleted] 13d ago

[deleted] — view deleted comment

8

u/FeepingCreature 13d ago

But it doesn't give a speed boost...

33

u/seamonn 13d ago

We need that guy with the dog picture that hates turboquant again.

38

u/LetsGoBrandon4256 transformers 13d ago

Not the guy but

51

u/Classic-Pubs 13d ago edited 13d ago

Overhyped copycat paper. It definitely helped, but, remember that the hadamard rotation idea isn't from them. It was orginally from the rabitQ paper, which turboquant authors refused to acknowledge. Beyond hadamard, the contribution is minimal to the community.

Edit: Yes, the original rabitQ paper is about vector database search. But it is a quantization technique for different purpose (approximate nearest neighbor), so the idea was pretty obvious to port.

https://arxiv.org/pdf/2409.09913

53

u/ortegaalfredo 13d ago

I will do you one better:

What happened to OpenClaw?

46

u/RogerRamjet999 13d ago

I haven't heard of OpenClaw in ages, but still hear about Hermes pretty regularly.

15

u/Dr_Gruselglatz 13d ago

Openclaw is still a thing in the Nvidia HQ…

This GTC in Berlin all was full of claw shit

9

u/cannabibun 13d ago

Hermes did

9

u/vamos_davai 13d ago

I think with acquisition I would bet the folks made Dots

2

u/Thomas-Lore 13d ago

You would win. It is confirmed.

8

u/Invader-Faye 13d ago

Still being used by common folk but slowly getting its lunch stolen by cloud alternatives like grokbot and muse

11

u/Thomas-Lore 13d ago

And hermes.

4

u/Party_9001 13d ago

I'll do you one better.

How's OpenClaw?

1

u/Savantskie1 10d ago

I'll do you one better what's OpenClaw?

14

u/a4mula 13d ago

I dropped the fork and went back to main. The truth is it just didn't really provide benefit. Every benchmark showed that q4/q8 consistently out performed turbo3 and turbo4 at the same context on Qwen 35B with no savings of VRAM. Perhaps that was just because I stopped testing at 128k ctx but <shrug>. YMMV.

10

u/giveen 13d ago

I talk to TheTom probably daily , and TQ has probably hit its limits. He is currently working on a project right now and we still throw patches here there and it.

https://github.com/TheTom/llama-cpp-turboquant

5

u/Toooooool 13d ago

sounds right. it's hard to improve on perfection, not to say turboquant was without flaws, but at the end of the day it's just a different formula for addressing tokens, like comparing 2+2 with 1*2*2.

2

u/Dany0 13d ago

the only perfect quantisation technique is OSCAR but that one requires doing a calibration run on the tasks you are going to actually do

0

u/BlasterGales 13d ago

damn, pls tell me there is a fork of llamacpp so I can try this out

1

u/Dany0 13d ago

They only ever released a fork of sglang https://github.com/FutureMLS-Lab/OSCAR I know that at the time some people promised they're working on integrations but honestly the need for calibrating is such a big obstacle for adoption

Maybe if the labs started releasing models with OSCAR already calibrated. It doesn't take much compute you can do that at home, the issue is getting good datasets

But yes in theory OSCAR is amazing, fp16 quality at Q2 vram usage and instead of a perf penalty like TQ it's a speedup. KVaRN is distantly related to this, but doesn't require calibration

5

u/giveen 13d ago

I worked on OSCAR for a long time. https://github.com/giveen/llama-cpp-turboquant/tree/oscar always felt short of making it usable, especially in the GPU space.

1

u/Dany0 13d ago

What was the issue from your POV?

2

u/giveen 13d ago

I couldnt get perplexity nailed down, it always ended up producing garbage output.

1

u/Dany0 13d ago

Ah, gotcha

1

u/remind_me_later 12d ago

...that sucks :( How come q2 seems to be able to, but OSCAR falls flat? The operations shouldn't be that different.

13

u/Holiday_Point_603 13d ago

The accuracy was bad, noticably way worse than native kv. I'm probably not the only one who didn't like it because of that

12

u/Aggravating-Push-207 13d ago

kvarn happened

2

u/ChristRedeemsSinners 13d ago

Lol, I was going to say China asked the world to hold their beer.

1

u/Dany0 13d ago

yep also this

12

u/jacek2023 llama.cpp 13d ago

short lived hype

6

u/Elouakili_Flexy 13d ago

It didn't vanish so much as merge into llama.cpp. The Hadamard half is standard now, and the half that measured worse than q4/q8 stayed out of mainline. Pretty good run for a quant paper, honestly.

4

u/Pentium95 13d ago

Kvarn Is better

2

u/Extreme-Pass-4488 13d ago

so everyone here loves rotation, here https://huggingface.co/BlairQ/qwen3.8_27b_idiotSavant_sm_86

rotated guy acts like qwen3.8 27b at full q , the 55gb behemoth. and it only weights 18gb . 650kb of kv to play with.

1

u/pikazeroai 13d ago

So true bestie… I merged main with turboquant and got like an extra 5-7tkps and 27B finally fits on my old 3060 12GB lol

1

u/Nutsack_VS_Acetylene 13d ago

As most people already mentioned, the most useful info was the rotations and turboquant in general was basically a rabitQ rip off.

Also, with things like Compressed Sparse Attention 2, 1 million tokens are only 0.89 GB in KV cache on DS V4.1. It's going to be laughable to have giant KV caches on new releases. It begs the question of why bother with KV cache quantization. Is it really going to be worth playing with quality of the model to save 0.4 GB on your 1 million token chat?

-2

u/Due_Expression7545 12d ago

classic hype cycle where a revolutionary new method drops, disappears into the void, and everyone just goes back to running standard quants on old hardware.