Repository navigation
docs(serve): identify the continuation reference source - #1074
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: One-token reference requests avoid speculative passes, and the updated expectations match the server's drafting paths.
Checked
- Duplicates: 2 new items searched; no new duplicate. No dryer pairs were available.
- Complexity:
width_costrises 24 → 25 from the fallible tokenization call in its existing reference stage; harmless growth. - Silent failure: the new helper strictly reads token IDs and checks subsequent prefix-cache counts, draft counts and stop types.
- Tests: static mutation review at crates/gpu-gates/src/serve_client.rs:941: changing the request limit from 1 to 2 makes the test fail on the rejected response. The PR supplies FAIL-first output for restoring the old multi-token probability reference. Plain-step probability requests fail the changed round-command and real-file proposal checks.
- Gates: both changed probability expectations carry PIN(2026-11-01) and reasons. The reference equality and zero-draft checks remain.
- Escape catalog: no C1–C4 pattern appears in this Rust-only diff.
Notes
Dryer did not run, as reported by diagnostics. Tests and hardware gates were not executed during this validation. The PR reports GB10 runs but lacks the full hardware-evidence list in CONTRIBUTING.md.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_qwen38_serve.rs, crates/gpu-gates/src/serve_client.rs and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
Qwen3.8 serve gate가 drafted 서버의 기준 토큰을 얻는 방식이 확률 요청의 draft를 잘못 가정해서 고쳤습니다.
What and why
gate_qwen38_servetook the drafted server's reference ids from one/completionrequest withn_probs, assuming that a request asking for probabilities never drafts. The server drafts those requests too, so the "reference" ran speculative passes anddrafted_reference_steps_draft_nothingcould not hold.This adds
serve_client::stepped_completion: it asks for one token per request and reuses the previous prefix, so no speculative pass can start. The drafted arm and the width chooser clause use it in place of the localsteps_of. The drafted arm runs the reference after its cache and continuation clauses, because the one-token requests leave prefix snapshots in the prompt cache. Three gate expectations change with the server's behavior: theslots_drafted_probsrounds arecmd=passinstead ofcmd=step, and in the lookup arm a logprobs request is checked like any other lookup request (lookup_7_verifies_proposals, file-bound) instead oflookup_logprobs_step_without_a_draft. Both re-pins carryPIN(2026-11-01). Header comments that said probability requests step now say they draft.Release notes: internal: the Qwen3.8 serve gate takes its drafted reference from one-token requests, which never draft.
Code shape
The review reads these first. A box left unticked needs one line of why.
copying it (
AGENTS.md"Common code first",docs/rust-quality.mdR14). Where I found an existing copy, Inamed it below.
(tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
tools/check-comments.sh).PIN(YYYY-MM-DD):and its reason.
cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line), or "none": removed the localsteps_ofandtokenizedincrates/gpu-gates/src/bin/gate_qwen38_serve.rs; both call sites useserve_client::stepped_completionand the sharedserve_client::tokenized.What I ran
On a DGX Spark (GB10), Qwen3.8 fixture (
BLOOMERY_MODEL=qwen4exp, 4 layers, 512 experts, Q4_K) with the MTP Q8_0 draft, promptThe capital of France is, 16 tokens.Before, a unit test puts the old multi-token
n_probsrequest in place of the helper, on a mock server that drafts (base28bc0af4):After, with
stepped_completion, theserve_client::tests:The real server, on the drafted and lookup arms (run on
db2eb82a):The plain arm, with the same helper and the two-slot probability pair on the drafted load (run on
1d170649):Hardware (if the change is for a machine)
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.