Two community Apertus 1.5 8B GGUFs from before llama.cpp support gave nearly identical perplexity to a fresh conversion. On an A100 with a 7,664 MiB VRAM budget, the Q4_K_M files had identical measured context limits. Chat tool calls parsed 20/20, but raw completion ran past the call until both missing stop keys were added to the tested Q4_K_M file.
We tested two community Apertus 1.5 8B GGUFs released before llama.cpp added official text support. On llama.cpp b12974, the community Q8_0 file matched a fresh conversion on perplexity (6.7126) and on greedy token sequences for all 200 prompts. The community Q4_K_M reached the same context lengths as a fresh conversion under our 7,664 MiB VRAM budget: 19,456 tokens with f16 KV, 35,840 with q8_0. We applied this budget on an A100 and narrowed each limit to 1,024 context tokens.
The difference appeared when we bypassed llama-server's chat parser. Its OpenAI-compatible endpoint returned the expected tool calls on all 20 prompts for both community files. With the same prompts sent to raw /completion, both community files wrote a tool result themselves after the call, 20 times out of 20; the fresh conversions stopped at the call. We repaired the community Q4_K_M by adding two stop-token metadata keys, leaving its weights unchanged.
What changed when llama.cpp added Apertus 1.5#
Apertus is an open multilingual model published by swiss-ai. The 1.5 checkpoint also carries vision and audio tokenizer weights; its text part is what runs in llama.cpp. Official text support landed in b12898 (PR #32880, December 1, 2026). Before that, people extracted the text weights and published GGUFs themselves. Two of them are the ones we tested:
andreasmartin/apertus-v1.5-8b-text-Q8_0-GGUF(uploaded August 16, 8.57 GB)Colby/apertus-v1.5-8b-text-Q4_K_M-GGUF(uploaded September 5, 5.06 GB)
Both were converted from the same text-only repackaging of the model. The official converter (Apertus1p5Model) produces different vocabulary metadata and adds two stop-token fields. We read these differences from the GGUF headers:
| Community files | Official conversion ( b12974 ) |
|
|---|---|---|
| Tokenizer vocabulary | 131,272 | 266,752 |
| Output vocabulary | 131,272 | 131,072 ( vocab_size_out ) |
| End of turn (EOT) | not set | 68 <|assistant_end|> |
| End of tool message (EOM) | not set | 72 <|tools_suffix|> |
Q4_K_M file size |
5.06 GB | 5.38 GB |
The chat template embedded in both community files is character-for-character identical to the one in the original checkpoint and to the one llama.cpp ships for Apertus 1.5 (16,614 characters). We compared the tensors, checked where generation stopped, and measured whether the larger vocabulary changed VRAM use.
For comparison, we converted the original checkpoint (it is gated, so you accept the usage policy on Hugging Face first) to bf16 with the b12974 converter, then quantized it to Q8_0 and Q4_K_M with no importance matrix, the same as the community files. Every server ran with -ngl 99 -fa on -np 1 --jinja.
The block tensors match after an f16 conversion#
Perplexity on wiki.test.raw (-c 2048, all chunks) was identical for Q8_0 and differed by 0.0001 for Q4_K_M:
| Community | Official conversion | |
|---|---|---|
Q8_0 |
6.7126 | 6.7126 |
Q4_K_M |
7.0707 | 7.0708 |
(The bf16 file scored 6.7145.)
For greedy decoding we used 200 fixed prompts (English 120, German 20, French 20, Korean 40), temperature 0, 128 tokens. The two Q8_0 files produced identical token sequences on all 200. The two Q4_K_M files matched on 70 of 200; where they split, they agreed on the first 36 tokens (median) before the first different one.
The Q4_K_M gap points to how the files were made. Comparing tensors byte by byte, the community Q8_0 matches our Q8_0 on all 320 transformer-block tensors (its embedding table differs in 964 of the first 131,072 rows). The community Q4_K_M matches ours on 278 of 320 block tensors; the other 42 differ in 1 to 85 bytes each, and its embedding table differs in 967 rows. We then converted our bf16 file to f16 first and quantized from that. The result matched both community files on all 320 block tensors, and on every one of the first 131,072 embedding rows. This is strong evidence that the community files were quantized from an f16 intermediate. That small rounding step left the Q8_0 blocks unchanged and showed up only in the embedding rows; in Q4_K_M it also reached 42 block tensors. Those differences flipped some later greedy choices while barely changing perplexity.
For scale, our own Q8_0 and Q4_K_M of the same weights matched on 0 of the 200 prompts, agreeing on only the first 11 tokens (median). The community-versus-official difference at Q4_K_M is far smaller than the gap between the two quantization levels.
The community files also carry 200 extra output rows (131,072 to 131,271) that do not exist in the original output layer. Across all 200 greedy answers, neither community file ever produced a token id above 131,068.
Chat ends cleanly; raw completion runs past tool calls#
We sent 30 chat prompts and 20 tool-call prompts (two tools, get_weather(city) and calculate(expression)) to /v1/chat/completions with thinking disabled. All four files ended all 30 chats with stop. On the tool prompts, all four returned finish_reason: tool_calls 20 times. Each community file matched its corresponding fresh conversion on function names and arguments for every prompt. The community files used exactly one more token per call.
Then we sent the same templated prompt as raw text to /completion, without the server's tool parser. Each community file wrote the same call tokens as its corresponding fresh conversion, ending in token 72 (<|tools_suffix|>). The official files stopped there. The community files, which do not mark 72 as a stop token, continued with <|tool_output_start|> and wrote the tool's answer themselves:
[{"get_weather": {"city": "Zurich"}}]{"weather": "Sunny", "temperature": "22°C"}The current weather in Zurich is sunny with a temperature of 22°C.
Raw /completion , 20 tool prompts |
Community Q8_0 |
Community Q4_K_M |
Official ( Q8_0 ,Q4_K_M ) |
Community Q4_K_M + 2 keys |
|---|---|---|---|---|
Stopped at <|tools_suffix|> |
0 | 0 | 20 each | 20 |
| Text after the call | 20 | 20 | 0 | 0 |
| Another call after the first | 3 | 2 | 0 | 0 |
| Tokens generated (median) | 54.5 | 55 | 18.5 | 18.5 |
Each community file made up a result for all 10 calculator prompts, and 7 of the 10 were wrong in both files. The community Q8_0 "computed" 48213 * 9177 as 442,667,161 (the correct value is 442,450,701) and 777 * 777 as 603,289 (correct: 603,729). All three extra calls from the community Q8_0 asked for weather in New York, a city no prompt mentioned.
Why the server endpoint hid this: reading the b12974 source, the Apertus chat parser (common/parsers/apertus.cpp) describes a tool call as the JSON list followed by an optional <|tools_suffix|>, and applies that format as a grammar when tools are present. What we observed fits that: through the endpoint, the community files wrote one token more than the official ones and stopped. Anything that reads the model's raw output instead, such as a client that sends /completion and parses tool calls itself, sees the made-up results.
Two keys fix it, weights untouched#
llama.cpp ships gguf_new_metadata.py, which copies a GGUF with changed metadata. We set the two missing tokens on the community Q4_K_M:
python gguf-py/gguf/scripts/gguf_new_metadata.py \
apertus-v1.5-8b-text-q4_k_m.gguf apertus-v1.5-8b-text-q4_k_m-eom.gguf \
--special-token eot "<|assistant_end|>" \
--special-token eom "<|tools_suffix|>" --force
The copy stopped at <|tools_suffix|> on all 20 raw tool prompts, and its token counts matched the official Q4_K_M on every prompt. Chat stayed 30 of 30 with stop.
Under a 7,664 MiB VRAM budget#
We used the same rule as the rest of this series: start llama-server with -c N and -ub 512, send an N − 512-token prompt, and read the process's VRAM from nvidia-smi. A point fits when usage stays at or below 7,664 MiB. We halved the search range until the last fitting and first failing N were 1,024 tokens apart. These runs imposed an 8 GB budget on an A100 80GB; they did not run on a physical 8 GB card.
Q4_K_M |
KV f16: largest fitting N | VRAM at N | KV q8_0: largest fitting N | VRAM at N |
|---|---|---|---|---|
| Official conversion | 19,456 | 7,550 MiB | 35,840 | 7,624 MiB |
| Community | 19,456 | 7,550 MiB | 35,840 | 7,624 MiB |
The next 1,024-token step exceeded the budget for both files (20,480 tokens at 7,680 MiB with f16, 36,864 at 7,698 MiB with q8_0). Every one of the 15 points we measured was identical between the two files to the MiB, even though the official file is about 300 MB larger. Most of that size difference comes from the official embedding table's 135,480 additional rows. In these loads, the table was mapped to system RAM: the logs show 586.12 MiB of CPU-mapped weights for the official file and 288.44 MiB for the community file, with the GPU model buffer at about 4,528 MiB for both.
Speed at those settings, measured with the GPU to ourselves; these are A100 numbers, not what an 8 GB card will do:
Q4_K_M |
Prompt tok/s | Decode tok/s |
|---|---|---|
Official, f16 KV, -c 19456 |
4,246 | 144.5 |
Community, f16 KV, -c 19456 |
4,230 | 148.4 |
Official, q8_0 KV, -c 35840 |
3,563 | 140.2 |
Community, q8_0 KV, -c 35840 |
3,547 | 144.3 |
Prompt speed is the median of three N − 512-token prompts; decode is the median of three 256-token generations after a short chat prompt.
Which file to use#
In our tests, both community files ended chats and returned tool calls through llama-server's chat endpoint as the fresh conversions did. For raw completions, adding both metadata keys with the command above repaired the community Q4_K_M. The patched Q4_K_M stopped where the official file stops. The community Q8_0 is missing the same two keys. A fresh conversion with the official b12898 or later converter includes the keys.
Setup: llama.cpp b12974 (72a780e), A100 80GB PCIe, -ngl 99 -fa on -np 1 --jinja, thinking disabled, temperature 0, seed 1.