ai newsFr., 4. Dez.
EilmeldungGoogle veröffentlicht MedGemma 2: offenes medizinisches KI-Modell mit Tool Calling

llama.cpp v1.1.1 für Server-Betreiber: Checkpoint-Replay bei Temp 0 und neue Shell-Funktion

Acht Tage nach v1.1.0 ist llama.cpp in Version v1.1.1 erschienen. Von 203 Commits verändern nur etwa neun das Verhalten eines langlaufenden llama-server, darunter ein Fix für den Checkpoint-Restore bei Temperatur 0.

dev.toFreitag 09:32 · 04.12.DE7 Min. Lesezeit

Kurz zusammengefasst: llama.cpp v1.1.1 wurde am 04.12.2026 getaggt, acht Tage nach v1.1.0 (26.11.2026). Das Changelog listet 203 Commits auf, aber nur etwa neun davon verändern das Verhalten eines lange laufenden llama-server, und genau diese sollte ein Operator lesen. Es handelt sich um: eine Korrektur, sodass das Wiederherstellen eines Prompt-Checkpoints bei Temperatur 0 immer Fortschritte macht, die Wiederverwendung von Sliding-Window-SWA-KV-Zellen, die von mehreren Sequenzen geteilt werden, ein Budget an Graph-Knoten für die KV-Cache-Rotation, damit quantisierte K/V-Caches in den Scheduler passen, eine CORS-Änderung, die eine Liste erlaubter Origins mit dem anfragenden Origin beantwortet, Hintergrundtasks für das eingebaute Shell-Tool, eine RPC-Korrektur für einen veralteten Eintrag im Allocation-Size-Cache, eine Korrektur, die Response-Reader beim Terminieren entblockt, die Ablehnung des -sm-Tensors für Hadamard-gefaltete Modelle sowie die GGUF-Ablehnung von Keys und Tensor-Namen, die NUL-Bytes enthalten.

Dieser Beitrag sortiert die Änderungen in eine Triage-Reihenfolge, zeigt die Speicher-Arithmetik hinter den KV-Items (veranschaulichende Zahlen, entsprechend gekennzeichnet), liefert ein kleines Probe-Skript, das man gegen einen Staging-Server richten kann, und endet mit einer Checkliste. Die Fakten stammen aus den öffentlichen Release Notes und der Commit-Liste; die Zählungen sind meine eigene Auswertung, und Code sowie Berechnungen dienen nur der Veranschaulichung.

Die Release-Übersicht listet die Unterstützung neuer Modelle auf (Qwen4-35B-A3B, Amazon-FMR/Ergo als 1.1T-MoE mit MXFP4-Konvertierung, clef-omni, Apertus v1.5-Textunterstützung, MiniCPM5-MoE), eine Überarbeitung der Batch-API des Entscheidungsmodells in Pool-Spans und Attention-Scopes, Hintergrundtasks für das Shell-Tool in llama-server sowie ein Update von ggml auf v1.2.0. Zählt man die Commit-Betreffs nach Präfix, ergibt sich ein grobes Bild davon, wo der Aufwand floss (meine eigene Auswertung der 203 gelisteten Commits, gruppiert nach dem ersten Wort des Betreffs, also als Lesehilfe zu verstehen):

Wer eine einzelne CUDA-Maschine mit einer Handvoll Modellen betreibt, dem bleibt das meiste davon unsichtbar. Die Server-, KV-Cache- und RPC-Punkte sind es nicht.

Ich ordne die Punkte nach dem Symptom, das ein Bereitschaftsdienst-Ingenieur sehen würde, nicht nach Datei.

Fortschritt und Verfügbarkeit (selten, teuer):

Speicher- und Cache-Korrektheit (still, bis zur Lastspitze):

Netzwerk-Oberfläche (ein Konfigurationsproblem, kein Bug):

