Repository navigation
runtime, gpu, app, gates: one prompt call plan for every seat: a part before the last runs no head, the last call folds its last id where the body allows it, and the unit cut and its read rows live in the shared owner - #1086
Conversation
There was a problem hiding this comment.
Verdict: CLEAN: No proven behavior or quality defect remains in the changed code.
Non-blocking
⚠ Cover the headless fault read: crates/gpu/src/arch/qwen3moe/body35.rs:2552.
Removing this read lets an unread call return success after a device fault. The new dispatch test uses a fake seat and passes with that mutant.
Extend the owning GPU gate with an unread call that raises a body fault. Assert the named fault and poisoned state, and show FAIL-first with this read removed. Pin this behavior while changing its readback path.
⚠ Complete the run evidence: crates/gpu/src/arch/qwen3moe/body38.rs:4678.
The PR reports equality and timing results, but omits the nvidia-smi line, both tested commit hashes, exact model files, and the A/B runner command with output.
Attach those records so the no-speed-loss claim can be reproduced. The supplied evidence does not meet CONTRIBUTING.md's hardware evidence list.
Checked
Duplicates: 37 new items and 3 moved items checked. Both sides of dryer's headed pair read; their family-specific error adapters have no extraction that reduces net elements.
Complexity: feed35 11→17, DeepSeek feed 21→24, and GLM call_groups 19→22 add head-selection and fault/result branches. prefill_hooked 15→16 adds the closing-call refusal. These extend the existing prompt orchestration.
Silent failure: 5 candidate sites followed. The two default adapters retain headed calls; the two zero results are unused prompt tokens; closing-call cleanup uses the infallible body accessor. Errors propagate.
Tests: static mutation review found assertions against bypassed dispatch, a unit-cut off-by-one, and a dropped Close flag. Existing completed-row, closing-call, and checkpoint-cut assertions remain. The headless fault-read gap is above. No tests or GPU gates were run here.
Gates: no thresholds or pins moved. The unit-cut test moved with its cases intact. The new dispatch test has no FAIL-first result in the PR body.
Adversarial checks: empty and one-id calls, faults during unread calls, closing-call cleanup, and another slot overwriting the prompt arena are blocked by guards, fault reads, cleanup, and retained-row handling.
Escape catalog: C1–C4 do not match this diff.
Card check: needs-gpu. This pull request changes crates/app/src/arch/deepseek41/mod.rs, crates/app/src/arch/glm5next/mod.rs, crates/app/src/arch/glm5next/mtp.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)
… before the last runs no head, the last call folds its last id where the body allows it, and the unit cut and its read rows live in the shared owner
81c4bd7 to
967ddb2
Compare
There was a problem hiding this comment.
Since the last review:
- Headless fault-read coverage: still open at crates/gpu/src/arch/qwen3moe/body35.rs:2552.
- Run evidence: partly answered. Card, tested commits, models and gate output are supplied; the A/B client command remains open at crates/gpu/src/arch/qwen3moe/body38.rs:4678.
Verdict: CLEAN: The two context-only interdiff hunks introduce no proven defect in the rebased prompt integration.
Non-blocking
⚠ Cover the headless fault read: crates/gpu/src/arch/qwen3moe/body35.rs:2552.
Removing this read lets an unread call return success after a device fault. The fake-seat dispatch test still passes.
Extend the owning GPU gate with an unread call that raises a body fault. Assert the named fault and poisoned state, and show FAIL-first with the read removed. Pin this boundary while changing its readback path.
⚠ Complete A/B reproduction: crates/gpu/src/arch/qwen3moe/body38.rs:4678.
The timing section supplies server commands, request specifications and results, but omits the exact client runner command.
Attach that command with its output so the no-speed-loss claim can be reproduced.
Checked
Duplicates: 0 new items in the interdiff. Both sides of dryer's headed pair re-read; the unchanged family-specific error adapters require no extraction.
Complexity: feed35, DeepSeek feed and GLM call_groups add head/fault branches; prefill_hooked adds a Close refusal. These full-diff flags have no further growth in the interdiff.
Silent failure: 0 new sites. Prompt-call errors propagate; headed calls require a token.
Tests: no new tests in the interdiff. The dispatch assertions pass with the fault-read mutant above. No builds or GPU gates run here.
Gates: no thresholds, pins or cases changed in the interdiff.
Adversarial: sampled multi-slot rounds forward their draws and retain prompt rows before another slot overwrites them. Both rebased round implementations match the base; the new imports resolve their existing owners.
Escape catalog: C1–C4 do not match.
Notes
The supplied GPU results name pre-rebase head 81c4bd7.
Card check: gpu-evidence. This pull request changes crates/app/src/arch/deepseek41/mod.rs, crates/app/src/arch/glm5next/mod.rs, crates/app/src/arch/glm5next/mtp.rs … and carries a gate run on the author's card, which counts as verified.
🔨 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 전용이던 프롬프트 호출 계획(마지막 id 접기, 유닛 자르기, 헤드 없는 앞 부분)을 공용
runtime::prompt로 옮겨 모든 seat이 읽게 했고, 속도 손실은 없습니다.What and why
Only Qwen3.8 knew how a server prompt call should end. Its seat had its own
prefill_onlyandprefill_next, its body had aset_closetoggle, and the unit cut and the fold of the last id were private functions inbody38.rs. The shared drafts had three variants of the prompt call (prefill,prompt_close,prefill_only). Every other seat ran the head on every part of a long prompt. A new model would have had to write all of this again.This PR moves the plan into
runtime::promptand makes the seat, the app and the drafts read it:CallEnd { Unread, Argmax, Close };head()says whether the head runs.call_unitsandfold_unitsmove out ofbody38.rsand cut runs with the module's existingchunks. Body38's privateubatch_cutcopy is removed.Seat::prompt_call(ids, end)replacesprefill_only. The server's parts and the default last call (prefill_then_step) runUnread. The Qwen3.8 seat folds with oneprompt_call(.., CallEnd::Close)instead of togglingset_close.Prompt::prompt_callhas a default,bind::call_tokenturns a call's result into the server's token and refuses by name a headed call that read none, andSlotDrafts::prompt_callreplaces its three variants.MtpBody::prompt_withtakes the end;MtpBody::prefill_with,Session::prefillandMtpDraft::prefillare removed.A new model now states two facts: whether its body runs a call without a head (
Prompt::prompt_call) and, only if it folds the last id, aprefill_nextthat asks for a closing call. The rest comes from the shared owner.Release notes: Under the hood: every model's server prompt call follows one shared plan, with no speed loss on Qwen3.8.
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": the unit cut and fold incrates/gpu/src/arch/qwen3moe/body38.rs(moved tocrates/runtime/src/prompt.rs), and the three prompt variants incrates/gpu-gates/src/bin/shared/serve_seats/drafted.rs(now one).What I ran
Every GB10 check ran on a DGX Spark. The gate runs print this line from
nvidia-smi --query-gpu=name,driver_version,compute_cap --format=csv,noheader:bash tools/arch.shprintssm_121a, and the toolkit is CUDA 13.3. Base is52bd46bed, the upstream commit before this change.Unit tests and device-linked tests:
The
prompt::tests give 10 passed, the app tests give 31 passed and thebody38tests give 6 passed. On the PR head (81c4bd752),bind::tests::prompt_plan::a_prompt_call_reads_the_planpasses with 1 passed.GB10 gates:
gate-gpu-qwen4exp-e2e:clauses: 27 ran, 9 left to the real tier, exit 0.gate-gpu-qwen4exp-mtp:clauses: 28 ran, 4 left to the real tier, exit 0.gate-gpu-glm5next-mtp:clauses: 14 ran, 7 left to the real tierand(w) Batch: the drafted run's 64 ids = the plain run's PASS, exit 0.gate-gpu-qwen38-serveon the PR head (81c4bd752): every check passes,gate_qwen38_serve ran 220 s (exit 0).gate-gpu-qwen4exp-mtp-inputruns the closing-call clauses on the FP4-Local folder with its MTP layer,test result: ok. 3 passed. The folded last id and a drafted run whose prompt call closes:(cl) the last id rides the ubatch walk at 21, 32 and 5 ids from a reset (the seat steps it otherwise): [true, true, false] PASS(cl) a drafted run whose prompt call closes: the draft rejoins at 20 true; greedy ids [22, 23, 24, 25, 33898, 2110, 30, 31, 73307] = the plain run's [22, 23, 24, 25, 33898, 2110, 30, 31] PASS(cl) close then another slot's prompt: retained_row_bits=true draft_active=true refused_owned_arenas=true greedy_equal=true PASSThe user-facing
bloomery-serve(release feature set) on Qwen3.8 FP4-Local with its MTP draft, answered a short prompt (' Paris. The capital of Germany is Berlin. ...'), a 4,701-id prompt and that prompt extended with the cache kept, at--parallel 1and at--parallel 2. The long answers were coherent, and the extended request read 617 new ids after 4,096 cached.Base against head on an RTX 5090 machine
Base and head return equal greedy text and ids for three requests on each of three models. The RTX 5090 ran at a power limit of 400 W (default 600 W). Base is
52bd46bed.Each side is built through its own tree's
tools/box.shwith the feature set oftools/release/build.sh, the same set as the GB10 build below. Each model is served by base and then by head:BLOOMERY_DRAFT=mtpreplacesofffor the UD-Q4_K_M file. Each request is aPOST /completionwith{"prompt": ..., "n_predict": 48, "temperature": 0, "cache_prompt": true, "return_tokens": true}, sent in this order:"The capital of France is"."Paragraph {i}: the river carries silt to the delta, where farmers plant rice in the wet season and wheat in the dry one."for i from 0 to 159, then"\nSummarize the farming pattern in one sentence:". That is 4,700 ids on Qwen3-30B and 4,701 on Qwen3.6." Paragraph 160: the delta floods each spring."before the last line, read with the cache kept.A request counts as equal when
contentandtokensmatch on both sides. The run prints each result with both sides'prompt_ms; theloadline shows the MTP draft in use:Speed on GB10
Qwen3.8 FP4-Local loses no speed: no row below moves beyond its resolution in the slower direction. The run used TP=1, P=4096 and K=128, head against base
52bd46bed, base and head built and timed in the same run on one GB10, and greedy output was equal. The A/B run prints:Each side is built in its own checkout:
The servers, with
MODEL_FP4Lset to the FP4-Local folder (Hardware below). The first line is the draft-off arm at C=1. The second is the MTP arm at C=1; the C=2 arm runs it with--parallel 2:Each request is a streamed
POST /completionwhose prompt is 4,096 token ids from a fixed window of a token-id corpus (code-fn, SHA-2567520b471436fb307e91ee22640ad8100701d48e63e3da7de9160b705b92915d1; prose-en,d10c7044df8884fdd200304604772d81a4b56a228f802d5f05db724b245ef77a):{"prompt": [4096 token ids], "n_predict": 128, "cache_prompt": false, "stream": true, "timings_per_token": true, "return_tokens": true, "temperature": 0, "top_k": 1}Each round starts one server, warms it up on two windows past the timed ones, then times eight loads per corpus at offsets 0, 50000, 100000 and so on up to 350000. A load is one request at C=1 and two requests at once at C=2. Rounds run base, head, head, base, base, head, so each side has three. The draft-off arm uses code-fn only; the MTP arms use code-fn and prose-en. The C=2 arm samples with
"temperature": 0.7, seed 42 for the first request of a load and 43 for the second. Prefill and decode tok/s come from the server's timings, and TTFT p95 and total tok/s from the client clock. Each cell is the median of the three rounds with their range in parentheses. A positive change is faster for every metric, TTFT included. The resolution is the smallest change the run's same-revision repeats can resolve.The MTP C=2 prose decode row moved by 3.436%, above its resolution of 3.193%, with the rounds apart.
Hardware (if the change is for a machine)
NVIDIA GB10 (DGX Spark), driver 595.84, CUDA 13.3, arch sm_121a, for the gates and the speed run. An RTX 5090 machine at a power limit of 400 W (default 600 W) for the base against head equality runs. Models:
Qwen3.6-35B-A3B-Q4_K_M.gguf(SHA-2564ac6a06bce551257267f49ad2226f8671a22519ccc1a4dde9d5b433d1f2a410d)Qwen3.6-35B-A3B-UD-Q4_K_M.gguf(SHA-2560b21525e972670ed59e1812e170b27c26355381f0656ecc4e25617ece7dac58b)Qwen3-30B-A3B-Instruct-2507-Q4_K_M.gguf(SHA-2566c997b8af17debdfb01d890214400ccbab00db6acc0ba8da5de1cc906c4774d0)AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.