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
+8
-18
@@ -1061,17 +1061,10 @@ AVX_KERNEL(kv_store) {
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ kv_store_streamed */
|
||||
/* kv_store for a group whose KV streams: the host mirror is authoritative and the ring is a cache
|
||||
* of it. `host` is written ALWAYS, at the block's identity row; `kv_cache[res[block]]` only when
|
||||
* the residency map says the block is resident. libref/ref_attn.cpp (ref_kv_store_streamed) states
|
||||
* why the residency test belongs in the writer and not in the resolve: at decode the block a step
|
||||
* writes is usually already resident, so a mirror-only writer would leave the ring's copy of it
|
||||
* short of this step's tokens and the resolve would not re-copy a resident block.
|
||||
*
|
||||
* The two planes are the same bytes in the same paged layout, so one conversion writes both: the
|
||||
* mirror is a view of the same `[block, kv_heads, block_size, 2 * head_dim]` shape whose dtype is
|
||||
* the cache's, so the two copies cannot round differently. E4M3 converts as kv_store_fp8 does;
|
||||
* bf16 stores the value itself, as kv_store_bf16 does. `res` is read, never written. */
|
||||
/* kv_store for a streamed group (libref/ref_attn.cpp, ref_kv_store_streamed): `host` written
|
||||
* always, `kv_cache[res[block]]` only where the block is resident. Both planes are the same paged
|
||||
* layout seen as the cache's dtype, so one conversion writes both: E4M3 as kv_store_fp8, bf16 the
|
||||
* value itself. `res` is read, never written. */
|
||||
AVX_KERNEL(kv_store_streamed) {
|
||||
if (!rad_args_have(a, 6)) return RAD_E_INVAL;
|
||||
const RadTensor *k = &a->t[0], *v = &a->t[1], *sm = &a->t[2], *kv = &a->t[3];
|
||||
@@ -1084,16 +1077,14 @@ AVX_KERNEL(kv_store_streamed) {
|
||||
if (k->dtype != RAD_BF16 || v->dtype != RAD_BF16) return RAD_E_DTYPE;
|
||||
if (sm->dtype != RAD_I32 || res->dtype != RAD_I32) return RAD_E_DTYPE;
|
||||
if (host->dtype != RAD_U8) return RAD_E_DTYPE;
|
||||
/* E4M3 (the fp8 QSA family) or bf16 (the default cache dtype); a packed fp8_v4/k6_v4 group has
|
||||
* no streamed row. */
|
||||
/* E4M3 or bf16; a packed fp8_v4/k6_v4 group has no streamed row. */
|
||||
const bool fp8 = kv->dtype == RAD_F8E4M3;
|
||||
if (!fp8 && kv->dtype != RAD_BF16) return RAD_E_UNSUPPORTED;
|
||||
if (kv->rank != 4 || kv->shape[1] != kv_heads || kv->shape[2] != block_size ||
|
||||
kv->shape[3] != 2 * head_dim) return RAD_E_SHAPE;
|
||||
if (host->rank != 2) return RAD_E_SHAPE;
|
||||
|
||||
/* One block of one layer: both planes are dense rows of it, so the same offsets address the
|
||||
* same element of the same block in either. */
|
||||
/* Both planes are dense rows of one block of one layer, so one offset addresses both. */
|
||||
const int64_t EB = fp8 ? 1 : 2;
|
||||
const int64_t row = kv_heads * block_size * 2 * head_dim * EB;
|
||||
const int64_t slots = kv->shape[0], blocks = host->shape[0];
|
||||
@@ -1116,9 +1107,8 @@ AVX_KERNEL(kv_store_streamed) {
|
||||
const float ks = fp8 ? 1.0f / p_f32(a, "k_scale", 1.0f) : 1.0f;
|
||||
const float vs = fp8 ? 1.0f / p_f32(a, "v_scale", 1.0f) : 1.0f;
|
||||
|
||||
/* Refused before the first write, exactly as libref refuses it: a half-written mirror makes
|
||||
* the next step's copies plausible and wrong. (The device row cannot return a host status from
|
||||
* inside its kernel and guards these instead; a legal call never takes either path.) */
|
||||
/* Refused before the first write, as libref refuses it (the device row, which cannot return a
|
||||
* status from its kernel, guards these instead). */
|
||||
const int32_t* const R = (const int32_t*)res->data;
|
||||
for (int64_t t = 0; t < M; ++t) {
|
||||
const int64_t slot = ldi(sm, offlin(sm, t));
|
||||
|
||||
Reference in new issue
Block a user