Evaluation and the Capability Score
optiq eval is the harness behind the Capability Score on every OptiQ model card. It runs in two stages: a smoketest that says whether a convert worked, and a six-benchmark suite that says how much capability the quant kept.
# Triage: KL against a reference, plus GSM8K on 50 questions (~5 min on a 27B) $ optiq eval mlx-community/Qwen3.5-9B-OptiQ-4bit --task smoketest # The six benchmarks and the Capability Score (~2 h on a 27B) $ optiq eval mlx-community/Qwen3.5-9B-OptiQ-4bit --task all --score --output-json ./bench.json
The six benchmarks
| Benchmark | What it checks | How it is run |
|---|---|---|
| MMLU | Broad knowledge | 5-shot, 1,000 questions stratified across the 57 subjects, scored by the logit of the answer letter |
| GSM8K | Multi-step arithmetic | 1,000 questions, 3-shot chain of thought, chat template applied, thinking off where the model has a toggle |
| IFEval | Following format, length and content instructions | The full 540-prompt set, prompt-level strict |
| BFCL-V3 simple | Function calling | 200 single-turn calls, scored by AST equivalence |
| HumanEval | Writing working code | All 164 problems, pass@1, executed in a sandbox |
| HashHop | Retrieval across a long context | 25 instances at each of 1 to 4 hops (100 in all) at about 12k tokens; overall accuracy |
The first five are short-context, so a quant that lost long-range attention precision can still post strong numbers on all of them. HashHop is the one that catches it, which is why it often shows the largest gap between a mixed-precision quant and uniform 4-bit.
How the Capability Score is formed
Capability_Score = mean(MMLU, GSM8K, IFEval, BFCL, HumanEval, HashHop)
Each benchmark is a percentage from 0 to 100, and each gets an equal vote. There is no weighting and no size penalty: disk size is reported beside the score as a separate number, so you choose the trade-off for your Mac. A run that covers fewer than all six is marked partial, because dropping one benchmark can move the mean by more than ten points; only complete runs are comparable.
KL divergence against a reference is not part of the score. It is the one step that holds a second model in memory, so the suite skips it unless you add --with-kl or run --task kl. The reference is the bf16 model when it fits in 70% of free memory, and the uniform 4-bit baseline otherwise.
Decoding settings
- Greedy decoding on every generation task, so two quants of one model differ only by their weights.
- A repetition penalty only where the publisher says the model needs one and its own config does not carry it: 1.1 for LFM2.5 and Inkling-2-Mini, 1.3 for dhara. Every other model runs with none.
--repetition-penaltyoverrides it. - Always-on reasoning models get
--reasoning: the think block is allowed, each question gets a budget of up to 4,096 tokens (--reasoning-max-tokens), the block is stripped before the answer is read, and MMLU is scored by parsing the generated letter instead of by logit. - KV cache stays at full precision unless you pass
--kv-bitsor--kv-config.
The candidate and its baseline always run with the same settings. --served URL scores a running optiq serve over HTTP with the same questions and decoding, which checks the path your users are actually on.
Why the suite looks like this, and the reasoning behind an unweighted mean, is in the eval framework that drives every quant we ship. Every flag is in the CLI reference.