glm5next: expert parallelism -- experts become file-direct

Main's glm5next width-shards the routed experts unconditionally
(GlmTp::expert_width, ff_lo/ff_hi): an expert's stored form is a shard
across ranks, so --weights-disk-tier refuses it and a 151 GiB expert set
cannot leave VRAM at any pool size. The helper's expert-parallel
declaration (expert_base windows, RAD_SHARD_NONE, no ff spans) already
exists upstream -- qwen4exp uses it -- so this retargets glm5next onto it:
each rank owns 288/world whole experts, the routed arm's buffers
full-width (FE), the shared expert still width-sharded, world 1 unchanged,
and a shape probe's rank >= world clamps to rank 0's window.

Fixes the 24.78 GiB "no eligible tier" startup OOM on 2-card hosts; the
world-8 graph pin is re-recorded from the test's own pin: printout.

Assisted-by: GLM-5.3-Flash
This commit is contained in:
overchop authored and StillDeadcode committed 2026-10-30 15:02:09 +01:00
1 parent 6f6b5c3f78
commit 9647b84ee0
3 files changed
+57 -17

No files matched your search

+7 -3
View File
@@ -1612,10 +1612,14 @@ TEST(glm53_is_the_pinned_graph_and_steps) {
bool heads_only = false; /* the default: the graph before the row form */
};
/* Pins from this test's own `pin:` printout: the head form (heads_only, which declares the
* streamed ops) and the row form, at one and eight ranks. */
* streamed ops) and the row form, at one and eight ranks. Re-recorded after every graph
* change -- the merge re-recorded them for main's builder plus this branch's file-direct
* expert ops. */
const Case cases[] = { { 1, 0x8e12725b3ed3548dull, 0x68ffc03d2b640d51ull },
{ 8, 0xe4ba21765f690f70ull, 0x82ed1094dbf4b637ull },
{ 8, 0xf404ab12440b389full, 0x3818eedb4ac10d1bull, true } };
/* World 8 is this branch's expert-parallel graph (288/world whole
* experts, file-direct), so its pins differ from main's. */
{ 8, 0x6232b56d6f971d61ull, 0x1b80576ba8f1ecc7ull },
{ 8, 0x3e4b89352f01b57bull, 0xed8cc595e8eeb593ull, true } };
for (const Case& cs : cases) {
RadBuilder b;
b.kv_block = 4;