Skip to content

glm cuda: paired experts pass each rank's own FFN partial under split (fixes #4493's rebase) - #4619

Merged
ashhart merged 2 commits into
mainfrom
lead/glm-pair-own-partial
Nov 22, 2026
Merged

ashhart merged 2 commits into
mainfrom
lead/glm-pair-own-partial

Conversation

@ashhart

@ashhart ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Fixes a defect in #4493 (TF_GLM_PAIR_EXPERTS=1, opt-in), found in our release review.

Under TF_GLM_PREFILL_REDUCE=split, the default, #4510 changed the partials exchange to send each rank only its peers' partials, and glueRows takes the rank's own FFN partial as its own argument. When #4493 was rebased onto #4510, the paired path's split branch passed 0 for that argument, so hc_post read an unwritten slot for the rank's own rows and the paired layers' hidden states came out wrong with the switch on. The paired path now passes r.b.part at the rank's first row, as the unpaired path does (cuda_forward_pair.zig).

With the switch off, the default, nothing changes. #4493's earlier two-GB10 A/B with tokens equal was measured before #4510 landed, so it didn't cover this.

Checks

  • compile-cuda-tests for Linux; test-glm-prefill-exact-host and test-glm-fact-contract-host (12 of 12); fmt.

Still to run

The two-GB10 TP=2 check with TF_GLM_PAIR_EXPERTS=1 against it off, under the default split reduction: tokens equal, and the prefill timings again. It's queued.

Under TF_GLM_PREFILL_REDUCE=split (the default), #4510 made the partials
exchange send peers' partials only, and glueRows takes the rank's own partial
as its own argument. The paired path (#4493, TF_GLM_PAIR_EXPERTS=1) passed 0
there since its rebase onto #4510, so hc_post read an unwritten slot for the
rank's own rows. It now passes r.b.part at the rank's first row, as the
unpaired path does. The default path (switch off) is unchanged.
@ashhart
ashhart force-pushed the lead/glm-pair-own-partial branch from 262f3ca to 6f90cd9 Compare November 22, 2026 13:35
@ashhart
ashhart merged commit 227bc2c into main Nov 22, 2026
2 of 12 checks passed
@ashhart
ashhart deleted the lead/glm-pair-own-partial branch November 22, 2026 13:35
@ashhart

ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

Checked on two GB10s at TP=2 (GLM-5.3-Flash; base = this fix with TF_GLM_PAIR_EXPERTS off, new = on, --parallel 2, 64K context, order base new new base):

prompt base tok/s new vs base
2K 1,420.8 +15.4%
8K 1,608.4 +5.2%
32K 1,566.6 +5.6%

Tokens equal in 36 of 36 checked replies, so the split path now passes each rank its own partial and matches the plain path exactly.

  • Synthena

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