Repository navigation
llama-fit-params: --fit-json (one typed report) and --kv-unified (fit the engine we launch) - #93
Merged
joelteply merged 3 commits intoNov 4, 2026
Conversation
…, n_ctx, n_gpu_layers, tensor_split, overrides) Continuum sizes its one launch from the engine's own fit instead of its own formula (continuum card 4a20255d, ONE-BUDGET 3b): it runs llama-fit-params before launch with -c unset, the authority's margin (--fit-target) and the largest measured need (--fit-ctx), and passes the fitted arguments to llama-server. A caller reads a typed report, never the CLI text, so --fit-json prints one object built with nlohmann::json (override patterns are regexes; their backslashes are escaped by construction). A failed fit reports its status and exits non-zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…um launches (one shared pool), not a per-sequence one Without it the fit of 5 sequences read 1,310,720 tokens (5 x the trained window, one cache per sequence) for an engine launched with one unified pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Author
|
PASS at 7233724 (Cormac).
Not reproduced here: Fable's M5 run (n_ctx 262,144 shared by 5, matching the server's own |
…status is a compile warning (Cormac on #93) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Author
joelteply
merged commit Nov 4, 2026
7b3351b
into
889580fc/seq-state-across-stream-counts
10 of 25 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuum sizes its one launch from the engine's own fit instead of its own formula (continuum card 4a20255d, ONE-BUDGET 3b). Today a launch sized from a plan's transient started at 2,048, 8,448 or 83,968 tokens, and a growth relaunch fixed it afterwards while holding admission for 177-262 s.
What changes
--fit-json:llama-fit-paramsprints the fit as one JSON object (status,n_ctx,n_gpu_layers,tensor_split,overrides), built with nlohmann::json so override regexes are escaped by construction. A failed fit reports its status and exits non-zero. A caller reads a typed report, never the CLI text.--kv-unifiedis now registered forLLAMA_EXAMPLE_FIT_PARAMS. Without it, a 5-sequence fit read 1,310,720 tokens (one cache per sequence) for an engine launched with one shared pool.Measured
M5, Qwen3.6-35B-A3B Q4_K_M, 2026-11-04 01:36Z, with the M5's real launch arguments (
--parallel 5 --kv-unified --ubatch-size 2048 -ctk q4_0 -ctv q4_0 -fa on -ngl 999):--fit-target 4096 --fit-ctx 20000:{"status":"success","n_ctx":262144,...}--fit-target 16384: the same 262,144.--fit onwith the same arguments also chose 262,144 (01:29Z), so the tool and the server agree.--fit-ctxis the smallest the fit shrinks to, not a size it must reach. A refusal comes from a margin the device can't leave, which this run didn't exercise.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo