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:
Deadcode committed 2026-10-27 16:47:35 +01:00
198 files changed
+20904 -3240

No files matched your search

+28 -13
View File
@@ -238,26 +238,40 @@ AVX_KERNEL(conv1d) {
if (!Y->data) return RAD_E_INVAL;
const int64_t cin = p_int(a, "cin", 0), cout = p_int(a, "cout", 0), k = p_int(a, "k", 0);
const int64_t dil = p_int(a, "dil", 1), causal = p_int(a, "causal", 0);
const int64_t st = p_int(a, "stride", 1), cd = p_int(a, "cu_div", 1);
const int64_t st = p_int(a, "stride", 1), ep = p_int(a, "pad", -1), cd = p_int(a, "cu_div", 1);
const char* act = p_str(a, "act", "none");
const bool tanh_out = act && !std::strcmp(act, "tanh");
const bool clamp_out = act && !std::strcmp(act, "clamp");
if (!tanh_out && !clamp_out && act && std::strcmp(act, "none")) return RAD_E_INVAL;
if (cin <= 0 || cout <= 0 || k <= 0 || (!causal && (k & 1) == 0) || dil <= 0 ||
causal < 0 || causal > 1 || st < 1 || (st > 1 && (!causal || dil * (k - 1) + 1 < st)) ||
cd < 1)
/* A stride takes one of two forms: causal (bounds in cu_div units, each sequence a multiple of
* the stride) or, with `pad`, PyTorch's zero-padded one (bf16, one sequence, cu_div 1). */
const bool padded = ep >= 0 && st > 1;
if (cin <= 0 || cout <= 0 || k <= 0 || (!causal && st <= 1 && (k & 1) == 0) || dil <= 0 ||
causal < 0 || causal > 1 || st < 1 || (ep >= 0 && (st <= 1 || causal || cd != 1)) ||
(st > 1 && ep < 0 && (!causal || dil * (k - 1) + 1 < st)) || cd < 1)
return RAD_E_SHAPE;
const int64_t n_seq = numel(cu) - 1;
if (n_seq <= 0) return RAD_E_SHAPE;
for (int64_t e = 0; e <= n_seq; ++e)
const int64_t cdv = padded ? 1 : cd;
for (int64_t e = 0; !padded && e <= n_seq; ++e)
if (cu_at(cu, e) % (cd * st)) return RAD_E_SHAPE;
/* r0, r1: the output rows, the input's over the stride. */
const int64_t r0 = cu_at(cu, 0) / (cd * st), r1 = cu_at(cu, n_seq) / (cd * st);
if (r0 < 0 || r1 <= r0 || rows_of(Y, cout) < r1 || rows_of(X, cin) < r1 * st)
return RAD_E_SHAPE;
const int64_t x0 = cu_at(cu, 0) / cdv, x1 = cu_at(cu, n_seq) / cdv;
if (x0 < 0 || x1 <= x0 || rows_of(X, cin) < x1) return RAD_E_SHAPE;
if (numel(W) < cout * cin * k || (B && numel(B) < cout)) return RAD_E_SHAPE;
/* r0, r1: the output rows. A causal stride takes each sequence of L rows to L / stride; the
* padded form has PyTorch's (L + 2 pad - dil (k - 1) - 1) / stride + 1, y exactly that many. */
int64_t r0 = x0 / st, r1 = x1 / st;
if (padded) {
if (X->dtype != RAD_BF16) return RAD_E_DTYPE;
if (n_seq != 1 || x0 != 0 || x1 != rows_of(X, cin)) return RAD_E_SHAPE;
r0 = 0;
r1 = (x1 + 2 * ep - dil * (k - 1) - 1) / st + 1;
}
if (r0 >= r1) return RAD_E_SHAPE;
if (padded ? rows_of(Y, cout) != r1 : rows_of(Y, cout) < r1) return RAD_E_SHAPE;
if (res && rows_of(res, cout) < r1) return RAD_E_SHAPE;
const int64_t pad = causal ? dil * (k - 1) + 1 - st : dil * (k - 1) / 2, KK = k * cin;
const int64_t pad = padded ? ep : (causal ? dil * (k - 1) + 1 - st : dil * (k - 1) / 2),
KK = k * cin;
static thread_local std::vector<uint8_t> wbuf, pbuf;
static thread_local std::vector<float> ybuf;
@@ -272,7 +286,8 @@ AVX_KERNEL(conv1d) {
const bool b16 = X->dtype == RAD_BF16 && laststride(X) == 1;
const uint32_t adt = b16 ? (uint32_t)RAD_BF16 : (uint32_t)RAD_F32;
const size_t ael = b16 ? 2 : 4;
/* A 1-wide kernel's patch row is x's own row. */
/* A 1-wide kernel's patch row is x's own row; a strided op reads rows `stride` apart, so it
* always builds patches. */
const bool direct = k == 1 && st == 1 && X->rank == 2 && X->shape[1] == cin &&
X->stride[1] == 1 && (X->dtype == RAD_BF16 || X->dtype == RAD_F32);
const int64_t band = band_rows(KK, cout, r1 - r0);
@@ -291,8 +306,8 @@ AVX_KERNEL(conv1d) {
pt = mat_view(pp, adt, nb, KK);
AVX_PARALLEL_FOR_IF(nb * KK >= AVX_PAR_MIN)
for (int64_t p = 0; p < nb; ++p) {
const int64_t r = b0 + p, e = seq_of(cu, n_seq, r * st * cd);
const int64_t s0 = cu_at(cu, e) / cd, s1 = cu_at(cu, e + 1) / cd;
const int64_t r = b0 + p, e = seq_of(cu, n_seq, r * st * cdv);
const int64_t s0 = cu_at(cu, e) / cdv, s1 = cu_at(cu, e + 1) / cdv;
for (int64_t t = 0; t < k; ++t) {
const int64_t ir = r * st + t * dil - pad;
patch_slot(X, ir, cin, ir >= s0 && ir < s1, b16,