Archived
radiance 1.13.0
New models: - Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls - M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% -> 92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints - Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by default; Ornith-1.5-122B compose files Speed: - Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default): the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13% - Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a step at 25-41K context), and the prefill KV split for small launches (a short turn over a long context decodes the other sequences 27% faster in that step) - MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows: TranslateGemma +2-5% at 2-8 streams) - ParoQuant int4/int5 tiled GEMMs 6-9% faster - Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one that ends its requests, and the MTP head's first draft no longer collapses after short chats in the prefix cache Features: - --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3) - MiniMax-H3: reference media and keyframe conditioning with the VAE encoders - Krea 2 rebalance presets balanced, detail and subtle - The dashboard's request history; a stall watch that reports a frozen step's thread and stack - rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's per-layer embeddings read ahead off the step path - A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container Fixes: - The two-rank all-reduce checks that a peer's push has landed before reducing it - z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit - MiniMax-H3's modulation rows Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is --weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT, R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone.
This commit is contained in:
commit
6645337f69
198 files changed
+20904
-3240
No files matched your search
@@ -107,16 +107,11 @@ using MtpHead = MtpFP8;
|
||||
#endif
|
||||
|
||||
/* The weight reads beside the decode all-reduces (prefetch_beside, rad_arch.h): a weight's first
|
||||
* kPrefetchBytes, on decode steps of up to kPrefetchStepRows rows. Qwen3.8-27B MXFP4 + DFlash2 at tp 2
|
||||
* on 2x R9700 (Gen5 x8), one round each, no speculation, x1 / x4 / x8 / x16 tok/s against none
|
||||
* (61.2 / 225.0 / 403.7 / 650.8): 8 MB 65.1 / 246.4 / 410.9 / 663.3; 10 MB 66.0 / 250.1 / 425.0 /
|
||||
* 668.5; 12 MB 67.9 / 251.2 / 438.6 / 668.1; 14 MB 67.8 / 249.5 / 432.4 / 659.1; 16 MB 67.0 / 244.9 /
|
||||
* 422.7 / 649.4; 20 MB 63.4 / 232.0 / 408.1 / 630.7; 32 MB 57.9 / 210.2 / 372.8 / 605.9 -- past
|
||||
* ~12 MB the read outlasts the reduction and takes bandwidth from the GEMM it should feed. Reads up
|
||||
* to 128 rows: x32 963.8 against 956.0, x64 1206.7 against 1216.6, so the ceiling is 32 rows (a
|
||||
* verify of four sequences at speculation 7). With speculation 7 (three rounds) x1..x16 +0.1..+1.9 %.
|
||||
* The drafter's reads (Dflash2::Config::prefetch) take the same size: speculation 7, eight rounds,
|
||||
* median x1 +6 %, x16 unchanged. */
|
||||
* kPrefetchBytes, on decode steps of up to kPrefetchStepRows rows. Qwen3.8-27B MXFP4 + DFlash2, tp
|
||||
* 2 on two R9700s, no speculation: 12 MB was best, +11 % at one stream, +9 % at eight, +3 % at
|
||||
* sixteen; past ~12 MB the read outlasts the reduction and takes bandwidth from the GEMM it feeds.
|
||||
* Up to 32 rows (a verify of four sequences at speculation 7): at 32 and 64 rows the reads are a
|
||||
* wash. The drafter's reads (Dflash2::Config::prefetch) take the same size. */
|
||||
constexpr int64_t kPrefetchBytes = (int64_t)12 << 20;
|
||||
constexpr int64_t kPrefetchStepRows = 32;
|
||||
|
||||
@@ -125,9 +120,8 @@ struct Layer {
|
||||
AttnGatedFP8 attn;
|
||||
GdnFP8 gdn;
|
||||
Ffn mlp;
|
||||
/* The reads beside the decode all-reduces (prefetch_beside, rad_arch.h): gate_up's leading
|
||||
* bytes beside the mixer's reduction, the next layer's first projection's beside the
|
||||
* feed-forward's. 0 where none is declared. */
|
||||
/* gate_up's leading bytes beside the mixer's reduction, the next layer's first projection's
|
||||
* beside the feed-forward's; 0 where none is declared. */
|
||||
rad_op op_pf_gu = 0, op_pf_next = 0;
|
||||
rad_weight pf_gu_w = 0, pf_next_w = 0;
|
||||
};
|
||||
@@ -1017,6 +1011,8 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c
|
||||
gs.out = nm.ckpt("%s.%lld.linear_attn.out_proj.weight", pre, (long long)l);
|
||||
RAD_ARCH_TRY(rad_bind_layer_kv(b, (int)l, m.kv_state));
|
||||
RAD_ARCH_TRY(rad_bind_layer_kv(b, (int)l, m.kv_conv));
|
||||
/* Lane 1 carries no collectives here (rad_block_gdn_fp8.h, ab_lane). */
|
||||
lay.gdn.ab_lane = true;
|
||||
RAD_ARCH_TRY(lay.gdn.declare(b, nm, g, gc, (int)l, m.kv_state, m.kv_conv, gw, gs,
|
||||
f.mix_fold, false, f.mix_ar_in, f.mix_ar_out));
|
||||
}
|
||||
@@ -1047,13 +1043,11 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c
|
||||
#endif
|
||||
|
||||
#if !QWEN35_MOE
|
||||
/* ---- the weight reads beside the decode all-reduces (prefetch_beside, rad_arch.h). At decode
|
||||
* heights each block's reduction leaves the card's memory idle for its round trip over the link,
|
||||
* so the GEMM behind it has its weight's leading bytes read into the on-die cache there: gate_up
|
||||
* behind the mixer's reduction, the next layer's first projection (the delta net's in-projection,
|
||||
* an attention layer's q|gate) behind the feed-forward's. Only at more than one rank;
|
||||
* RADIANCE_PREFETCH_BESIDE=0 issues none (prefetch_beside). */
|
||||
if (g.world > 1 && rad_op_declared(b, "prefetch")) {
|
||||
/* ---- the weight reads beside the decode all-reduces. A decode-height reduction leaves the
|
||||
* card's memory idle for its round trip, so the next GEMM's leading weight bytes are read
|
||||
* into the on-die cache then: gate_up behind the mixer's, the next layer's first projection
|
||||
* behind the feed-forward's. At more than one rank; --weight-prefetch off declares none. */
|
||||
if (g.world > 1 && !ctx->weight_prefetch_off && rad_op_declared(b, "prefetch")) {
|
||||
for (int64_t l = 0; l < m.n_main; ++l) {
|
||||
Layer& lay = m.layers[(size_t)l];
|
||||
lay.pf_gu_w = lay.mlp.gate_up.w;
|
||||
@@ -1538,9 +1532,8 @@ static void step(RadCtx* c, const RadBatch* batch) {
|
||||
RAD_ISSUE_N(c, m.op_rope_cs, batch->n_tok,
|
||||
rope_pos1(batch, batch->n_tok), RAD_B(m.b_rope_cs));
|
||||
|
||||
/* The reads beside the reductions go on decode steps of up to kPrefetchStepRows rows, none on a
|
||||
* step that carries a prompt's rows. This ceiling, not prefetch_beside's own (16), decides: it
|
||||
* is passed a height of 1 where the step qualifies. */
|
||||
/* Decode steps of up to kPrefetchStepRows rows only. This ceiling decides, not
|
||||
* prefetch_beside's own (16): it is passed a height of 1 where the step qualifies. */
|
||||
const int64_t pf_h =
|
||||
batch->phase == RAD_PHASE_DECODE && batch->n_tok <= kPrefetchStepRows ? 1 : INT64_MAX;
|
||||
for (int64_t li = 0; li < (int64_t)m.layers.size(); ++li) {
|
||||
|
||||
Reference in new issue
Block a user