This article also exists in French: read the French version.
One level down: #007.1 The rules: bits, KL, BFCL, and 4 bits

In short
- An optimization passes if it gives the same bits as the previous code. Otherwise, I measure its gap to the reference (KL), then I compare 400 BFCL questions before and after, question by question.
- Herbert's "4 bits" keeps four families of matrices wider, in bf16 or in 8 bits depending on the machine: with everything in 4 bits, the answer breaks from the second token on.
- On 2,551 BFCL questions, Herbert in 16 bits gets 68.1% right and vLLM 66.3%: on par, not ahead. The 4 bits costs about 5 points.
This is a technical companion to #007 Herbert against OVH's engines, on their own model, published the same evening. It gives the rule that decides whether an optimization is accepted, what "4 bits" means in Herbert, and the details of the tool-calling test against vLLM. The speeds are in #007.
The rules
The reference is OVH's code in transformers, on its no-cache path, all in 32 bits (see token 18 in the previous article for the difference between its two paths).
First check: the same bits. An optimization passes it if it gives exactly the logits of the previous code: same md5 fingerprint on a 512-token prompt and on a 2,048-token one, in 16 bits and in --q4, for each block size involved. Nothing else to check in that case.
Second check, when the bits change:
- the gap to the reference (KL) on 12 BFCL questions, with each of the reference's answers forced token by token, along with the top-1 agreement rate;
- the 400 BFCL
simple_pythonquestions through the server, greedy, before and after, compared question by question with an exact McNemar test; - the number of answers cut off at 2,048 tokens, that is, the ones that hit the limit before they answered.
The options added since November 25 only went through the gap measurement, on a wider gate: 16 long prompts and 12 to 36 short ones, with a rule written before the measurement. The tool test was not rerun for them. Two options accepted separately can interact: I have not measured that.
Before each campaign, the prediction is written in a _predictions.md file, filed with the logs. Each optimization gives a measured value and an integration cost. The decision to make it the default comes afterwards, and it is stated.
What "4 bits" means here
With --q4, Herbert puts ten of the fourteen candidate families of matrices in 4 bits. The router stays in 32 bits. The embedding and the small matrices of the TPA attention (A factors, offsets) stay in bf16. Four families read values that are too large or too sensitive for 4 bits: they are kept wider. That is where the engines differ.
| Family | CUDA | Vulkan (RX, Arc) | Metal | x86 processor | ARM processor |
|---|---|---|---|---|---|
Mamba-3 input projections (in_proj, in_proj_dyn) | 4 bits | 4 bits | 4 bits | 4 bits | 4 bits |
Attention: c_q, W_B_k, W_B_v, gate_proj | 4 bits | 4 bits | 4 bits | 4 bits | 4 bits |
Routed experts input, down to the latent (down_proj) | 4 bits | 4 bits | 4 bits | 4 bits | 4 bits |
Shared expert, input (fc_1) | 4 bits | 4 bits | 4 bits | 4 bits | 4 bits |
Output head (lm_head) | 4 bits | 4 bits | 4 bits | 4 bits | 4 bits |
Mixer output (mixer_proj) | bf16 | bf16 | 8 bits | bf16 at prefill, 8 bits at decode | bf16 |
Routed experts output (output_experts) | bf16 | bf16 | 8 bits | bf16 at prefill, 8 bits at decode | bf16 |
Back up from the latent (up_proj) | bf16 | bf16 | 8 bits | bf16 at prefill, 8 bits at decode | bf16 |
Shared expert, output (fc_2) | bf16 | bf16 | 8 bits | bf16 at prefill, 8 bits at decode | bf16 |
Router (moe_gate) | 32 bits | 32 bits | 32 bits | 32 bits | 32 bits |
| Embedding, A factors and offsets of the attention | bf16 | bf16 | bf16 | bf16 | bf16 |
The 4 bits is the same everywhere: groups of 32 numbers, one scale per group, chosen by least squares among 15 candidates. The scale is in f16 on graphics cards and in f32 on the processor. The 8 bits uses groups of 64, with an f32 scale. On a graphics card, the activations stay in bf16. On the processor, those of the 4-bit matrices go to 8 bits.
Why these four families. With everything in 4 bits, the answer breaks from the second token on, on Metal as on the processor: the mean gap to the 16-bit version (KL, two prompts) is 0.40 and 0.17 on Metal, 0.51 and 0.28 on the processor. By keeping the four families wider, it drops to 0.17 and 0.06 on Metal, 0.30 and 0.09 on the processor. Three of them read huge values: I measured up to 2.9 × 10^16 at the input of mixer_proj, layer 1 (the transformers reference gives 2.93 × 10^16 at the same place). The llama.cpp documentation talks about roughly 10^14: our measurement is higher. The fourth one, fc_2, does not read any outlier (at most 2.4). And yet, when it alone is put in 4 bits on the processor, it is the one that flips the second token. So magnitude does not explain everything, and I do not claim it does.
Why 8 bits on Metal and at decode on the processor. At decode, memory is the limit: 8 bits instead of 16 means half as many bytes to read. On the Mac, 8 bits keeps the fidelity of --q4 and takes decode from 248.3 to 266.5 tokens/s. On the x86 processor, Herbert keeps both copies, bf16 for prefill and 8 bits for decode, hence the 11.7 GB. On the ARM processor, the 8-bit copy does not exist yet.
The processor recipe. The first recipe chose each group's scale as its maximum divided by 7. It also put output_experts and up_proj in 4 bits, where the graphics cards keep them in bf16. On the tool test, it got 48 questions out of 100 right, against 68 for the NVIDIA card in --q4. Aligned with the graphics cards, it gets 75 right, and its gap to the NVIDIA card in 16 bits goes from 0.0565 to 0.0383. It costs 15% on prompt reading (852 tokens/s instead of 1,002 at 512 tokens), 3% on writing (36.4 instead of 37.6), and 11.7 GB of memory instead of 5.2 (Ryzen 9 9900X, at the time of the recipe change). On the published commit, the 100 answers of the test are identical, message for message, to those of the first measurement.
Herbert does not read an already quantized file. It reads the original weights and prepares this mix at load time, for the machine it runs on.
Logs: 2026-11-19-olala-metal-q4, 2026-11-19-olala-jit-q4, 2026-11-20-olala-q8-families, 2026-11-21-olala-activations-max, 2026-11-22-olala-cpu-fidelity-diag, 2026-11-22-olala-cpu-q4-recipe.
Tool use, against vLLM
BFCL, 7 categories, 2,551 questions, on a rented RTX 6000 Ada (same architecture as the RTX 4080, same md5 of the logits), commit of November 25 (1bdf00b), vLLM 0.33.0 in 16 bits, most likely token at each step, answers limited to 2,048 tokens. The prompts sent are identical, token by token, question by question. As a percentage of questions answered correctly:
| Category | Herbert 16 bits | Herbert --q4 | vLLM 16 bits |
|---|---|---|---|
simple_python | 80.0 | 72.5 | 78.25 |
multiple | 81.5 | 76.0 | 77.5 |
parallel | 62.0 | 55.0 | 56.0 |
parallel_multiple | 65.5 | 56.5 | 63.5 |
irrelevance | 92.9 | 92.5 | 92.5 |
live_simple | 66.7 | 60.9 | 66.3 |
live_multiple | 57.5 | 53.2 | 56.2 |
| Average excluding live | 76.4 | 70.5 | 73.6 |
| Total over the 2,551 questions | 68.1 | 62.9 | 66.3 |
| Answers cut off at 2,048 tokens | 318 | 517 | 364 |
Question by question (McNemar on the total): Herbert 16 bits against vLLM, +1.8 points, p = 0.017, but no category shows a gap on its own. Part of the gap comes from answers that are cut off less often (318 against 364). So I write that Herbert 16 bits is on par with vLLM, not ahead of it. Herbert --q4 against vLLM: −3.45 points, p = 0.0001; against Herbert 16 bits: −5.3 points, p < 0.0001. On this test, --q4 costs about 5 points: it is a setting for speed and memory, and it does not come for free.
OVH reports 59.6% on BFCL V3 in the model card on Hugging Face. That figure covers the test's 23 categories (4,981 questions, including multi-turn conversations), with randomly sampled tokens (temperature 0.8), a "high" reasoning effort, and no limit on answer length. I am measuring something else: 7 simple categories, the most likely token at each step, the default effort, and a limit of 2,048 tokens per answer. In our runs of November 21, 46% of the failures were in fact answers cut off at that limit. So our scores cannot be compared with OVH's figure. They compare with each other: Herbert and vLLM get the same questions with the same settings. It is the gap between the two that tells whether Herbert reproduces OVH's model.
One level down, or several...
- One level down: #000 an inference engine that writes its own code · 03-Oct-2026
- One level down: #001 a compiler for an LLM engine · 11-Oct-2026
- One level down: #002 the same compiler on a GPU · 18-Oct-2026
- One level down: #002.1 follow-up, the Arc in f16 · 02-Nov-2026
- One level down: #003 what CUDA has that Vulkan lacks · 25-Oct-2026
- One level down: #004 the same compiler on Apple's chips · 01-Nov-2026
- One level down: #005 Is Herbert better than Llama.cpp? · 15-Nov-2026
- One level down: #006 I started porting Olala, OVHcloud's model · 22-Nov-2026
- One level down: #007 Herbert against OVH's engines, on their own model · 29-Nov-2026
- One level down: #007.1 The rules: bits, KL, BFCL, and 4 bits · 29-Nov-2026
- One level down: #007.2 Graphics cards, one track at a time · 29-Nov-2026
- One level down: #007.3 The processor: AVX-512, AVX2 and SME · 29-Nov-2026
- One level down: #007.4 The option turned down, then accepted · 29-Nov-2026