Repository navigation
fix(cuda server): a request without top_k samples with 0.6.6's 20 - #542
Conversation
On the GB10 the native server took top_k from the checkpoint's generation config and fell back to 0, so a request that left top_k out sampled differently from 0.6.6, whose CUDA server defaults to 20 (ashhart#515). The CUDA backend now declares that default; it applies when neither the request, the generation config nor --top-k sets one. Metal keeps its behaviour. Fixes ashhart#515
|
Thank you @plotarmordev. This is merged into main (118da14): a CUDA request that leaves out |
|
An update, @plotarmordev: we've settled on one |
A request that sets no top_k, on a checkpoint whose generation config sets none, keeps every token on both backends again, so one seeded request draws the same on a Mac and on a GB10. This takes back ashhart#542's CUDA default of 20; --top-k 20 or top_k: 20 in the request gives 0.6.6's CUDA draws. RUNBOOK, CHANGELOG and the 1.0.0 notes say so.
A request that sets no top_k, on a checkpoint whose generation config sets none, keeps every token on both backends again, so one seeded request draws the same on a Mac and on a GB10. This takes back ashhart#542's CUDA default of 20; --top-k 20 or top_k: 20 in the request gives 0.6.6's CUDA draws. RUNBOOK, CHANGELOG and the 1.0.0 notes say so.
What this changes
On CUDA, a request that leaves out
top_know samples with 20, as 0.6.6's CUDA server did, instead of 0. The CUDA backend declares that default, and the server applies it only when neither the request, the checkpoint's generation config nor--top-ksets one. Metal keeps its behaviour. Fixes #515.Receipt
Environment: one DGX Spark (GB10, CUDA 13),
TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bit@d9d758fb. Native arms: the 1.0.2 release archive,main(f8fe17d2) built locally, and this branch built the same way, all three using the release'sshare/tensorfold/cuda/sm121kernels. Reference: 0.6.6 (python-0.6@ed78d6fc). Every server was started with CUDA 1.0.2: a request without top_k samples with top_k 0, while 0.6.6's CUDA server defaults to 20 #515's flags:--context 16384 --parallel 4 --no-thinking.Exactness: CUDA 1.0.2: a request without top_k samples with top_k 0, while 0.6.6's CUDA server defaults to 20 #515's request (temperature 0.8, top_p 0.95, seed 7, 256 tokens, streamed), sha256 of the reply text, first 12 hex. Each cell was run twice and repeated exactly:
top_kin the requestmain2de9c394629e376ffb549ad7376ffb549ad72de9c394629e0376ffb549ad7376ffb549ad7376ffb549ad7376ffb549ad7202de9c394629e2de9c394629e2de9c394629e2de9c394629eOnly the "left out" cell changes, and it now equals 0.6.6. An explicit
top_k: 0still keeps every token. A second prompt (a short coding request) gave one identical reply in all 12 cells, on all four engines. The startup line now readssampling: temperature 1.0, top_p 0.95, top_k 20.Decode and prompt speed: not measured. This changes a default sampling setting, not a kernel or a schedule.
Tests:
zig build teston Linux aarch64 passes 75 of 76. The one failure,direct_io: direct reads return the same bytes as buffered reads, fails the same way on unmodifiedmainin the same environment (Docker on the Spark), so it predates this change.Not run, and why: the server's own unit tests, because they build only on macOS and I have no Mac. A drafted vs
"draft": falsecomparison on this branch, because the change only sets whichtop_kthe sampler receives.0.6.6's CUDA server also defaulted
temperatureto 1.0 andtop_pto 0.95 when the generation config set neither. I left those out to keep this to #515's case; whether to match them too is your call.Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Unchanged: no change to drafting, resume or batching. Not re-measured on this branch.)