Die KV-Items spielen nur dann eine Rolle, wenn der Cache einen großen Teil Ihrer Speicherkosten ausmacht, deshalb lohnt es sich, die Arithmetik einmal durchzurechnen. Für eine Sequenz hält der Cache K und V für jede Schicht:

bytes = 2 x layers x kv_heads x head_dim x context x bytes_per_element

Das untenstehende Modell ist hypothetisch (48 Schichten, 8 KV-Heads, Head-Dimension 128) und wurde nur gewählt, um die Form der Kurve zu zeigen. Bytes pro Element betragen 2.0 für f16, 1.0625 für q8_0 (8.5 Bits) und 0.5625 für q4_0 (4.5 Bits).

# Veranschaulichend: KV-Cache in GiB für EINE Sequenz eines hypothetischen GQA-Modells LAYERS, KV_HEADS, HEAD_DIM = 48, 8, 128 BPE = { "f16": 2.0, "q8_0": 8.5 / 8, "q4_0": 4.5 / 8 } def kv_gib ( ctx, kind ): return 2 * LAYERS * KV_HEADS * HEAD_DIM * ctx * BPE [ kind ] / 2 ** 30 for ctx in ( 32_768, 65_536, 131_072 ): print ( ctx, { k: round ( kv_gib ( ctx, k ), 2 ) for k in BPE } ) Vollbildmodus öffnen Vollbildmodus beenden Für dieses hypothetische Modell ergibt sich 6.0 GiB bei 32K Tokens in f16, 12.0 GiB bei 64K und 24.0 GiB bei 128K, pro Sequenz. Vier parallele Slots bei 128K in f16 bräuchten allein für den Cache 96 GiB. Die Quantisierung von K und V auf q8_0 reduziert jeden Wert auf etwa 53 Prozent, q4_0 auf etwa 28 Prozent.

Genau deshalb quantisieren Menschen den Cache, und genau deshalb würde ein Budget-Bug für Graph-Knoten bei der KV-Cache-Rotation mit quantisiertem K/V zuerst bei den Konfigurationen auftauchen, die am meisten Speicher sparen.

Die SWA-Wiederverwendung wirkt in die andere Richtung: Sie verkleinert keine Schicht mit globaler Aufmerksamkeit, aber bei Modellen, die lokale und globale Schichten mischen, zählen Zellen, die für alle Sequenzen maskiert sind, nicht mehr gegen Sie. Wie viel das spart, hängt von Ihrer Fenstergröße und davon ab, wie viele Sequenzen sich ein Präfix teilen, messen Sie es also an Ihrem eigenen Modell, statt einer Zahl aus einem Beitrag zu vertrauen.

Meine Triage-Reihenfolge, nach how badly ein Verpassen wehtut und wie spät es auffällt. Es handelt sich um eine Einschätzung des Autors, nicht um eine Rangliste des Projekts.

Das folgende Skript verwendet nur die Standardbibliothek und Endpunkte, die in den Release Notes oder in der lang etablierten Server-API benannt sind ( /health, /completion, /tools ). Richten Sie es auf eine Staging-Instanz, niemals auf Produktion. Es ist ein Smoke-Test, kein Beweis.

import json, sys, urllib. request, urllib. error BASE = sys. argv [ 1 ]. rstrip ( "/" ) # z. B. http://127.0.0.1:8080 ORIGINS = sys. argv [ 2: ] or [ "http://localhost:3000", "http://example.test" ] def req ( path, data = None, headers = None ): r = urllib. request. Request ( BASE + path, data = data, headers = headers or { } ) try: with urllib. request. urlopen ( r, timeout = 120 ) as resp: return resp. status, dict ( resp. headers ), resp. read ( ) except urllib. error. HTTPError as e: return e. code, dict ( e. headers ), e. read ( ) # 1. Verfügbarkeit print ( "health", req ( "/health" ) [ 0 ] ) # 2. Determinismus bei Temperatur 0 mit geteiltem Prompt, zweimal (Pfad der Checkpoint-Wiederverwendung) body = json. dumps ( { "prompt": "List the planets in order.

