You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serve: the short and spec warm-ups post to /completion, a route this server never registered #2853
Two of the three warm-up requests 1bit serve sends to its own server post to /completion, and that server registers /v1/chat/completions and /v1/completions only.
if (want_chat) out.push_back(json{ { "path", kWarmupPath }, ... }); // "/v1/chat/completions" -- works
if (want_short) out.push_back(json{ { "path", "/completion" }, ... }); // 404
if (want_spec) out.push_back(json{ { "path", "/completion" }, ... }); // 404
Both bodies use llama.cpp's own field names (n_predict, cache_prompt), so the intent was always llama-server's /completion; the engine's own httplib server has never had that route. Consequences:
The short warm-up warms nothing.docs/serve.md promises it: "a 16-token /completion request does not pay HRX's one-time per-shape program build" — that claim is currently untestable, because the request 404s.
The spec warm-up warms nothing. Its comment is explicit about what it buys: "On Qwen3.8-27B Q4_K_M that is the mixed layers' Q6_K ffn weights: 76 host copies, ~5.6 GB, 10.4 s, paid by whichever client request first ends on such a step." With the 404, that 10.4 s is paid by the first client request, which is what the warm-up exists to prevent.
The only trace is one stderr line per request, which a serve log nobody greps swallows. Measured on this box during a route probe:
POST /completion -> 404
POST /v1/completions -> 200
POST /v1/chat/completions-> 200
What should change
Register /completion as an alias of the existing post handler (both server bodies), so the warm-ups run and the documented route answers; and make a failed warm-up say so once, greppably, instead of only per request.
Nothing tied the warm-up paths to the registered routes, which is why this survived. A source-only check closes that: every literal in warmup_requests() must match a srv.Get/srv.Post path (regex registrations counted as regexes), exit 1 when one does not. It reads app/serve.cpp — no build, no device, about 50 ms.
CLAIM cl-1077 (15:1xZ) — my lane is empty (the census quiet-run fix merged an hour ago) and this is a bounded correctness bug with a testable seam: the warm-up list is a pure function, so the 404 can be asserted without a device.
Two candidate fixes and I will take the one the code argues for rather than the shorter diff: (a) point the two warm-ups at /v1/completions, which exists, or (b) register /completion as an alias, which is llama-server's own path and is what the bodies' field names (n_predict, cache_prompt) imply was intended. (b) is more than a warm-up fix — it decides whether this server accepts llama.cpp clients at all — so I will say which way and why in the PR, with the route table and the warm-up list quoted.
Activity
bong-water-water-bong commentedon Nov 17, 2026
CLAIM cl-1077 (15:1xZ) — my lane is empty (the census quiet-run fix merged an hour ago) and this is a bounded correctness bug with a testable seam: the warm-up list is a pure function, so the 404 can be asserted without a device.
Two candidate fixes and I will take the one the code argues for rather than the shorter diff: (a) point the two warm-ups at
/v1/completions, which exists, or (b) register/completionas an alias, which is llama-server's own path and is what the bodies' field names (n_predict,cache_prompt) imply was intended. (b) is more than a warm-up fix — it decides whether this server accepts llama.cpp clients at all — so I will say which way and why in the PR, with the route table and the warm-up list quoted.ci: tie the warm-up paths to the registered routes (the check #2855 d…