This article also exists in French: read the French version.
One level down: #007 Herbert against OVH's engines, on their own model
My name is Olala. Herbert-Olala.

In short
- On an RTX 4080, one request at a time, Herbert reads Olala's prompt 5 to 7.9 times faster than OVH's version of Llama.cpp, in 16 bits as in 4 bits. Against vLLM, it reads as fast or a little faster, from 327 to 32,640 tokens; when writing, it stays at 68-80% of vLLM in 16 bits.
- On the Mac Studio, Herbert reads prompts 7 to 41% faster than OVH's MLX server in 16 bits. On AMD and Intel cards, OVH has no engine. To place Vulkan, I compare it with CUDA on the same RTX 4080: there it reads at between 56 and 69% of CUDA's speed.
- Every optimization goes through a numerical check: either it gives the same bits as before, or I measure how its gap to the reference changes. The article gives the details and the limits of these checks.
- The same computation is split up differently on an NVIDIA card, an AMD card, an Intel chip, a Mac, and a CPU. The drivers add their own limits.
In the previous article, I introduced Olala, OVHcloud's model. I also told you what porting it to Herbert had taught me. I ended on a first measurement against OVH's engines: Herbert was slower almost everywhere. Herbert is not written for Olala: it is a general-purpose engine, which has been running other models since the start of this series. Olala just happens to be this week's model. Here is what came next, measurement by measurement.
A word about the "7 times faster" in the video. All the numbers in this article are true: against OVH's version of Llama.cpp, on the same card, Herbert does read the prompt up to 7.9 times faster. I have not profiled their version: I don't know yet why it reads so slowly on this card. But I admit the clickbait side of it: I picked that number to catch the eye. The rest of the article says under which conditions it holds. It also says where Herbert is still behind.
I would have liked to go further before publishing. There are measurements left to do, results I can't explain yet, and leads I haven't had time to explore. That always leaves me a little unsatisfied.
But I don't only do research. I also need to make my work known, to show what I can do and, quite simply, to make a living from it. I can't wait until I have answered all my questions before talking about it, especially since every answer brings new ones.
So I publish, with what I measured, what I don't understand yet, and the limits of my results.
And despite everything left to do, I am rather proud of how far I got this week.
Olala is a model released by OVHcloud. Herbert is a personal, independent project, with no connection to OVHcloud. OVH's engines are my reference, not my opponents.
The technical details are in four companion articles, published the same evening as this one:
- #007.1 The rules of the game: bits, KL, BFCL, and 4 bits: how I check every optimization, what "4 bits" means here, and the tool test against vLLM;
- #007.2 The graphics cards, lead by lead: where the time goes, each lead measured, and what the drivers impose;
- #007.3 The CPU: AVX-512, AVX2, and SME: Herbert on CPU against OVH's version of Llama.cpp;
- #007.4 The lead I turned down, then accepted: MLX's way of computing Mamba-3 on the Mac.
What stays here is the story of the week, the key numbers, the limits, and what you need to reproduce it at home.
The story of the week
The full video, which follows this text, will come out on YouTube during the week.
In the previous article, issue 006, I introduced Olala, OVHcloud's model, and I explained how much I had suffered to get it working with Herbert, my inference engine.
I also showed you a first measurement against OVH's engines: Herbert was slower almost everywhere. On 4 machines, it was faster in only one place: writing on the NVIDIA card, in 4 bits.
As I told you, I am not competing with these engines. I use them as a reference: if they go faster, Herbert can do better. And if I can do better than them, I do. But what interests me is understanding why they go faster.
And let's be honest: going fast matters. For the industry, of course, but not only: it is also a way to make your work known. If you have to go from Paris to Toulouse and two trains cost the same, one taking 4 hours and the other 6, you take the faster one. And there is the question of energy, which we will certainly come back to.
That said, back to the technical side. I mentioned it in the previous issue: Herbert's "4 bits" is not quite 4 bits. Some matrices in this model see huge values go through them that are hard to quantize, so Herbert keeps them in 16 or 8 bits and puts everything else in 4 bits. So when I talk about "4 bits" here, I mean that mix.
Here, after measuring a very large gap between Herbert and the work of OVHcloud's teams, I set myself a goal: do at least as well as their vLLM on the NVIDIA card and their version of MLX on the Mac, when reading the prompt as when writing.
And above all, without damaging the model's answers. Because sometimes going faster is easy if you accept computing a little wrong. You round earlier, you change the order of operations, you keep fewer digits, and so on...
The model still answers, but it is no longer quite the same answer. What I want to show here is that you can optimize while doing your utmost to stay as close as possible to the reference. And that in the end, the hardware decides what you can do. That is the whole idea of Herbert: adapting the model to the hardware. That is why, from one machine to the next, I don't have exactly the same model in memory. And that is why I don't start from already quantized files, like Llama.cpp's GGUFs: Herbert reads the original weights and prepares them at load time, for the machine it runs on. It is a deliberate choice.
For that, I need a simple rule of the game that I hold to for every optimization: the reference is OVH's own code, and I check every change in two ways.
First, I look at whether it gives exactly the same bits as before. If it does, the computation has not changed, so the change is good. But it is not that simple, because the reference engine itself does not always give the same answer: its code has two computation paths, and we saw in the previous issue that they sometimes diverge.
Most of the time, whatever the model, the bits change. In that case, I measure the gap to the reference on 12 questions to start with. Then I put the model through the 400 questions of a tool-calling test, BFCL, published by the University of California, Berkeley, before and after the change.
Ideally, you would need more. But there are only 24 hours in a day and I don't have 10,000 machines at my disposal. I compare the answers question by question, with a statistical test, to know whether the difference is real or just noise. And before each measurement, I write down what I expect to find.
Next, you have to know where the time goes. On the NVIDIA card, an RTX 4080, I measured vLLM and Herbert on the same 8,000-token prompt. vLLM read it in 370 milliseconds of compute, Herbert in 1,100, three times as long.
On the Mac, MLX was several hundred milliseconds ahead on the same prompt.
In both cases, the delay came mostly from updating Mamba-3's summary and from the attention. And that is interesting, because Mamba-3 is a brand new module in Herbert.
But first, what is this summary? I was asked after the previous issue: is it a summary like the one an assistant writes as a conversation goes on? No. It is not text. It is a fixed-size table of numbers, in each Mamba-3 layer, that the model updates at every token. Nobody can read it. It has two things in common with a written summary: it doesn't grow and it loses details. But it only moves in one direction: every token changes it and you can't go back.
The delay Herbert had on this module was partly my own choice. Mamba-3 was new to me. So I had written the simplest version, the one that updates the summary token by token. Before going fast, I wanted to be sure my kernels computed correctly.
To understand what the other engines do, take a bank statement with 8,000 lines. To know the balance at each line, the simple way is to start from the previous balance and add the transaction, line after line. It works, but nobody can help you: each line waits for the one before. The other way is to cut the statement into pages, have all the pages computed at the same time, then carry each page's total over to the next. Each page is computed without knowing the starting balance. When all the pages are ready, all that is left is to carry over the balances of the previous pages. A graphics card is thousands of compute units waiting for exactly that. And inside a page, the computation can be written as a multiplication of tables of numbers, which recent cards do with dedicated circuits.
On the NVIDIA card, I also had another problem. I measured it on the Mac too, and it probably affects Vulkan: reading the experts.
For the experts, it is a story of round trips. The model has 256 experts and each token consults only 6 of them. Herbert cut the prompt into batches of 512 tokens and, for each batch, it went back to read the experts from memory. vLLM uses batches of 2,000 tokens, so four times fewer round trips. It is like going to the library to fetch your books for every page of your homework, instead of going once for the whole chapter.
So I did as they do, part by part: I took their way of splitting the work, but with my own code. And that is where the hardware and its drivers impose constraints on us.
Because computing by pages, as multiplications of tables, requires dedicated circuits. The NVIDIA card has them. The AMD card, an RX 9060 XT, has them too, in tiles of 16 by 16. The graphics chip of an Intel laptop, the Arc 140V, also has them, but in tiles of 8 rows. For the same computation, we therefore have three different ways of splitting it up.
But the hardware has its physical limits and the driver adds more. A graphics card works in teams of compute units. Each team has a small shared workbench, a very fast memory where it puts what it uses in common. For the attention, that is where you put a batch of past tokens, so the whole team can compare them with the current token without fetching them again from the card's memory, which is much slower. The smaller the workbench, the fewer tokens you can put on it at once.
Under Windows, the AMD driver limits this workbench to 32 kilobytes. My first version of the new attention asked for 57. Herbert saw it at load time, wrote it in one line of its log, and went back to the old kernel. The measurement ran anyway, with the old kernel. I started the measurement calmly, but the number didn't move. I didn't understand. At first it annoyed me, then I thought: this can't be, my kernel is useless. It was when I opened the log that I understood it had never run. I looked for the reason, until I realized the driver returned no error. And that error was exactly what I was counting on. That is a bit the spirit of Vulkan. And I hate that. I prefer everything to stop right away, so that I understand, especially while I am developing. It was the profile that showed it to me. I could have avoided it: the driver announces its limit. I just had to read it before designing the kernel. I rewrote it in smaller tiles, which fit in 32 kilobytes. Since then, Herbert no longer falls back silently. When I ask it for a specific kernel and it doesn't fit, it refuses to start and says why. When it is the one choosing, it tries the kernel at load time on small computations whose result it knows. If the kernel doesn't give the right answer, Herbert takes the old one and says so plainly. That is exactly what happened on a friend's AMD card, an RX 7900 XTX, whose driver doesn't offer matrices in bf16.
Still under Windows, the Intel driver doesn't offer matrix multiplications in bf16, whereas under Linux, on the same chip, it does. It only offers f16. And f16 can't write a number larger than 65,504, roughly 65,000: beyond that, it is like a calculator that shows "error". And Olala needs to pass values up to 3 × 10^16 through some matrices, that is, a 3 followed by 16 zeros.
So I divided the values by a power of 2 so they fit in f16, did the multiplication, then put the result back to its scale. A floating-point number is digits and an exponent. Dividing by a power of 2 only touches the exponent: as long as the scaled number stays exactly representable in f16, it keeps all its digits.
But there is a trap. If you divide everything by a large power of 2 to make a giant number fit, the small numbers in the same row become too small for f16 and it rounds them to zero. My first two versions had this flaw: a test that mixes a giant value with small ones failed, up to 6,000 times beyond its tolerance. The third version puts these small numbers in a second f16 matrix, with its own power of 2. You multiply both matrices and add the results. That way, all the numbers stay exact, except for an extreme spread within a single row. The third version keeps all the numbers exact, the second is about 10% faster. I kept both, as options: by default, under Windows, Herbert keeps the old computation, without the matrix circuits.
The gains, too, depend on the hardware.
On the AMD card, the new attention, the one that uses the matrix circuits, reads a 32,000-token prompt almost 3 times faster: 2,100 tokens per second instead of 750. With all the rest of the work, we are now at 3,300. The old one did the same computation with the card's ordinary compute units. And the gain grows with length, because attention compares each token with all those before it: on the last block of the prompt, it goes from 790 to 130 milliseconds. The results are not bit-identical, so I did the second check. The gap to the reference didn't move and the tool test shows no significant difference.
On the NVIDIA card, I separated the experts from the rest. The prompt goes through the other parts of the model in batches of 512 tokens, as before, but the experts go through the whole prompt in one pass. They are now read only once. On an 8,000-token prompt, their time goes from 285 to 50 milliseconds. And here the results are bit-identical, so there is nothing else to check. By default, Herbert now uses batches of 2,000 tokens, like vLLM. The experts take a little more time there, 93 milliseconds, but the rest of the model works better on large batches, so the whole prompt is read faster.
On the Intel Arc graphics chip, updating Mamba-3's summary by pages, on its matrix circuits, takes the reading of a 2,000-token prompt from 700 to 880 tokens per second. With all the rest of the work, we are now at 1,160. This time the bits change. The gap to the reference stays at the level of the rest and the tool test shows no significant difference. The exact numbers are in the article. And while checking quality on this card, I found a setting to change: the Arc kept the attention cache keys in 8 bits. In 16 bits, the answers are closer to the CUDA engine on 51 prompts out of 52. A 32,000-token prompt is even read 1.7 times faster. Writing, on the other hand, is 7% slower at that size. That is the new default.
And for the Intel driver's sine and cosine, which I told you about in the previous issue, it is the same under Windows. At load time, Herbert measures the driver's error: 3 hundred-thousandths, 32 times more than the limit I set myself. So it takes my own computation, two hundred times more precise.
On the Mac, I took the way MLX updates Mamba-3's summary: by pages of 4 tokens, keeping the summary in the registers, the fastest memory on the chip, from the start to the end of the block. The prompt was read 8 to 22% faster and the tool test score barely moved. Yet at first I turned this lead down, even though it was faster. Because the number of answers cut off mid-reasoning, the ones that hit the 2,048-token limit before answering, went from 18 to 32 on average, over 5 runs. That was not acceptable.
I looked for a bug in the kernel. I didn't find one. So I built a control: the old computation, where I only change the order of the additions. Nothing else. It too cut off more answers: 27 instead of 18. Changing the order of the additions is enough to tip answers over.
Why? Before writing a token, the model gives a score to each possible token and takes the best one. Where the answers fork, the top two had scores separated by 0.001 to 0.27. To give you the scale, across all the tokens written, fewer than 2% have a gap as small as 0.05. As with token 18 in the previous issue, these are near-ties, which a different rounding tips over.
There was still a gap specific to the new form: the rotation angles of layer 23. Mamba-3's summary rotates by an angle at every token. On this layer, a single token can rotate it by several dozen turns. MLX's form adds up these angles over 32 tokens in a row without ever bringing them back between minus pi and plus pi. Mathematically, it is the same angle. In floating point, it is not: the larger the number, the fewer digits are left after the decimal point, so the angle loses precision.
I have run into this kind of problem before. In 1999, at Sextant Avionique, now Thales, I wrote trigonometry libraries for the European Space Agency's ERC32 processor, with only addition, subtraction, and multiplication. No division.
So I brought each angle back between minus pi and plus pi before adding them up. In speed, it costs nothing. I also tried a more careful way of doing this wrap, because 2 pi can't be represented exactly in floating point. It changes nothing in the error, because the error is born earlier: when the engine computes each token's angle, before it is even wrapped. So I redid 5 runs of the tool test, with and without the wrap. Without the wrap, the new form cuts off 32 answers on average. With the wrap, 27, as many as the control. The difference between the two is not significant, so I can't say that the wrap lowers the cut-offs. What I can say is that with the wrap, the new form doesn't cut off more answers than a simple change in the order of the additions. It passed the second check and it became the default on the Mac, in 16 as in 4 bits.
And the CPU? The x86 processors in my machines don't have these matrix compute circuits. It is coming: Intel already has them on its Xeons, and AMD is preparing with Intel a common extension, built on AVX10, which should arrive with Zen 7. Zen 6 already brings new instructions, including f16 computation. And my M5 Mac already has these circuits in its CPU. I am starting to use them. For reading the prompt in 16 bits, the measurements go up to 1.6 times faster, especially on large matrices. The bits change, so I put it through the tool test: 276 questions passed against 283 out of 350, with no significant difference. It is still an option, not the default.
For now, current processors have instructions that can compute on 16 numbers at once with AVX-512, 8 with AVX2. I rewrote the Mamba-3 and rotation kernels in both instruction sets, without changing a single bit of the result. And the gap between the two is huge: on the same Ryzen 9 9900X, if I turn off AVX-512, reading a prompt is a quarter to a third slower. AVX-512 even has an instruction that directly multiplies numbers in bf16. It speeds up the computation by another 5 to 14%, but it rounds differently, so the results differ bit for bit, and I measured its gap to the reference: it stays in the same class as the others. So Herbert uses it by default on processors that have it.
And as I have been reminding you since the start of this series, when writing on the CPU, it is no longer the computation that limits, it is the memory, and more precisely the speed at which the processor can read its contents: the bandwidth. Herbert and OVH's version of Llama.cpp both read memory at 41 to 45 gigabytes per second, the machine's ceiling.
The one that goes fastest is the one that reads the fewest bytes per token. And on a Ryzen 7 5700G, which only has AVX2, with the same number of threads, Herbert reads prompts 1.4 to 1.5 times faster than OVH's version in its best setting, up to 2,000 tokens. The gap narrows with length: at 32,000 tokens, it reads only 7% faster. But at that size, it writes almost 3 times faster. On this processor, my last change alone, bigger blocks for Mamba-3 and an attention split into tiles, speeds up prompt reading by 31 to 42%. This time the bits change, so I measured the gap to the reference: it stays in the same class as the others.
And on the CPU too, speed is worth nothing if the answer changes. I put Olala through the tool test on my CPU engine, in 4 bits. It passed only 48 questions out of 100, whereas the NVIDIA card passed 68. For example, it wrote numbers between quotes, like text.
The engine had no bug. It was my 4-bit recipe on the CPU, different from the graphics cards' recipe on two points: the way the scale of each small block of numbers is chosen, and two families of matrices I had put in 4 bits even though they can't take it. I aligned the recipe with the graphics cards' one. Result: 75 out of 100.
But it comes at a price: prompt reading is 15% slower, writing 3% slower, and the model takes more than twice as much memory, 11.7 gigabytes instead of 5.2. I chose quality.
So, where are we?
On the NVIDIA card, the server's prompt reading went from less than half of vLLM's speed to the same speed, or a little more, from 327 to 32,000 tokens. On short prompts in 4 bits, Herbert goes up to 26% faster. Against OVH's version of Llama.cpp, on the same card, it reads the prompt up to 7.9 times faster, in 16 bits as in 4 bits. In 4 bits, it passes fewer questions on the tool test than their 6-bit version, 290 against 327 out of 400. That is expected: the more you quantize, the further you get from the original model. When writing, in 16 bits, we are between 68 and 80% of vLLM. I haven't profiled it yet: I don't know yet what widens this gap. In 4 bits, Herbert writes 6 to 13% faster than vLLM up to 8,000 tokens, but not yet on longer prompts.
And all these numbers are one request at a time. Herbert's server handles requests one after the other, in order of arrival. vLLM is built to serve dozens at the same time. I started measuring it on a data center card, an H200: with 64 requests at the same time, Herbert stays at 220 to 230 tokens per second in total, since it serves them one by one. These measurements come from a work-in-progress version. I will come back to it, because it is my next project and it is already planned.
On the Mac Studio, I took MLX's computation forms for the attention and for Mamba-3. Now, as a server and one request at a time, Herbert reads prompts 7 to 41% faster than MLX's server in 16 bits. It also writes 9 to 12% faster. From the command line, MLX's writing stays a little ahead in 16 bits, by 4 to 6%, except on the longest prompts. On my M5, it is more mixed: in 4 bits, Herbert reads long prompts up to a third slower than MLX. I don't know why yet.
On the AMD and Intel cards, OVH has no engine to compare with: their version of Llama.cpp doesn't work on Vulkan. But I can compare Herbert with itself. The same NVIDIA card runs Herbert on CUDA and on Vulkan: the gap between the two tells what Vulkan costs me with my code as it is today, and so what I can hope for on AMD and Intel. On the same RTX 4080, at the start of this work, Vulkan read an 8,000-token prompt at less than a third of CUDA's speed. Today, it is almost at two thirds.
To check that Herbert uses tools properly, I asked it the 2,551 questions of a function-calling test, BFCL. vLLM, in OVH's version, got exactly the same ones. In 16 bits, Herbert passes 68%, vLLM 66%. The gap is small: I say Herbert is at vLLM's level, not better. In 4 bits, Herbert drops to 63%. So 4 bits costs about 5 points on this test. That is the price of speed. I would rather say it.
There is one thing this model makes possible and that I added to Herbert. In a conversation, at each new message, the engine rereads the whole conversation before writing the first word. With an agent that calls tools, it is at every round trip. On the Mac, with a 30,000-token conversation, that means 11 seconds of waiting before the answer starts.
But the Mamba-3 layers keep a fixed-size summary: 49 megabytes, whatever the length of the conversation. The 7 attention layers keep their cache as usual. Herbert saves this summary at the end of an answer and picks it up at the next message, instead of rereading everything. The 11 seconds become barely more than a tenth of a second. On the NVIDIA card, it is the same: at 30,000 tokens, in 16 bits, 2 seconds of waiting become 34 milliseconds. The answer is not bit-identical, but it stays very close: the model makes the same first choice in 99% of cases.
In one week, when reading the prompt and one request at a time, Herbert went from less than half of vLLM's speed to the same speed. Against OVH's version of Llama.cpp, it goes up to 7.9 times faster, on their own model. None of these gains comes from a shortcut: every lead was written, measured, then checked bit for bit or against the reference. There is still work to do: writing in 16 bits, Vulkan, and above all serving several people at the same time. But the foundation is there. Every gain I show you gives the same bits as before, or else I measured its gap to the reference. The tool test dates from the previous versions: I haven't redone it on the published version. Everything else is in the article: the tables, the commands, the measurement logs. And the code is published: you can replay the commands from the tables at home.
Where we are
Server against server, RTX 4080, 16 bits, Herbert's prefill relative to vLLM's, step by step:
| Step | 2,048 | 8,192 | 32,640 |
|---|---|---|---|
| November 22 commit | 0.37 | 0.36 | 0.38 |
| Scan, attention, and default block | 0.62 | 0.61 | 0.68 |
| Scan in two kernels, SSD output at 128 registers | 0.73 | 0.71 | 0.76 |
| GEMM in 128 tiles, router, lm_head | 0.80 | 0.78 | 0.81 |
November 25 commit (1bdf00b) | 0.93 | 0.91 | 0.92 |
Published commit (53862d4, measured on 2f36c56, same bits): attention block table, decoupled MoE group, --q4 experts decoded once, router in two pieces, scan in slices of 128 | 1.00 | 1.11 | 1.05 |
On the published commit (53862d4; measured on 2f36c56, same bits), server against server, one request at a time, vLLM 0.33.0, RTX 4080, median of three interleaved rounds (spread between rounds: 1.6% at most for vLLM, 0.6% for Herbert), in tokens per second:
| Prompt | 327 | 512 | 2,048 | 8,192 | 32,640 |
|---|---|---|---|---|---|
| Prefill vLLM | 8,946 | 11,788 | 22,213 | 20,662 | 14,090 |
| Prefill Herbert 16 bits | 9,555 (1.07) | 12,405 (1.05) | 22,297 (1.00) | 23,030 (1.11) | 14,828 (1.05) |
Prefill Herbert --q4 | 11,306 (1.26) | 14,586 (1.24) | 22,466 (1.01) | 21,920 (1.06) | 14,711 (1.04) |
| Decode vLLM | 213.8 | 213.0 | 206.6 | 198.0 | 174.5 |
| Decode Herbert 16 bits | 164.5 (0.77) | 166.4 (0.78) | 165.2 (0.80) | 152.7 (0.77) | 118.1 (0.68) |
Decode Herbert --q4 | 232.3 (1.09) | 236.1 (1.11) | 233.3 (1.13) | 209.6 (1.06) | 149.2 (0.86) |
In parentheses, the ratio to vLLM. vLLM has no --q4: Herbert's --q4 is compared with vLLM's 16 bits. At 2,048 tokens, Herbert is level with vLLM, not ahead: 91.9 ms before the first token in 16 bits, 91.2 in --q4, 92.2 for vLLM. Writing in 16 bits stays below vLLM at every size, from 0.68 to 0.80. This gap is not profiled yet. In --q4, it drops below vLLM at 32,640 tokens (0.86).
Mac Studio M3 Ultra, command line, Herbert relative to MLX, at lengths 512 / 2,048 / 8,192 / 32,640. Published binary + metal-007draws branch, options off, same bits as the published default, median of 3 rounds.
| Prefill | Decode | |
|---|---|---|
| 16 bits against MLX bf16 | +57.7 / +22.5 / +15.4 / +7.0% | −3.9 / −3.9 / −5.7 / +1.1% |
--q4 against MLX q4e8 | +25.0 / +5.5 / +2.3 / −0.1% | +2.7 / +0.9 / +1.1 / +6.2% |
--q4 against MLX q5e6 | +24.7 / +6.5 / +3.5 / +0.7% | −5.0 / −6.2 / −5.1 / +2.5% |
Server against mlx_lm.server, one request at a time, Mac Studio, same lengths, Herbert's gap on MLX's "single" path:
| Prefill | Decode | |
|---|---|---|
| 16 bits against MLX bf16 | +41.3 / +23.1 / +15.2 / +7.1% | +12.3 / +9.6 / +10.9 / +9.5% |
--q4 against MLX q4e8 | +20.2 / +6.3 / +2.3 / −0.1% | +26.8 / +22.2 / +24.5 / +18.6% |
MLX's "batch" path reads long prompts much more slowly (1,023 tokens/s at 32,640 in bf16, against 2,466 on "single"): against it, Herbert's gap rises to +158%. I keep the "single" path, the faster of the two for a single request. MLX's server writes more slowly than its command line (156 against 195 tokens/s at 512 in bf16), which explains why the decode gap changes sign between the two tables. Peak memory at 32,640: Herbert 16.18 GB in bf16 and 8.37 GB in --q4, MLX 16.33 GB and 7.86 GB.
Mac M5 (MacBook), command line, same lengths. The gaps vary by up to 9% from one round to the next, against less than 3% on the Studio.
| Prefill | Decode | |
|---|---|---|
| 16 bits against MLX bf16 | +24.8 / −4.8 / −5.7 / −3.3% | −0.9 / +1.7 / −0.6 / −4.4% |
--q4 against MLX q4e8 | −1.1 / −33.6 / −27.3 / −14.9% | +6.3 / +16.2 / +9.8 / −11.5% |
On the M5, Herbert's --q4 prefill is clearly behind MLX's from 2,048 tokens on, whereas it is level on the Studio. I don't have an explanation yet.
CPU, Ryzen 7 5700G, Herbert against OVH's version of Llama.cpp: see the table in the CPU section.
RTX 4080, server against server, one request at a time, Herbert against OVH's version of Llama.cpp in its best setting (q6_k, -ctxcp 0), same messages, published commit (53862d4; measured on 2f36c56, same bits), median of three interleaved rounds, spread between rounds under 1%, Herbert's ratio to OVH:
| Prompt | 327 | 512 | 2,048 | 8,192 | 32,640 |
|---|---|---|---|---|---|
| Prefill Herbert CUDA 16 bits | ×5.11 | ×5.18 | ×7.88 | ×7.89 | ×5.36 |
| Decode Herbert CUDA 16 bits | ×1.12 | ×1.13 | ×1.15 | ×1.13 | ×1.06 |
Prefill Herbert CUDA --q4 | ×6.01 | ×6.02 | ×7.93 | ×7.50 | ×5.31 |
Decode Herbert CUDA --q4 | ×1.57 | ×1.60 | ×1.61 | ×1.54 | ×1.34 |
Prefill Herbert Vulkan --q4 | ×3.68 | ×3.71 | ×5.28 | ×4.87 | ×3.13 |
Decode Herbert Vulkan --q4 | ×1.10 | ×1.08 | ×1.13 | ×1.06 | ×0.97 |
At 2,048 tokens, in this series interleaved with OVH's version, Herbert CUDA 16 bits reads 21,793 tokens/s (22,297 in the series against vLLM, 22,000 from the command line) and writes 162.9; Herbert Vulkan --q4 reads 14,595 and writes 160.8 (Vulkan --q4 at the five sizes: 6,637 / 8,650 / 14,595 / 14,041 / 8,538). OVH's version reads 1,808 / 2,332 / 2,763 / 2,877 / 2,725 tokens/s and writes 145.3 / 144.9 / 142.1 / 133.9 / 110.1 (remeasured on November 27, within 0.4%). With its default setting, it reads even more slowly, 764 / 1,118 / 1,992 / 2,620 / 2,665 tokens/s; it writes as with -ctxcp 0. I have not profiled OVH's version: I don't know yet what slows its prefill down so much on this card. Herbert CUDA 16 bits' prefill is then ×12.1 / ×10.8 / ×10.9 / ×8.7 / ×5.5 its own, Herbert Vulkan --q4's ×8.7 / ×7.7 / ×7.3 / ×5.4 / ×3.2.
Quality, on the same 400 questions of BFCL simple_python: OVH's version in q6_k passes 327, Herbert 16 bits 320 (p = 0.43), Herbert --q4 290 (p < 0.0001), scores measured on 1bdf00b. Herbert's 16-bit prefill is therefore 5 to 7 times faster, with no significant difference on this test. The --q4 reads at about the same speed as the 16 bits and writes faster, but it passes 37 fewer questions on this test. On the irrelevance category (240 questions), all four are at the same level: 219 for OVH, 223 and 222 for Herbert, 222 for vLLM.
RX 9060 XT and Arc 140V: OVH's version of Llama.cpp doesn't work on Vulkan. To place what Vulkan costs, Herbert Vulkan against Herbert CUDA on the same RTX 4080, published commit, each engine with its defaults, command line, median of 3, driver shader cache specific to each binary and primed by a first pass. Vulkan / CUDA ratio:
| 512 | 2,048 | 8,192 | 32,640 | |
|---|---|---|---|---|
Prefill --q4 | 0.66 | 0.67 | 0.65 | 0.58 |
| Prefill 16 bits | 0.67 | 0.69 | 0.63 | 0.56 |
Decode --q4 | 0.77 | 0.76 | 0.74 | 0.76 |
| Decode 16 bits | 0.89 | 0.89 | 0.87 | 0.86 |
In tokens/s, prefill / decode, at 512 / 2,048 / 8,192 / 32,640: CUDA 16 bits 11,774 / 151.0, 22,000 / 150.0, 22,755 / 139.3, 14,578 / 109.4; CUDA --q4 13,673 / 206.6, 22,058 / 205.2, 21,746 / 186.4, 14,502 / 136.2; Vulkan 16 bits 7,900 / 134.3, 15,100 / 133.9, 14,339 / 120.8, 8,144 / 94.1; Vulkan --q4 8,968 / 158.8, 14,886 / 156.5, 14,039 / 138.6, 8,448 / 104.0. At the start of this work, Vulkan's --q4 prefill was at 0.29 of CUDA at 8,192; it is at 0.65.
The speeds of the RX 9060 XT and the Arc 140V with the published commit's defaults are in #007.2.
One request at a time: Herbert's server serves requests in order of arrival, without batching them. On an H200, with 64 requests at the same time, the total throughput stays around 220 to 230 tokens per second, without errors. This measurement comes from a work-in-progress version (earlier than the published commit): serving several requests is the next project.
Resuming a conversation without rereading everything
Option --state-snapshot. Herbert copies the state of the 29 Mamba-3 layers and what the 7 attention layers carry over from one block to the next: 49,041,408 bytes, whatever the length. The copy takes 0.8 ms on the Mac; the restore is bit-exact.
Mac Studio M3 Ultra, delay before the first token of the next turn, in 16 bits:
| Conversation | Without | With |
|---|---|---|
| 2,300 tokens | 433 ms | 44.5 ms |
| 8,000 tokens | 1,734 ms | 58 ms |
| 30,000 tokens | 10,841 ms | 110 ms |
| One tool round trip, ~1,100 tokens | 199 ms | 57 ms |
Fidelity, on 8 conversations with tools of 3 to 5 turns: KL at turn N against a full prefill 0.00121 in 16 bits and 0.00143 in --q4, same first choice in 98.9% and 98.5% of cases. The reference is reread in blocks of 2,048, like the server: the turns that are not resumed then give exactly the same bits. This table was measured on commit 99d8321, whose Metal code is that of the published commit, as a median of 3 interleaved rounds.
RTX 4080, 30,000-token conversation, 16 bits, published commit (53862d4; CUDA measured on 2f36c56, Vulkan on 2777319, same bits), a fresh server per arm and per round, three rounds, prompt reading time at the second turn, KL on the first 64 positions:
| Engine | Without | With | KL |
|---|---|---|---|
| CUDA | 2,029 ms | 33.7 ms | 0.00141 |
| Vulkan | 3,490 ms | 44.8 ms | 0.00151 |
Same first choice in 99.00% of positions on CUDA and 98.75% on Vulkan. The KLs don't cover exactly the same turns (36 on CUDA, 38 on Vulkan, out of 40 possible): some conversations stop before the fifth turn, not at the same point depending on the engine. So they can't be compared finely with each other; each stays in the class. The turns that are not resumed give exactly the same bits as the reference.
Logs: 2026-11-23-olala-impl-mt-snapshot, 2026-11-24-olala-mt-snapshot-gpu, 2026-11-26-olala-campagne-article.
The limits
CUDA's bits on long prompts depend on free memory. On CUDA, Herbert runs the experts on a group of rows as large as the card's memory allows at load time. On a prompt longer than this group, the bits change: at 8,192 tokens in --q4, the full group gives one md5 fingerprint (927b72da), a group trimmed to 4,096 rows another (74ef888f). In 16 bits, the bits don't depend on the group (28a494c1 everywhere): it is decoding the --q4 experts once per group that makes the difference. Another application open on the card is enough to trim the group. Both stay in the quality class, but not bit for bit. The load log gives the group chosen. A variant gives the same bits whatever the group, with no significant difference in quality, but it reads --q4 prompts of 8,192 tokens and more 1.4 to 2.1% more slowly: it remains an option (HERBERT_OLALA_EXDEC_Q=1).
The conditions. Herbert at published commit 53862d4, vLLM 0.33.0 (OVH's version), MLX 0.32.3 with OVH's port 58083ca0, OVH's version of Llama.cpp 55c22dca. One request at a time, everywhere: Herbert's server doesn't batch requests yet, whereas vLLM is built for that. Greedy decoding (the most probable token at each step). Medians of three interleaved rounds, unless stated otherwise.
Quality. The checks in this article are md5 fingerprints of the logits when a lead doesn't change the bits; a gap to the reference (KL) on 16 long prompts and 12 to 36 short ones when it does. The BFCL tool test was not redone on the published commit: its scores come from the previous commits. Other checks will come if they are needed.
What is not measured here. Several requests at the same time on the published commit, energy consumption, data center cards beyond the H200 and the RTX 6000 Ada of November 23. The M5 is not in the Mac tables.
These numbers hold at the time this article is published: engines evolve, and some may no longer be true when you read this.
Reproducing it at home
The code is published at github.com/xigh/herbert-olala: four programs, herbert-olala-cuda, -vulkan, -metal, and -cpu, which read the bf16 weights published by OVH as they are.
hf download OVHaiLLM/Olala-v1.0-mini-7A1B --local-dir ~/models/Olala-v1.0-mini-7A1B M=~/models/Olala-v1.0-mini-7A1B (cd cuda && cargo build --release) cuda/target/release/herbert-olala-cuda $M --ids inputs/p512.json --gen 129 --block 512 --ctx 1024 --warm --q4 cuda/target/release/herbert-olala-cuda serve $M --q4 --port 8080
The same exists for Vulkan (--device nvidia, amd, or intel), Metal, and the CPU. The server speaks the OpenAI API, tool calls included. The README gives, machine by machine, the md5 fingerprint of the logits that the command above should produce: if your build gives the same one, it computes exactly what I measured. The commands for each table are in the README, the measurement scripts in scripts/.
What's next
The next project is the one vLLM already does: serving several requests at the same time, by batching them. I will measure it on rented data center cards. The second is already written and checked, on a separate branch: keeping a conversation's state on disk, at the end of the system prompt and of each turn, so that what has already been read is never reread. On all four engines, rereading gives exactly the bits of the computation. Then will come the harnesses, what runs a model in a tool loop, then the CUDA, Vulkan, and Metal engines in 4 bits for the other models, which Herbert already partly does for Olala. Part of this week's work really is specific to Olala, like everything that touches Mamba-3. For the rest, I want to believe the gains will also help the other models. I will measure it in the coming weeks.
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