Archived
Radiance becomes a multi-model engine: one process serves several models behind one port, loads each when a request names it, parks it in host memory or restores it from its container, and shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP). Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5, Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B, the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0 serves all of them. Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill reworked, and a reworked adaptive draft window. Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server, each accelerator's memory by model, model states over time. Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410); eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi (#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon (#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and multi-model serving as asked for in #367 and #109. Plugin ABI 39: out-of-tree plugins need to be rebuilt. Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz.
63 lines
4.2 KiB
Markdown
63 lines
4.2 KiB
Markdown
# Four ranks on a PCIe fabric: what pays and what doesn't
|
|
|
|
Every TP4 lever tried on 4x R9700 (PCIe Gen5 P2P, no NVLink), and what decided it. Use it before
|
|
re-attacking the same ground on another card or fabric. All numbers are paired within-session
|
|
windows (bar 0.5% plus a sign test) at `prefill-span: 2`, `tp-wire: wht6`, `placement: all_vram`,
|
|
iq4r MoE, unless stated.
|
|
|
|
Shorthand: `pp` prefill; `c8` eight concurrent streams; `M` rows in a collective; `ti8` the int8
|
|
peer wire (`tp-wire: wht6`'s coding); `hc_write` the fused all-reduce + residual-write row.
|
|
|
|
## What shipped
|
|
|
|
- **`prefill-span: 2`**: overlaps the two half-chunk all-reduces with compute through the second
|
|
lane's rows. +5-11% pp, but only with `checkpoint-interval: 2048` and `all_vram` (placement flips
|
|
its sign).
|
|
- **The four-rank link-hold release** (`ar_*_4rank` rows release the link gate themselves, as the
|
|
two-rank rows do). Without it every yielding DMA (stager copies, expert prefetch) idles behind
|
|
each collective: removing it costs 3.7% at c8. Any new collective row must honour the gate.
|
|
- **Four-rank selftest coverage**: the wide-collective and fused-write cases at world 4.
|
|
|
|
## What was tried and lost
|
|
|
|
| lever | result | why it is closed |
|
|
|---|---|---|
|
|
| widen the MoE fast band to four classes | no change | the cap only bites 3-bit formats; inert for 4-bit experts |
|
|
| fused all-reduce + `hc_write` on the exact-wire band | never selected | `wht6` takes the lossy band, and the fused row is exact-only. Never timed in its own territory |
|
|
| per-class grid split for the MoE GEMM | not constructible in one launch | a run's class is not a property of `blockIdx.y`. A two-launch split was never tried |
|
|
| fused `ti8` two-shot + `hc_write` | c8 -0.43%, c16 sign-split | the saved launches sit at the ~4 us launch floor; the epilogue serialises behind the all-reduce spin |
|
|
| more all-reduce blocks (16 -> 32 -> 64) | GB/s falls (M=2048: 34.5 -> 31.4; M=128: 18.4 -> 7.4) | handshake-bound, not launch-starved |
|
|
| `tp-wire: exact` everywhere | -7.6 to -8.3% at span off | exact wins only at decode steps of 25 tokens or fewer, which it already serves |
|
|
| rank-load balancer | +1.3% at 64K only | changes output bits; not worth it |
|
|
| step-graph capture | none for the trunk | trunk submission is device backpressure, so the host is hidden. Evidence is a synthetic ring, not an engine capture |
|
|
| `ti8` MoE gather row | premise false | on the lossy wire the gather's all-reduce already rides `ti8` |
|
|
| faster `ti8` codec | none possible | encode is 4% of the row (36 of ~900 us); the peer push runs at ~60 GB/s, PCIe Gen5 x16 line rate. The "22% tax" against exact is the link |
|
|
|
|
Only a lever that ran correctly and still lost to a measured mechanism is closed for good: the
|
|
block count, the `ti8` fusion and the codec. The fused exact-wire rows, the two-launch class split
|
|
and draft-pass graph capture were never built or never timed where they would pay.
|
|
|
|
## Open levers, ranked
|
|
|
|
1. **Bigger steps for decode-heavy traffic**: `checkpoint-interval: 4096` with an 8192-token budget
|
|
measured +2-3% c8 and -2-4% pp. Two flags, no code. A prefill chunk is
|
|
`min(budget, interval x span)`; the engine prints the effective chunk at startup.
|
|
2. **Fused gather/write rows for exact-wire configs**, where they still have territory.
|
|
3. **The span floor at TP4 with tiered experts**: eight checkpoint intervals, priced on Flash-Next at
|
|
TP2 only.
|
|
4. **A one-shot `ti8` band for 128-512 KiB messages**, which now pay the two-shot's 1.5N and two
|
|
syncs.
|
|
5. **Draft-pass graph capture**, if low-concurrency latency matters: the host gap is real at c1/c2
|
|
and hidden at c8.
|
|
6. **The dense pipelined prefill at four ranks** (`qwen35_fp8`, `qwen35_w8a8`; GUIDE
|
|
§4.5). It runs at two ranks only (`g.world == 2` in the plugins' declare); enabling it needs a
|
|
timing against the serial step at 18K-64K prompts.
|
|
|
|
## Instruments
|
|
|
|
- `debug-graph: true` lists which row each op resolves to. It lists declared bands, so confirm
|
|
against the running step.
|
|
- `r4d_selftest --perfops` times small ops (every elementwise op costs ~4-4.6 us regardless of
|
|
payload); `--perfhc` and the GEMM/MoE modes time the rest.
|
|
- `rad-kbench` for kernel-against-reference replay; BetterBench's fixed profile decides promotion.
|