Skip to content

deepseek_v41: reply logprobs normalize over all TP head columns (#1324) - #2125

Open
ashhart wants to merge 2 commits into
mainfrom
lead/t505
Open

ashhart wants to merge 2 commits into
mainfrom
lead/t505

Conversation

@ashhart

@ashhart ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Refs #1324, blocker 2. Draft until it has run on two GB10s. Nothing here has run on a device.

What this changes

DeepSeek-V4.1 at TP>1 returned reply logprobs from one rank's share of the head. Scored requests now snapshot the raw FP32 head columns before sampling or grammar masks. All ranks enter one new plan-link operation, rank zero rebuilds vocabulary order without the unequal-shard padding, then computes float64 normalization and global top-k, with ties to the lower id.

  • The chosen token is scored even when it's outside the requested alternatives, including top_logprobs: 0.
  • NaN, positive infinity and an all-minus-infinity row refuse by name. A minus-infinity shard beside finite values works.
  • prompt_logprobs stays refused.
  • No new GPU kernel. Requests without logprobs keep the same launches, sampling and collectives, and allocate no logprob buffers.
  • Requests with logprobs pay a full head readback plus CPU float64 work.

Checks

  • test-dsv41-draft: 134 of 134 pass, five of them new, against a host float64 reference.
  • Linux device-host and server compiles pass; lean adds nothing.
  • The broad host gate was stopped part way: 184 passes, 2 skips, the rest not run. CI covers it here.
  • Not run: any TP=2 pair. We'll run replies against main, drafted against "draft": false, and logprobs against the reference before this lands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant