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.
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).