Repository navigation
feat(server): Splash 1.6 thinking, stop and proxy rules (Splash int8 align S27) - #354
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db3255783d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ed04caf to
3717455
Compare
8f9d276 to
04c5e89
Compare
04c5e89 to
810628d
Compare
- Thinking budget keeps its share of the room the window leaves; Messages thinking.budget_tokens (>= 1024) and serve --thinking-token-budget. - length under a context-clamped limit reports model_context_window_exceeded. - Stop sequences: KMP per stop (Splash StopSearch), first to complete wins; validated like Splash (array of strings, non-whitespace, <= 4, <= 16384). - count_tokens shares the clamp's prompt count (effort, image widening). - A tool call that names no function comes back as text. - launch claude and mlx agent add loopback hosts to NO_PROXY when a proxy is set. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ce for stop search Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
3717455 to
fb9a592
Compare
…(Splash int8 align S28) (#355) ## What Stage S28 of the Splash int8 KV alignment. It stacks on #354 (S27). The reference is Splash `9124ff2c` (1.6.0). One stalled cycle could push the MoE DFlash2 lane into anchor-only verify cycles. The verify budget now counts a cycle as Splash `VerifyBudget::observe` does: ``` before: counted = clamp(ms, 0.5*fit, 2*fit) after: counted = min(ms, 2*max(fit, mean)) (no floor) ``` `mean` is `cost.time / cost.weight` for that width. A fast cycle counts at its own time. A cycle cut to under half its time prints one `tracing::warn!` line at most once a minute (Splash `cuts_` / `nextNotice_`). Only `qwen3_5_moe/verify_budget.rs` changes. Dense qwen3_5 has no time cap. ## Tests - `stalled_cycle_counts_twice_the_larger_of_fit_and_mean` (both fit < mean and fit > mean) - `fast_cycle_counts_at_its_own_time` - `one_doubled_cycle_does_not_lock_verification_to_the_anchor`: from the second cycle after a 2x stall, the width stays at its pre-stall value. Under Splash's own rule the first cycle after the stall drops to 2 rows; this was checked against Splash `VerifyBudget.cpp` built with clang++. - The Splash-source golden test still gives the same bits. Mutations: the 0.5x floor back, a cap at the line alone, and the old clamp: each turns its gate red. `cargo test -p mlx-core --lib qwen3_5_moe::verify_budget` 11 passed; `qwen3_5_moe::dflash2` 31 and `qwen3_5::dflash2` 171 passed. fmt and clippy are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
What
Stage S27 of the Splash int8 KV alignment. It stacks on #353 (S36a). The reference is Splash
9124ff2c(1.6.0). TS only.The Messages surface now follows the Splash 1.6 rules for thinking, stops, proxies and stop reasons.
max_tokensis set, the thinking budget scales bybudget*max_new // min(requested, budget+max_new)ChatSession.constrainToContextCapacityFrontend.chat_jobthinking.type: "enabled"→budget_tokens(400 below 1024);mlx serve --thinking-token-budget Nsets the defaultanthropic-request.ts,serve.ts→ host → server → router_thinking_budget,_generation_optionswithLoopbackNoProxy(env)for the Claude child and grok: NO_PROXY gets127.0.0.1,localhost,::1, keeps entries, leaves*aloneloopback-env.ts_reach_loopback_directlymodel_context_window_exceededanthropic-response.ts,messages.tsstop_reason,output_clamped_to_contextstop-sequence-buffer.tsStopSearch,_prefix_functionstop_sequencesanthropic-request.ts_stop_sequences<tool_call>comes back as textmessages-count-tokens.ts,chat-session.tsfrontend.pyLabelled choices and gaps
maxNewTokensstays as sent, not dropped: in mlx-node a missing budget means the effort default (256 for some families). The engine never forces</think>there, so the effect equals Splash's "no cap".thinking.type: "disabled"does not set effort to none; a nameless call's text is added after the answer text; count_tokens also rejects badstop_sequences; no engine signal for "ended at what memory holds"; no env var for the default budget; JStrim()vs Pythonstrip()differ on a few characters.Tests
vp testover__test__/server,__test__/cli, the chat-session tests,packages/lm/__test__,packages/cli/__test__: 2,203 passed. 12 named mutations (M1-M11, M5b), each red then green.yarn typecheck,vp lint --type-aware --type-checkandvp fmtare clean on the touched files. No regex in new code.🤖 Generated with Claude Code