Repository navigation
Conversation
The lane backend fills Stream.prompt_rows, so the server stops refusing prompt_logprobs for GLM. A prompt chunk's rows go through each rank's head columns 128 at a time; the rows are made whole on every rank with the broadcasts a sampled draw already uses (Sampler.gather), and rank 0 runs sample.cu's tf_logprob_rows on them. Rank 0's prefill and chunk steps carry flag 1 so the other ranks join each pass. The pass's buffers are made at the first request that asks; if a rank cannot make them, every rank takes the verify window's buffers, 8 rows a pass. A pass with prompt rows starts from position 0, as Nemotron's does.
|
Thanks @Bizuayeu for the 5,000-token scoring checks and the measured 8% prefill cost when scores are requested. We're taking this with fixes for 1.1.1. Review found that the integration must use the maintained packed/tiled head policy, reserve result storage before collective steps, and keep scored requests out of unscored prompt batches. We also moved score-output mapping into startup so a mapping failure cannot strand a peer in a scoring broadcast. Scored requests deliberately recompute from zero; ordinary requests retain prefix reuse. Host controls cover those repairs. The combined TP=2/TP=3 scoring, chunk-boundary, concurrent-request and allocation-failure device checks remain required before release. Posted by Ash's AI Assistant Synthena |
|
Thanks. Once the combined 1.1.1 branch is up, we'll run these against it on GB10 at TP=2 and TP=3 (TP=3 still with rank 0's NCCL id handed over in a file until #636) and post the receipt here:
|
|
Thanks @Bizuayeu for #1016. 1.1.1 adds GLM CUDA prompt log probabilities for nonstreaming completion requests. It uses the maintained projection policy and reserves scoring storage before collective work, with mapped output storage acquired at engine startup. Scoring starts from the full prompt, while ordinary requests retain prefix reuse. Posted by Ash's AI Assistant Synthena |
(comment) Thanks. Here is the receipt we said we'd post, on 1.1.1 (
|
What this changes
Part of GLM-5.3-Flash on the native CUDA engine (#593, where the three stacked PRs for GLM's ranks are summed up), and #298's request on that engine: scoring a fixed text, so quantizations, engines and kernel changes can be compared by NLL.
GLM-5.3-Flash's CUDA lanes fill
Stream.prompt_rows, so nonstreamed/v1/completionsserves vLLM'sprompt_logprobson GLM instead of HTTP 400. The rows come from each prompt chunk's final-norm rows: every rank runs them through its head columns, 128 rows a pass;Sampler.gathermakes the rows whole on every rank (the grouped broadcasts a sampled draw already uses), and rank 0 runssample.cu'stf_logprob_rowson them, as Nemotron's prompt rows do. Rank 0's prefill and chunk steps carry flag 1 so the other ranks join each pass in the same order. The passes' buffers (about 60 MB a rank at TP=2) are made by the first request that asks; if a rank cannot make them, an all-reduce sends every rank to the verify window's buffers, 8 rows a pass. A request with prompt rows prefills from position 0.Receipt
28f3e930on9ccf4727, Zig 0.17.0, CUDA 13.3 (nvcc 13.3.73), NCCL 2.30.7, DGX Spark (GB10, sm_121), one GPU a host over RoCE, checkpointnvidia/GLM-5.3-Flash-NVFP4at423acf37; TP=2 with--parallel 2 --context 131072(two streams do not fit 245,760 at TP=2: 4.55 GiB against the 4.41 GiB rank 1 has left)."draft": falsegive the same rows. A 5,000-token prompt has a row for every token after the first, and its first chunk's 2,048 rows equal those of the same prompt cut at 3,001 tokens. A prompt-rows request beside a plain one (two streams) gives its solo rows, and the plain one keeps itstoken_sha. A prompt followed by its own 48-token greedy reply ranks 46 reply tokens first; one ties the first at the same logprob, and one trails by 0.125 (one bf16 step of a logit between 16 and 32), since decode windows and prompt chunks reach the final norm through different kernels.score-nllover a 16-text set, each text twice; self-agreement: largest logprob move 0.0, argmax agreement 1.0): ja 2.5293, en 2.9109, code 1.3138, math 0.6272. The Python engine (a fork build of the frozen 0.6 line, GLM's CUDA family) on the same checkpoint at TP=2: 2.5474, 2.9257, 1.3184, 0.6250.token_sha,09a15f0582e7before and after).prompt_logprobstakes the path it took; with them a 5,000-token prompt'sprefill_secondswas 3.97 against 3.68 without (+8%).28f3e930and at9ccf4727with fresh caches:zig build test-cuda-host854/854 (852/852 at main; the two new tests),zig build test1152/1159 with 7 skipped (859/866 at main; the count moves with the build cache, 0 failures in both),zig buildandzig build native,zig fmt --check zig/src/families/glm,git diff --check, lean: 517 problems, 517 on the base, 0 new.--context 1048576, one stream: the same row checks pass (the 5,000-token prompt'sprefill_seconds3.71 against 3.34 without rows); 46 of the 48 greedy reply tokens rank first (one ties the first at the top, one trails by 0.125); NLL ja 2.5246, en 2.9206, code 1.3147, math 0.6241, self-agreement 0.0 and 1.0.Checklist
"draft": false(the same rows); a request with prompt rows prefills fresh by design; concurrent equals solo (two streams).tf_logprob_rowsand the bf16 matmul are existing ones).prompt_logprobs(the path is unchanged; the plaintoken_shaholds).