Repository navigation
FiTuna: pick a quant and -ngl by measuring on your own machine, not by guessing #29037
leeyunseokarchive
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I kept defaulting to
Q8_0and then nudging-nglby hand until the speed felt acceptable, with no idea whether a lighter config would have cleared the same bar. So I wrote a CLI that measures it instead of guessing.You give it a model, a target tok/s, and a quality budget in percent. It quantizes each candidate, measures perplexity loss against the F16 baseline, benchmarks the survivors in measured-quality order, then binary-searches the minimum
-nglthat still hits the target. Output is the lightest config that actually passed on that machine, plus thellama-servercommand to run it.Measured on an Apple M3 Pro, llama.cpp b9960:
Q8_0Q4_K_M@ ngl=33, 30.81 tok/s, 1.73%Q6_K, 249.50 tok/s, 0.53%Q4_K_M@ ngl=48, 44.62 tok/s, 2.58%Q8_0was my default before this and it missed the target on all three.Two results I can't explain: on SmolLM2 the smaller
Q4_K_Mmeasured slower thanQ6_K, and on Qwen3-4BQ8_0came out slightly worse thanQ6_Kon perplexity. Both held on re-runs.Limitations, since they matter more than the table:
--tensor-split.MIT, no runtime dependencies,
pip install fituna. Runs in about two minutes on a 258MB model.https://github.com/leeyunseokarchive/fituna
I'm an undergrad and this is the first thing I've built in this space, so if the approach itself is wrong I'd rather hear it now.
All reactions