Repository navigation
Conversation
|
Thanks @Mirrdhyn. This is a clean way in: the XPU backend fills the rows the lane core already asks for, and the server's OpenAI format doesn't change. We checked the parts that decide correctness, and they hold:
The lean checker reads 345 on main and 345 on this head, so 0 new. CI is green. Before it can land
Not for this PR, but worth noting: a shared round builds a row for every verified row, landed or not. That is most of the 13.6% cost at two streams. Building only the landed rows, or picking the top 20 on the card, would make a good follow-up.
|
bd0891d to
c1cb4ca
Compare
|
Thanks for the review. All six are done. The branch is rebased on
Main has moved since my rebase ( |
|
Thanks @Mirrdhyn. The alternating main/head runs without logprobs, eight genuine resumed cells with matching rows, helper move, test counts and corrected CHANGELOG suffix answer all six asks. The XPU draft host checks and shared-wrapper row tests pass too. This goes to the landing queue, ahead of #3052. We'll handle CHANGELOG placement and check the combined line budget with #2895. Your Arc Pro B70 runs supply the device evidence; nothing further is needed from you on this review.
|
|
Thanks @Mirrdhyn. The rebase retains first-token rows, accepted-path row alignment and the wrapper's opt-in row forwarding; the focused XPU and shared-wrapper checks pass. Combined with #2895, the code merges and
|
|
@Mirrdhyn, this now conflicts with main in Could you rebase onto main and set
|
c1cb4ca to
266b97c
Compare
|
@ashhart, rebased onto main Checks on the new head: On one Arc Pro B70, a short check, not the receipt: 3 short prompts, greedy and sampled (seed 7), drafted and plain, 48 tokens, Against the head before the rebase, the logprob rows differ in all 12 cells, and 4 cells change tokens (prompt 0 greedy and prompt 2 sampled, drafted and plain). Without logprobs, the old merge base and main differ in tokens in exactly those 4 cells, and in all 12 the text before the rebase equals the old base's text and the text after it equals main's. So the tokens move with main, not with this branch; main refuses I re-ran the receipt in |
|
Thanks @Mirrdhyn. This passed every check today, together with the PRs that landed just before it: the gate, CI and the device cells. Its branch sits on an organisation fork that doesn't allow maintainer pushes, though, so we couldn't update it for landing. It lands instead as #3722, with your four commits unchanged and authored by you, plus our changelog commit with the corrected cost figure and the thanks. Once #3722 is in, we'll close this one in its favour. Nothing is needed from you.
|
|
Thanks @Mirrdhyn! This is in TensorFold 1.2.10, out now: https://github.com/ashhart/TensorFold/releases/tag/v1.2.10
|
Closes #3050. Follows the suggestion on #2000: logprobs on the XPU host as their own PR.
What changes
The Intel GPU engine for Qwen3.8-27B now declares
logprobsand answerslogprobs: true, top_logprobs: N(0 to 20) on every path it has for that model: a lone drafted stream (DFlash2 trees), plain streams and shared rounds, greedy and sampled.prompt_logprobsis still refused, as arelogprobson the Nemotron-H, LFM3 and Gemma 4 engines, which this change does not touch.The core already had the mechanism, so there is no XPU-only rule: the lane core takes the first token's row from
Backend.first_rowand every later row fromVerified.rows. The XPU backend now gives both, from the logits it already reads back (Runner.rowLogits). The first token's row keeps the tokenfirstdrew, as CUDA does; the verified rows are built on the host the way step5 and llama build theirs (native/xpu_logrow.zig: f32 blocks of 64 summed in f64, the 20 best, ties to the lower id, the raw distribution). A lone drafted stream takes its rows from the tree walk:treeRoundgets an optionalNote, called beforecommitPath; tokens and their order are unchanged.The one core change is opt-in, in
core/lanes/drafted.zig: aDraftedwrapper had nofirst_row, so a drafted stream could not give its first token's row. A new fieldrows: bool = falsemakesbackend()offer the target'sfirst_row(itsverifyalready passesVerified.rowsthrough). The default is unchanged, so MiniMax and the CUDA hosts behave as before. Only the XPU wrapper sets it.Checks
Receipt:
docs/receipts/xpu-qwen27-logprobs/.zig build testandzig build test-draft-xpu-hostpass, base223da7659against this head, each with an empty build cache:zig build test9202 passed, 0 failed, 69 skipped of 9271, and 9209, 0, 69 of 9278;zig build test-draft-xpu-host8 passed and 13 passed, 0 failed, 0 skipped.tools/zig/lean_check.pyreads 341 problems on base and 341 on head, so none new. New host tests: the row (normalizer, order, ties, a pick outside the best, the vector exponential);laneInfo,loneDriverandwrapDrafterdeclare logprobs (removing any one makes the test fail);windowRows, the loop that hands each verified window row its own place in the block, is tested with a fake source across windows with and without logprobs; a NaN or +inf logit gives a NaN logprob, which the server refuses, as the sampled draw already refuses such logits; the wrapper offersfirst_rowonly when asked; on the fake target a drafted stream's rows equal a plain stream's, greedy and sampled."draft": false,max_tokens160 (prompts 3 and 5 stop earlier, at the end of the reply, which covers the alignment of the last rows): the sametoken_sha256and text with and withoutlogprobs(24 of 24).--parallel 2, two requests at once, 12 runs): tokens and rows equal what each returns alone.logprobsin the request, alternating fresh servers, median of 5, one Arc Pro B70 in a PCIe 5.0 x16 slot (the cost bullet below is the other card, Gen4 x4): lone drafted greedy, main 125.28 and head 125.30 tok/s, sampled 125.79 and 125.85,"draft": falsegreedy 33.50 and 33.51, two streams greedy 195.06 and 196.02 (passes from 192.39 to 202.65). Everytoken_sha256equals main's.logprobs: true, top_logprobs: 5, the same request twice. In the 8 cells that resumed, the second reply matches the first in text,token_sha256and logprob rows, exactly (greedy and sampled, drafted and"draft": false; 320 to 1,472 of 355 to 1,519 prompt tokens). The other 4 prompts are under one cache block and were not a resume; they matched too.Notes for review
Logged.take(the lone driver's per-path row) reads the runner directly, so it has no host test; the device receipt is what locks it.