" * 200, "n_predict": 32, "temperature": 0, "cache_prompt": True } ). encode ( ) outs = [ ] for i in range ( 2 ): s, _, b = req ( "/completion", body, { "Content-Type": "application/json" } ) outs. append ( json. loads ( b ). get ( "content" ) if s == 200 else f "HTTP {s}" ) print ( "temp0 stable:", outs [ 0 ] == outs [ 1 ], repr ( outs [ 0 ] ) [: 60 ] ) # 3. CORS: Was antwortet der Server für jeden Origin? for o in ORIGINS: s, h, _ = req ( "/health", headers = { "Origin": o } ) print ( "origin", o, "->", h. get ( "Access-Control-Allow-Origin" ) ) # 4. Ist die Tool-Liste ohne Credentials erreichbar? s, _, b = req ( "/tools" ) print ( "/tools status", s, "(200 bedeutet: Jeder, der Sie erreichen kann, kann Tools auflisten)" ) Vollbildmodus öffnen Vollbildmodus beenden Führen Sie es einmal gegen Ihre gepinnte Version und einmal gegen v1.1.1 aus und vergleichen Sie die Ausgaben.

Wenn temp0 stable von True auf False kippt, stoppen Sie und öffnen Sie ein Issue mit Ihrem Prompt und Ihren Flags.

Zwei Releases in acht Tagen sind ein schnelles Tempo für etwas, das viele Teams als gepinnte Binärdatei betreiben. Zwei praktische Konsequenzen:

Zum Vergleich: Ich habe die vorherige Release in derselben Serie behandelt, wo die Slot-Scheduler-Restrukturierung und die Korrekturen am Prompt-Cache-Wiederherstellen die Schlagzeilen waren. Diese Release führt diesen Strang mit der Replay-Korrektur bei Temperatur 0 fort.

Lohnt sich das Upgrade von v1.1.0 auf llama.cpp v1.1.1? Die Notes listen API-Änderungen nur in llama-ext.h auf (die Batch-Funktion des Entscheidungsmodells wurde in llama_batch_ext_set_pool_span_type() umbenannt, dazu neue Funktionen llama_batch_ext_set_pool_span(), llama_get_embeddings_pool_span() und llama_batch_ext_set_attn_scope()) sowie additive Server-Aliase. Wenn Sie die erweiterte Batch-API nicht verwenden, ist das Upgrade im Wesentlichen additiv. Testen Sie trotzdem zuerst auf Staging.

Was ist die Korrektur beim Checkpoint-Replay bei Temperatur 0? Commit #33373 hindert den Server daran, wiedergegebene Tokens bei Temperatur 0 erneut zu verifizieren, sodass das Wiederherstellen eines Prompt-Checkpoints die Generierung immer voranbringt.

Läuft das Shell-Tool standardmäßig? Die Release Notes beschreiben Hintergrundtasks für das eingebaute Shell-Tool und /tools/tasks-Routen. Ich habe die Defaults nicht überprüft, prüfen Sie also Ihre Start-Flags und das Server-README für Ihren Build und halten Sie die Tool-Endpunkte von öffentlichen Schnittstellen fern.

Verändert die SWA-Zell-Wiederverwendung die Modellausgabe? Sie wird so beschrieben, dass Zellen wiederverwendet werden, sobald sie für alle Sequenzen maskiert sind, die Ausgabe sollte also identisch sein. Verifizieren Sie es mit einem Vergleich bei Temperatur 0 an Ihrem Modell.

Welche neuen Modelle fügt v1.1.1 hinzu? Qwen4-35B-A3B, Amazon-FMR/Ergo (1.1T-MoE, MXFP4-Konvertierung), clef-omni, Apertus v1.5 8B und 70B Textunterstützung sowie MiniCPM5-MoE, dazu ein DFlash2-Draft-Head für Inkling-2-Mini.

Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.

