What's that?
Remember
Valkyrie, TheDrummer's Llama 3.3 Nemotron Super 49B finetune? You don't have 24 GB of VRAM? You tried running a mainline 3-bit quant and your grandkids were born by the time it finished TG? So did I.
My first attempt was a desperate gamble to shove the entire model into 16gb. Turns out, Llama 3.3 doesn't like mixed 2-bit ffn's. Who would've guessed.
This GGUF is a compromise - a relatively conservative quant trying to allow a 24gb fit or a moderate offload penalty with 16gb GPUs. It utilizes SOTA ik_llama specific quantization to be faster at inference.
And I never even liked Tetris to begin with
The goals: A quant of Valkyrie that would be as compact as possible without requiring quadratic sampling, would tolerate offload well, and would remain coherent.
The result: a hybrid IQ3_KT/IQ4_KT quantization of
TheDrummer/Valkyrie-49B-v2.1
Notice file provided per License requirements.
Comparison:
| IQ3_XS by bartowski | This IQ3_KT | Diff |
|---|
| winogrande | 75.6906 ± 1.2056 (958/1267) | 75.8485 ± 1.2029 (961/1267) | +0.31% |
| hellaswag (n=400, s=42) | 81.75% (327/400) | 83.25% (333/400) | +1.8% |
| pp512 (t/s) | 398.37 ± 20.18 | 409.00 ± 13.96 | +2.6% |
| pp32768 (t/s) | 311.00 ± 0.29 | 315.76 ± 0.36 | +1.5% |
| tg64 (t/s) | 2.32 ± 0.02 | 2.77 ± 0.1 | +19.39% |
| pp32768+tg256 wall time (s) | 215.7 | 196.19 | -9.05% |
| size (bytes) | 20908008512 | 20747016288 | -0.77% |
Tested on 5060 TI 16 GB with -ngl 63 -b 256 -amb 32 -nkvo -ctk q6_0 -ctv q4_0. Your speeds may vary depending on hardware
Quant Details
iq3_kt: ffn_up, ffn_gate, ffn_down
iq4_kt: attn_v, attn_k, attn_q, attn_output
iq5_k: output
imatrix by
bartowski
quantized with ik_llama.cpp build: 9d07d868
incompatible with mainline llama.cpp
Rationale
iq4_kt wins over iq4_kss, and iq3_kt wins over iq3_ks, with similar (compact) size. The downside is a one-time quantization time penalty. Extra smarts (hopes up!) for a small upfront cost for me. We'll take the L.
Since 3-bit ffn is the minimum actually functional for Nemotron 49B, I didn't go below it. In my experiments on smaller models, iq4_kt appears to be an adequate quant for attention.
There's probably SOME additional compromise to be made here (and I wish I did, since calculating trellis on slower CPUs is in itself a form of torture), such as ffn_gate to high 2-bit (iq2_kl?) and using the recovered bits to bump ffn_down up a little (iq4_k?). It would make an interesting experiment had it not required four hours to make a single quant. WYSIWYG.
In conclusion:
This is a mixed bag. It offers no statistically significant benefit on smarts, at least based on winogrande and hellaswag, and tiny gains in all domains other than TG and wall time.
Technically, IQ3_KT ffn_up and ffn_gate constitute a ~0.3 bpw quality improvement (based on ikawrakow's assesment of IQ3_KT ppl). Whether it improves writing quality in any significant capacity remains to be seen.
The only significant benefit is a noticeable TG speed increase, and consequent response wall time improvement. The effect depends on how long your typical response is.
I don't have a good dataset to perform needle-in-haystack attention tests, but hopefully the beefed up attn quantization (in comparison to the reference IQ3_XS) should help score a few points here as well.
Is +9.05% response speed, extra 153 MB of space, and theoretically better attention worth it? Idk. WYSIWYG, as always.
P.S.: the 16GB gamble model performed significantly better at hellaswag and winogrande than a mainline quant of similar size (IQ2_XS), for what it's worth, though it still remained incoherent at speech. Perhaps there's a minimal coherence razor's edge point to be found with more radical quantization than this one. Good luck if you try.
P.P.S: the next one I tried and the absolute tightest fit according to my criteria was all trellis, attn at iq4_kt, ffn_down at iq3_kt, ffn_up/gate at iq2_kt. It was coherent for maybe a sentence. Perhaps there's merit to beefing up first and last layers to higher ffn and paying the price in middle blocks. Unfortunately, there's no telling how a NAS model will react to this surgery, nor is there any point in making a dumb, slow 49B which will be worse than a Mistral Nemo.
Cheers
Meta - the base model.
NVidia - for the Nemotron series
ikawrakow and contributors of ik_llama.cpp - I probably misused your wonderful creation.
TheDrummer - you cooked a legendary one.
bartowski - for the imatrix + the myriad of quants we all benefit from.
References