Repository navigation
integ: train 2026-10-27 (#191 #192 #204 #196 #205 #206 #207 #208 #210), gated on GB10 FP4-Local - #212
Conversation
…nizer (Nemotron large tool calls were cut at 1024 tokens) update_tool_param_state tracks whether generation is inside a qwen3_coder <parameter=KEY> value, whose tokens are exempt from the 1024-token envelope-stuck cap. It compared against hard-coded Qwen3.6 ids (< 27, = 28, > 29, </ 510, parameter 15704). Nemotron 3.5 Super VL serves the same XML tool format with its own tokenizer (1060 / 1061 / 1062 and a merged >\n 1561 / 1885 / 31960; the Qwen ids are <so_embedding>, <SPECIAL_510>, ... there), so a value was never recognised: every file content token counted as envelope, any argument past 1024 tokens tripped tool_envelope_stuck, and the client got a salvaged fragment. Observed in an agent session: large create_file writes landing as the 11 bytes '</parameter', replace_in_file calls losing their replacements array. The markers are now resolved from the tokenizer when it is loaded (tokenizer_runtime, startup and model swap), including the merged >\n forms, and read by the guard. A tokenizer that does not encode a marker as one token leaves the tracking and the cap off instead of misfiring; --tool-max-tokens still bounds a runaway envelope. Qwen ids resolve to the same values as before, so Qwen behaviour is unchanged. Tests: the resolver on Qwen and Nemotron tables; the real guard on a Nemotron write with a 1500-token content (with </div> closes) finishes with the Nemotron markers, trips with the Qwen ids (the old behaviour), stays off with none, and a never-closed envelope is still cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…talls its own; per-thread in tests The first version started the slot empty, which turned the parameter tracking off for any caller that never loads a tokenizer, including the existing think_commit span test that replays a Qwen tool call. The slot now starts at the Qwen ids the guard was hard-coded to (every serve path installs the served tokenizer's markers in tokenizer_runtime). Under cfg(test) the slot is thread-local, so tests installing other markers cannot race the ones that rely on the default. The emit tests also reset the fixture's finished flag; the shared fixture builds a finished sequence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ry, not five ids
An in-stream tokenization battery (both tokenizers, real tokenizer.json)
showed exact-id matching misses openers even on Qwen: BPE merges the '='
into the key's first sub-word for common keys ('=file' '_path',
'=re' 'placements', '=new' '_str'), so those values were never recognised
and their content counted toward the 1024-token envelope cap. Nemotron
merges '>' with the newline ('>\n') and both merge punctuation into the
close ('.</').
ToolMarkers is now five token classes built once per tokenizer from the
decoded text of every vocabulary entry: '<' (leading whitespace allowed),
'parameter', starts-with '=', starts-with '>', ends-with '</'. The guard
matches classes; until a tokenizer installs its own, the slot holds the
five legacy ids, so callers that never load one are unchanged.
Tests: class coverage of the merged forms; a Nemotron 1500-token write
finishes with its classes and is killed by the legacy ids; a Qwen
new_str value (merged '=new') finishes with the classes and is killed by
the legacy ids (the pre-existing Qwen miss); unresolved -> off; a
never-closed envelope is still cut.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…I flake) ticks_only_while_active gave the ticker thread a fixed 30 ms after touch() to land a read; on loaded CI runners it failed intermittently at the "touched: ticking" assert (four PRs on 2026-10-18, none touching spark-storage). Keep touching until a read lands (5 s bound), then stop and require the count to hold still across 200 ms (5x the idle window, 5 s bound). Same properties, no scheduling race. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…arries it #169 (50c6124) linked dequant_nvfp4_bf16.cu into strix-hip/common/; the Nemotron 3.5 target's own link to the same gb10 file became a dead override, and check_kernel_shadows (RULE1) now fails on main and on every open PR. Same file either way, so the build is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
embed_from_argmax.cu is shared into kernels/strix-hip/common by symlink. HIP's bf16 header has no __float2bfloat16_rn, so the HIP build failed with "use of undeclared identifier". __float2bfloat16 is round-to-nearest-even on both CUDA and ROCm (static_cast<__bf16>), so GB10 output is unchanged; line 123 of the same file already uses it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ix (#172) The blocking chat path moved the first sentence into `message.refusal` and set `content` to null whenever the reply opened with one of the 23 prefixes in refusal.rs, dropping the rest of the answer. The streamed path sends every content piece and appends the refusal at the end, so the same prompt gave a full answer streamed and `content: null` blocking (27/200 on the issue's GLM-5.3 run). The classifier is a prefix heuristic, so a reply such as "I cannot verify that source. Here is ..." lost real content. Blocking now matches streaming: `refusal` is still populated, `content` is kept. ATLAS_DISABLE_REFUSAL_DETECTION=1 is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ryable 500 (#180) A TP request whose images need more encoder rows than one encode holds failed in validate_state with a plain anyhow error, which the API mapped to 500. Agent clients resend the same history on 500, so the session retried forever (#180: 18 retries over 80 min). validate_state now returns a typed VisionCapacityError naming rows, image count and cap, and both prefill entry points route it through send_invalid_request_to_sink (HTTP 400 for blocking clients; streaming keeps its error frame). Does not lift the cap itself (#180 ask 1). Co-Authored-By: Claude Opus 5.5 <[email protected]>
On an exact full-prompt leaf hit (ATLAS_MARCONI_EXACT=1) the last prompt token is re-run for logits, and finalize_last undoes the double advance by re-restoring the SSM state and the stashed post-norm hidden. On models with aux layer state the same re-run also advances the PLE n-gram history/conv carry and the QSA indexer state a second time, and the fixup left those double-advanced for decode to read. The prefix-hit restore already applies them (with_aux -> apply_aux_states in prefill_a/prefill_c); apply them again here, from the same snapshot. A plausible cause of the quality loss that made the shortcut default-off on Flash-Next (qwen4_exp has both PLE and QSA; the shortcut predates them). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…grids, not images Peer review of the first commit: a streaming request (opencode, #180's client) still got the generic server_error/500 frame, because send_invalid_request_to_sink sent the same StreamEvent::Error as any failure. Add StreamEvent::InvalidRequest; the chat stream renders it as {type: invalid_request_error, code: 400}, and /v1/responses and /v1/messages streaming inherit it through the chat stream's deltas. send_invalid_request_to_sink's other callers (strict response_format, oversize tool grammar) now match their blocking 400 on the stream too. VisionCapacityError counts grids (grid_count), which is not an image count for video; say so. Test that a stringified error loses the type. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ect resume) With ATLAS_MARCONI_EXACT=1, an exact full-prompt leaf hit restores SSM and aux state at token N, re-runs the last prompt token through every layer for logits, then undoes that re-run's second advance in finalize_last and overwrites normed with the snapshot's stashed hidden. The re-run's output is discarded, so its only effect is state the fixup must roll back (and, per the aux fix, did not fully). ATLAS_EXACT_DIRECT=1 (opt-in) skips the layer forward on that chunk: finalize_last's fixup already supplies the hidden for lm_head. Single-stream prefill_b path only; the batched/multi paths keep the re-run. Not taken when prompt logprobs are requested. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…idden prefill_twophase_dispatch takes the proc_count == 0 path when an SSM snapshot covers the whole prompt. prefill_full_cache_hit then re-embeds the last token and ran final_norm + lm_head on that embedding, which went through no layers: the first token came from embedding logits. Not gated by ATLAS_MARCONI_EXACT. Use the snapshot's stashed last-token hidden, as finalize_last's exact-hit fixup does; warn when the snapshot has none. Reachable only when max_prefill_tokens < prompt <= max_batch_tokens (two-phase runs above max_prefill_tokens, the monolithic arm needs the whole prompt in the arena); with the defaults (arena = max_prefill + 1) that is a single prompt length, so this was latent rather than observed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…last back under 500 LoC) Co-Authored-By: Claude Opus 5.5 <[email protected]>
ATLAS_QWEN4EXP_PREFILL_ROWINV=1 disables the tail-checkpoint split (a block-grid cut is off the 64-row GDN grid) and relies on ATLAS_QWEN4EXP_PREFILL_MIDCHUNK_CKPT=1 to capture the checkpoint in-pass. With ROWINV alone no tail SSM checkpoint is ever saved, so every warm turn recomputes its whole prompt, silently. Measured on Flash-Next FP4-Local agentic-webserver 50 (GB10): 0 checkpoints, TTFT p50 632 -> 3062 ms, 13.97 vs 12.43 s/turn. With MIDCHUNK_CKPT added: 307 intermediate hits, 11.76 s/turn. Warn once at the first last-chunk where it applies. No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: maplepaladin73 <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…-10-27 Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Gate progress (sparky GB10, train tip c3bf9aa, job
Logs: sparky |
|
Agentic leg (train tip c3bf9aa, default FP4-Local recipe profile r1short, sparky GB10): 50/50 webserver_ok, 50/50 followed_directions, 12.60 s/turn (run-1793087766586885957, 380 turns, Σwall 4,833 s). That s/turn sits ~1–2% above the two main-line references, so here's the split against the same harness and profile:
Server-side decode and TTFT match main within ~1–3%. Of the +71 s Σwall, the server's TTFT accounts for ~5 s; the rest is one extra turn plus harness-side time (sandbox builds/tests of the code the model writes). That's one run per arm, so I'm reporting it as an observation, not as "no regression". A second agentic sample on this exact binary is queued (job BFCL ST-995 running since 07:56 UTC (~3 h). |
|
Gate PASS: merging. sparky GB10, train tip c3bf9aa,
BFCL matches main on all 15 subsets (hallucination 93.37, live 82.94, non_live 85.65). The agentic s/turn split is in the comment above: server decode and TTFT agree with main within ~1–3%. CI: only the repo-wide Still pending for #208: a live repro of the two-phase full-hit path (sparky job |
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Summary
Integration train (per the repo's verify-before-merge policy: one shared GB10 gate instead of a GPU run per PR).
origin/main504063a plus each PR merged--no-ff, so authorship survives and the constituent PRs close as merged when this lands:ticks_only_while_activethat reds cargo test / llvm-cov)dequant_nvfp4_bf16override (kernel-shadow red since #169)__float2bfloat16inbatched_embed_nvfp4so strix-hip builds (second break from #195)content(#172; also Anthropic/v1/messagesblocking)invalid_request_error, not a retryable 500 (#180)ATLAS_EXACT_DIRECT), aux re-apply; the defaultATLAS_MARCONI_EXACT=1path 500s on qwen4_exp todayZero merge conflicts. The #207/#210 overlap in
prefill_b.rsauto-merged at 499 lines (under the cap).Shared-code note for reviewers: #192 and #204 touch kernel sources (
kernels/strix-hip/...,kernels/gb10/common/embed_from_argmax.cu); everything else is Rust in spark-server / spark-model / spark-storage.Gate (running now on sparky, GB10)
Job
10-train-gatein the sparky nightq runner, started 2026-10-27 06:25 UTC. It builds this exact tip in a fresh worktree, then:agentic-webserver50 iterations, then BFCL ST-995 (bfcl-subset, no overrides) onnvidia/Qwen3.8-Flash-Next-FP4-Local.Pass criteria, fixed before the run: agentic 50/50 webserver_ok + 50/50 followed_directions with s/turn in line with main's 12.34–12.49 (run-1792654228906033074, run-1792764782219366004); BFCL at or above the committed FP4-Local floors 87.04 / 86.92 (main: 87.44 / 87.32, run-1792664799374893012); no panics in the serve log.
Local checks at the tip: fmt (pinned 1.93.1 + stable) clean; clippy
--testsclean on every crate (spark-storage's Linux-only io_uring e2e test can't build on macOS, the same as on main); typos clean. sparky:spark-server --bin spark2731 passed,spark-model --lib1875 passed,spark-storage keepalive3 passed.Merge plan (owner-approved): merge once both gate legs pass and CI shows only the repo-wide reds (PR benchmark gate, cargo deny, kernel shadow structure; the last should go green here with #192). Results get posted on this PR and in the campaign log (#211).
Test plan
Generated with Devin