Commit Graph
5 Commits
Author SHA1 Message Date
Constantin 8cb2c0a841 Add regression for Spark TP projection rounding
Capture the BF16 midpoint case and require each projection reduction to round before widening into the FP32 residual. This regression precedes the production fix and is expected to fail on the current graph.
2026-11-03 19:08:58 +01:00
Constantin 1c96558970 Shard Spark across ranks and reduce the f32 residual
Attention takes whole GQA groups, so a world that does not divide the KV head count still gets a
clean cut; above it the KV heads are replicated and a group splits between the ranks sharing its
KV head. Gate/up, down and the tied vocabulary take matching spans, and every query head, FFN
channel and vocabulary row belongs to exactly one rank at every world from 1 to 8.

The projection outputs are partial sums, so each block widens to f32 and issues an exact f32
all_reduce before the residual add, which keeps the single-card accumulation order.

tests/spark25_reference.py --tp N holds the sharded graph against the HF reference on N fake host
devices; the tiny fixture has 8 heads over 4 KV heads and 3584 vocabulary rows so worlds 1-8 all
get a nonempty shard.
2026-11-03 19:08:58 +01:00
Constantin 48407fb52d Cover Spark configuration refusals and CPU isolation caveat 2026-11-03 19:08:58 +01:00
Constantin 1483a1ae17 Support Spark reasoning and tagged tool calls 2026-11-03 19:08:58 +01:00
Constantin e56d948889 Add BF16 Spark 2.5 checkpoint and decoder 2026-11-03 19:08:58 +01:00