Original (Englisch) anzeigen

TL;DR: llama.cpp v1.1.1 was tagged on 2026-12-04, eight days after v1.1.0 (2026-11-26). The changelog lists 203 commits, but only about nine of them change how a long-running llama-server behaves, and those are the ones an operator should read. They are: a fix so a prompt-checkpoint restore at temperature 0 always makes progress, reuse of sliding-window (SWA) KV cells shared by several sequences, a graph-node budget for KV cache rotation so quantized K/V caches fit the scheduler, a CORS change that answers a list of allowed origins with the origin that asked, background tasks for the built-in shell tool, an RPC fix for a stale allocation-size cache entry, an unblocking fix for response readers on termination, a refusal of -sm tensor for Hadamard-folded models, and GGUF rejection of keys and tensor names containing NUL bytes.

This post sorts them into a triage order, shows the memory arithmetic behind the KV items (illustrative numbers, labeled), gives a small probe script you can point at a staging server, and ends with a checklist. Facts come from the public release notes and commit list; counts are my own tally, and the code and calculations are illustrative.

The release overview lists new model support (Qwen4-35B-A3B, Amazon-FMR/Ergo as a 1.1T MoE with MXFP4 conversion, clef-omni, Apertus v1.5 text support, MiniCPM5 MoE), a rework of the decision-model batch API into pool spans and attention scopes, background tasks for the shell tool in llama-server, and an update of ggml to v1.2.0. Counting commit subjects by prefix gives a rough picture of where the effort went (my own tally of the 203 listed commits, grouped by the first word of the subject, so treat it as a reading aid):

If you run a single CUDA box with a handful of models, most of this is invisible to you. The server, KV cache and RPC items are not.

I regroup the items by the symptom an on-call engineer would see, not by file.

Progress and liveness (rare, expensive):

Memory and cache correctness (silent until load):

Network surface (a config problem, not a bug):

The KV items only matter if the cache is a big part of your memory bill, so it is worth doing the arithmetic once. For one sequence, the cache holds K and V for every layer:

bytes = 2 x layers x kv_heads x head_dim x context x bytes_per_element

The model below is hypothetical (48 layers, 8 KV heads, head dimension 128), chosen only to show the shape of the curve. Bytes per element are 2.0 for f16, 1.0625 for q8_0 (8.5 bits) and 0.5625 for q4_0 (4.5 bits).

# Illustrative: KV cache GiB for ONE sequence of a hypothetical GQA model LAYERS, KV_HEADS, HEAD_DIM = 48, 8, 128 BPE = { "f16": 2.0, "q8_0": 8.5 / 8, "q4_0": 4.5 / 8 } def kv_gib ( ctx, kind ): return 2 * LAYERS * KV_HEADS * HEAD_DIM * ctx * BPE [ kind ] / 2 ** 30 for ctx in ( 32_768, 65_536, 131_072 ): print ( ctx, { k: round ( kv_gib ( ctx, k ), 2 ) for k in BPE } ) Enter fullscreen mode Exit fullscreen mode For this hypothetical model the result is 6.0 GiB at 32K tokens in f16, 12.0 GiB at 64K and 24.0 GiB at 128K, per sequence. Four parallel slots at 128K in f16 would need 96 GiB for the cache alone. Quantizing both K and V to q8_0 cuts each figure to about 53 percent, and q4_0 to about 28 percent.

That is why people quantize the cache, and why a graph-node budget bug for KV cache rotation with quantized K/V would show up first on the configurations that save the most memory.

SWA reuse works in the other direction: it does not shrink a global-attention layer, but for models that interleave local and global layers, cells masked for all sequences no longer count against you. How much that saves depends on your window size and how many sequences share a prefix, so measure it on your own model rather than trusting a number from a post.

My triage order, by how badly a miss hurts and how late it shows up. This is author judgment, not a project ranking.

