Skip to content

fix(serve): restore sampled think-cap continuation (cherry-pick f03b494dc — completes #523)#524

Merged
Kaden-Schutt merged 1 commit into
masterfrom
fix/restore-sampled-think-cap
Jul 11, 2026
Merged

fix(serve): restore sampled think-cap continuation (cherry-pick f03b494dc — completes #523)#524
Kaden-Schutt merged 1 commit into
masterfrom
fix/restore-sampled-think-cap

Conversation

@Kaden-Schutt

Copy link
Copy Markdown
Owner

Cherry-picks f03b494dc from redline (-x trailer preserved) — the complete, hiptrx-validated fix for the runaway-thinking pairing.

Why: #523 restored only the n-gram half (guard default 8→0). But master also gated the med think-cap behind max_think_explicit, so with the default config (thinking_budget: "med", no override) the 2048 cap wasn't forwarded — leaving master with neither runaway guard by default after #523. This restores the whole 7eac3c8 correctness unit:

Validated (from the commit): fixed-seed A3B sampled battery on hiptrx now produces visible coherent output for all 5 prompts; controlled repeat 158.24 tok/s capped vs 156.94 uncapped (perf-neutral; the earlier 153.02 was transient run-state variance). Adds serve_think_cap.test.ts + guard-default tests.

Scope: deliberately excludes the unrelated MTP prefix-cache from 7eac3c8. Verified here: cargo check -p hipfire-runtime -p hipfire-arch-qwen35 green; bun test serve_think_cap.test.ts 2/2 pass.

Restore the correctness behavior lost when redline was brought onto master: disable the content-blind 4-gram loop guard by default, forward the resolved medium think budget through the serve API, and continue AR/DFlash/native-MTP generation after the forced think close.

The fixed-seed A3B sampled battery on hiptrx now produces visible coherent output for all 5 prompts. A controlled repeat measured 158.24 tok/s capped vs 156.94 uncapped; the earlier 153.02 sample was transient run-state variance, not a stable cap penalty.

Adds focused tests for the guard default and serve cap precedence. The unrelated MTP prefix-cache work from 7eac3c8 is intentionally not included.

(cherry picked from commit f03b494)
@Kaden-Schutt
Kaden-Schutt merged commit c3e3d2e into master Jul 11, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant