Repository navigation
serving: MODEL.toml [behavior] keys to serve like the reference server; qwen3.8-flash-next adopts them - #271
Conversation
…h tests api::test_app_state builds the text-only, tool-free AppState a request-path test starts from, so a test sets only the fields it exercises, and hosts the one #[path] include of the build-time MODEL.toml parser (a second include of the same file is clippy's duplicate_mod). The GLM tool-boundary tests build their state from it and glm_natural_end_tests reads the parser from there. Ported from Enntity/atlas 6e9bd90. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nce engine
Three per-model keys, each defaulting to today's behaviour, for a target
whose reference server (vLLM over transformers) does none of Atlas's
prompt aids or decode steering:
verbatim_prompt the template renders the client's request unedited,
tojson spaced like json.dumps
eos_ends_thinking an end token inside <think> ends the turn
tool_call_steering Atlas's <tool_call> bias and loop mask
and atlas_kernels::thinking_ceiling: max_thinking_budget = 0 means no
server thinking budget. Parsed at build time like every [behavior] key;
the consumers follow.
Ported from Enntity/atlas a7ef4dc, without default_reasoning_effort (see
the verbatim_prompt commit).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A budget of 0 (MODEL.toml or --max-thinking-budget) now means the server sets none, as the reference engines do: an effort-silent or budgetless request thinks until it closes </think> or reaches max_tokens, a reasoning_effort level picks only the template's tier, and the 90% clamp has nothing to clamp. A client's explicit token budget (thinking_token_budget, thinking.budget_tokens, chat_template_kwargs thinking_budget) still binds. Template-forced thinking and a spontaneous <think> (first entry and re-entry) get no budget either; they read Some(0) before, an immediate forced close. Every target that sets a budget is unchanged; none sets 0 today. thinking.rs's tests move to thinking/tests.rs (500-LoC cap). Ported from Enntity/atlas a7f4b28 and 0a0de61. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the client sent it
For a target whose reference server is vLLM over transformers, the prompt
must be the checkpoint template's render of the request and nothing else.
Under verbatim_prompt:
* no parser tool system prompt or tool_choice instruction beside the
template's own tool block (a template-owned tool list rendered twice);
* tool results reach the template unedited: no [tool error] marker,
error hints or duplicate-error masks;
* no cwd hint appended to the system message, no content-free system
message dropped, no bash-wander nudge;
* the request's tools are rendered whenever it has any, tool_choice
"none" included, as vLLM renders them;
* the template's tojson is Python's json.dumps (spaced, unescaped), as
transformers renders it, instead of minijinja's compact HTML-escaped
form;
* an effort-silent thinking render leaves reasoning_effort undefined, so
the template's own default applies (Qwen3.8: xhigh), instead of the
"medium" fallback.
ChatLevers::resolve takes the model's [behavior] instead of four
positional flags; ChatTokenizer::from_model_dir takes verbatim_prompt.
Every other target is unchanged.
Ported from Enntity/atlas c971499. Production instead moved the medium
fallback into a [behavior].default_reasoning_effort key and pinned it on
every other Qwen3.8 target (ebd9feb); here the fallback stays the default
and only a verbatim target opts out, so no other MODEL.toml changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… in <think> The reference engines stop at an end token wherever it falls. Atlas discarded one sampled inside <think> and kept the model reasoning, or, under honor_eos_inside_thinking, closed the block and let it answer. With eos_ends_thinking the end token ends the turn, reasoning and all, on serial decode and verify spans alike: the speculative-equals-serial think-commit test now covers the mode, and a new case checks that a turn ends in <think> on its end token with nothing after it. Ported from Enntity/atlas 5de9611 (without its removal of the unread ATLAS_EOS_SUPPRESS_THINKING lever, an unrelated cleanup). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p mask A tool-armed request gets a +3 logit on <tool_call> (decaying to -10 over repeated rounds) and, when the loop detector calls a turn spinning, the opener masked. The reference engines leave the opener's logit to the model. A target with tool_call_steering = false skips both: no bias, and the loop verdict (which only ever steered <tool_call>) is not computed. Ported from Enntity/atlas f10eda6, plus a sampling-setup test of the bias gate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reference for nvidia/Qwen3.8-Flash-Next-FP4-Local is vLLM over the
checkpoint's chat template (model card: --reasoning-parser qwen3
--tool-call-parser qwen3_xml --enable-auto-tool-choice), which renders the
template and nothing else, bounds reasoning only by a client's budget,
ends the turn on any end token, and samples generation_config.json. This
target now serves the same:
* verbatim_prompt: the tool list rendered once (the qwen3_coder system
prompt had duplicated the template's own block on every tools
request), transformers' spaced unescaped tojson, no Atlas hints, and
effort-silent requests render the template's default (xhigh) instead
of the "medium" fallback;
* no server thinking budget (max_thinking_budget 0, was 2048 and a 90%
clamp), F2 confidence stop and think-loop watchdog off;
* eos_ends_thinking (replacing honor_eos_inside_thinking), no
<tool_call> steering, no inter-tool prose cap;
* non-thinking and tools sampling rows at generation_config's
1.0 / 0.95 / 20 with no presence penalty (were 0.7 / 0.8 / 1.5 from
an older Qwen card).
The [behavior] and [sampling.*] sections now match Enntity/atlas 9b25f57
(SparkQwen 0.4.0); ported from e40b8d7.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r byte api/chat/reference_prompt_tests.rs replays 27 request forms (effort levels, thinking on/off, tools, tool_choice required/named/none, multi-turn tool rounds with reasoning, preserve_thinking, tool errors, repeated rounds, response_format, thinking_token_budget) through the production path (wire parse, the edge's effort check, IR lowering, prepare_chat_prompt) under the target's own MODEL.toml [behavior] and diffs the prompt against the checkpoint template rendered by transformers with vLLM's kwargs. scripts/qwen38_flash_next_template_golden.py regenerates the fixture; the template is a byte copy of the checkpoint's (md5 519239a4908bb1f805bbce5fa8c8a242). 21 of 27 differed before this series. The same requests must resolve no thinking budget beyond the client's and no <tool_call> bias. Ported from Enntity/atlas e40b8d7 (the union-grammar assertion 8f812bd added later is left out: main has no tool-call-or-JSON union). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Pair check for #271, run on main + #271 alone and on the wave-1 tip
Merging on that basis. Your 27/27 golden cases are the acceptance criterion; I didn't rerun them here. |
|
Single-GB10 observation after merge (sparky, FP4-Local, default recipe profile, port 8890). Not a revert request. The PR already keeps 565aa68 separate so it can be taken or dropped. This is data for that decision. agentic-webserver 50 (harness pins
Bisect of b0df501..170c3ed, iteration 0 on a fresh serve per step:
Mechanism: not yet determined. The harness sends temperature 0, so the sampling row's temperature and top_p can't matter. That leaves:
A one-knob-at-a-time attribution on main 8c2b672 runs tonight: each arm restores one group to its pre-565aa68 value, with a full revert as the positive control. BFCL ST-995, not attributed. Between the same two bases, normalized moved 87.13 → 85.94 (overall 87.64 → 87.54; runs 1793365805020178746 → 1793503255896245487):
Several PRs landed between those bases, so this is two observations, not an A/B. A one-variable BFCL pair is queued: main vs main with 565aa68's MODEL.toml reverted. Results will be posted here. Campaign log: #211. |
|
Knob attribution, phase 1. Sparky, FP4-Local on main 8c2b672, default recipe profile.
Every FAIL is the same: Two knobs each flip this trajectory on their own. All of this is observed under the fingerprint above:
The thinking budget, the EOS handling and the steering changes don't flip it on their own. Limits of this result:
Phase 2 is running to measure the rates, one fresh serve per run:
Results will be posted here. |
|
Knob attribution phase 2: BFCL ST-995, one variable. Same main 8c2b672 binary build; the only difference is
Subsets that move:
A0 reproduces the 170c3ed number exactly: 87.54 / 85.94 in both. What this does and doesn't show:
agentic-50 for A0 vs A6 runs next (jobs 69 and 70). |
|
Knob attribution phase 2: agentic-webserver 50, one variable. Same main 8c2b672 build; only the Flash-Next
Together with the BFCL pair above:
Which knob is responsible is still open:
Not a revert request. The PR deliberately kept 565aa68 separable, and reference parity is a legitimate target. This is the cost of that choice on this deployment. Options, depending on what A2 and A1 show:
|
|
Knob attribution: agentic-50 on A2. Main 8c2b672 with ONLY
Observed: on this deployment, I haven't traced why. A hypothesis to check: Atlas's non-verbatim render (qwen3_coder system prompt beside the template's own tool block, tool-result hints) gives the model more scaffolding, and the 3 failing trajectories need it to write Cargo.toml. The prompt-side knob isn't free on its other axis either: A2 is about 7% slower per turn, plausibly from the longer rendered prompt; not verified. Still to come:
|
|
Knob attribution: agentic-50 on A1. Main 8c2b672 with ONLY the pre-565aa68 sampling rows restored: non_thinking and tools at 0.7 / 0.8 / k20 / presence 1.5. The bench is greedy, so of those only presence can matter.
Observed, one run per arm:
BFCL on A2 (job 73) and A1 (job 74) runs next, about 5.5 h, to attribute the 2.1-point normalized drop. |
|
Knob attribution: BFCL ST-995 on A2. Main 8c2b672 with ONLY
Observed, one run per arm:
Summary across both benches (single-GB10 FP4-Local, one variable each):
The reference-parity prompt render is the knob that costs this deployment its agentic pass rate and most of its BFCL normalized score.
A1 BFCL finishes in about 2.5 h; I'll add it here. |
|
Knob attribution complete: BFCL A1. Main 8c2b672 with ONLY the pre-565aa68 sampling rows restored (presence 1.5 is the one that acts under greedy): 87.74 / 86.81 (run-1793586397429843659). Final table. Single-GB10 FP4-Local, r1short, one fresh serve and one run per arm, everything else identical:
Reading, as observations under this fingerprint:
All runs, serve logs and binaries are on sparky ( |
|
Landed: #319 (457df04). qwen3.8-flash-next now ships Gate (sparky GB10, PR binary, r1short, a fresh serve per leg, 0 errors):
Run IDs are on #319. The reference-parity render is still pinned by |
|
Flash-Next NVFP4 under its sparkrun recipe (
#319's own NVFP4 leg was 50/50, but it served with my r1short profile, not the recipe's flags ( Queued next, natively on main's engine with the recipe's exact flags:
I'm holding the NVFP4 recipe re-pin until these are in. It currently floats on |
…bution) - Off restores Atlas's render (parser tool prompt + tool-result hints); FP4-Local observed agentic 50/50 and BFCL 87.54 / 87.79 on this arm. - reference_prompt_tests: pin the verbatim RENDER explicitly (key is now off in MODEL.toml) and assert the target ships it off.
|
NVFP4 recipe-flag follow-up. Natively on main's engine (e71775a ≡ main 457df04's engine), with the
Observed:
Read together, this deployment sits at the 50/50 floor with one knife-edge iteration that varies run to run: 2 of 3 runs clean. All BFCL legs clear their floors. I'm leaving the NVFP4 recipe on |
Part of #220.
What
Three MODEL.toml
[behavior]keys, plusmax_thinking_budget = 0meaning "no server budget". Every default keeps today's behaviour, so other models are unchanged.verbatim_prompt: render the conversation through the template exactly as the client sent it. No parser tool prompt beside the template's own tool block (the tool list was rendered twice), no tool-result hints, andtojsonspaced as transformers renders it.eos_ends_thinking: an end token inside<think>ends the turn.tool_call_steering(defaulttrue):falsedrops the<tool_call>bias and the loop mask.A separate commit (
qwen3.8-flash-next: serve the reference server's behaviour) turns these on for qwen3.8-flash-next. It also sets generation_config sampling on every row (1.0 / 0.95 / top-k 20, no presence penalty), matching vLLM over the checkpoint's own template. It is kept apart so it can be taken or dropped on its own.Ported from SparkQwen's engine: a7ef4dc, c971499, 5de9611, f10eda6, a7f4b28, e40b8d7.
Why
SparkQwen 0.4.0 serves the reference server's prompts. On main, Qwen3.8-Flash-Next instead got:
On the 10-28 candidate, a greedy streamed tool call was lost on 8/8 runs.
Benchmarks
Fingerprint (every number below). ennspark03/04, two GB10s at TP=EP=2 over RoCE, 2026-10-29. Checkpoint
nvidia/Qwen3.8-Flash-Next-FP4-Local. Served by the SparkQwen launcher, profile8x32k(--speculative --num-drafts=7 --max-num-seqs=8 --max-seq-len=32768 --max-prefill-tokens=16384 --kv-cache-dtype=bf16 --gpu-memory-utilization=0.88 --enable-prefix-caching), Strict and Spark modes.Baseline: SparkQwen 0.4.0, engine
Enntity/atlas9b25f57, imageatlas-sparkqwen:3e0d9e7e4b29.Candidate:
Enntity/atlasenntity-stack/sq-integcf4200e = Atlas-Inf main a12bffa plus this PR series, imageatlas-sparkqwen:cc103bd6cc92.Harness: SparkQwen
bench/sq_bench.py: streamed, temperature 0,reasoning_effortlow; decode = 384-token prose/code/JSON, 3 reps; cold TTFT at 2K/8K/16K/28K, 2 reps; aggregate decode at C1–C8, 256 tokens per stream, 2 reps; warm 8K/20K conversations. Medians per cell. Plusgreedy_eq.py(8 prompts, 320 tokens, temp 0) andlp_dump.py(echo prompt logprobs at 1K/6K/20K tokens).Baseline and candidate arms interleaved on the same pair in one session.
One box and one harness, so these are observations under this fingerprint, not cross-validated claims.
reference_prompt_tests.rspins the rendered prompt bytes againstqwen3.8-flash-next-fp4-local.cases.json(golden from transformers,scripts/qwen38_flash_next_template_golden.py). Main failed 21/27 cases before this PR and passes 27/27 after.With the series, SparkQwen's tool probe passes 7/7, including the streamed tool call.
Outputs are byte-identical to 0.4.0 (table below).
Whole series vs SparkQwen 0.4.0 (arms
q-040-*/q-fix-*):For reference, Atlas-Inf main c998a49 with the same launcher measured −9..−12% at C1, −15% at C2, −21..−25% at C4 and +21% cold TTFT against 0.4.0 (2026-10-29, same pair and harness).
Tests
AppStatefor request-path tests.fmt,clippyanddocpass. The atlas-kernels tests pass.bench_selfstartgit-checkout detection,bench_variants×2).Authorship
AI-authored (Claude Code), ported from SparkQwen's AI-authored engine. No human-written code.
🤖 Generated with Claude Code