The script below uses only the standard library and endpoints named in the release notes or the long-standing server API ( /health, /completion, /tools ). Point it at a staging instance, never at production. It is a smoke test, not a proof.

import json, sys, urllib. request, urllib. error BASE = sys. argv [ 1 ]. rstrip ( "/" ) # e.g. http://127.0.0.1:8080 ORIGINS = sys. argv [ 2: ] or [ "http://localhost:3000", "http://example.test" ] def req ( path, data = None, headers = None ): r = urllib. request. Request ( BASE + path, data = data, headers = headers or { } ) try: with urllib. request. urlopen ( r, timeout = 120 ) as resp: return resp. status, dict ( resp. headers ), resp. read ( ) except urllib. error. HTTPError as e: return e. code, dict ( e. headers ), e. read ( ) # 1. liveness print ( "health", req ( "/health" ) [ 0 ] ) # 2. temperature-0 determinism with a shared prompt, twice (checkpoint reuse path) body = json. dumps ( { "prompt": "List the planets in order.

" * 200, "n_predict": 32, "temperature": 0, "cache_prompt": True } ). encode ( ) outs = [ ] for i in range ( 2 ): s, _, b = req ( "/completion", body, { "Content-Type": "application/json" } ) outs. append ( json. loads ( b ). get ( "content" ) if s == 200 else f "HTTP {s}" ) print ( "temp0 stable:", outs [ 0 ] == outs [ 1 ], repr ( outs [ 0 ] ) [: 60 ] ) # 3. CORS: what does the server say for each origin? for o in ORIGINS: s, h, _ = req ( "/health", headers = { "Origin": o } ) print ( "origin", o, "->", h. get ( "Access-Control-Allow-Origin" ) ) # 4. is the tool listing reachable without credentials? s, _, b = req ( "/tools" ) print ( "/tools status", s, "(200 means anyone who can reach you can list tools)" ) Enter fullscreen mode Exit fullscreen mode Run it once against your pinned version and once against v1.1.1, and diff the output. If temp0 stable flips from True to False, stop and open an issue with your prompt and flags.

Two releases in eight days is a fast cadence for something many teams run as a pinned binary. Two practical consequences:

For comparison, I covered the previous release in the same series, where the slot scheduler refactor and prompt-cache restore fixes were the headline. This release continues that thread with the replay fix at temperature 0.

Is llama.cpp v1.1.1 safe to upgrade to from v1.1.0? The notes list API changes only in llama-ext.h (the decision-model batch function renamed to llama_batch_ext_set_pool_span_type(), plus new llama_batch_ext_set_pool_span(), llama_get_embeddings_pool_span() and llama_batch_ext_set_attn_scope() ) and additive server aliases. If you do not use the extended batch API, the upgrade is mostly additive. Test on staging first regardless.

What is the temperature 0 checkpoint replay fix? Commit #33373 stops the server from re-verifying replayed tokens at temperature 0, so restoring a prompt checkpoint always advances generation.

Does the shell tool run by default? The release notes describe background tasks for the built-in shell tool and /tools/tasks routes. I did not verify defaults, so check your launch flags and the server README for your build, and keep the tool endpoints off public interfaces.

Does SWA cell reuse change model output? It is described as reusing cells once they are masked for all sequences, so output should be identical. Verify with a temperature 0 comparison on your model.

Which new models does v1.1.1 add? Qwen4-35B-A3B, Amazon-FMR/Ergo (1.1T MoE, MXFP4 conversion), clef-omni, Apertus v1.5 8B and 70B text support, and MiniCPM5 MoE, plus a DFlash2 draft head for Inkling-2-Mini.

Originaltitel: llama.cpp v1.1.1 for Server Operators: Checkpoint Replay at Temp 0, Shared SWA Cells, and a Shell Tool to Keep PrivateQuelle: dev.to (dev.to). Original öffnen