radiance 1.9.0

New models:
- LTX-2.5 (base and distilled): video with a stereo soundtrack from text or from text and a first
  frame, on one card, with its duration head, tiled VAE decoding, the diffusion decoder and the x2
  latent upsampler
- Krea 2 Raw and Turbo, and FLUX.3 [klein] and its base: text to image, and for FLUX.3 edits from up
  to ten reference pictures, on one card
- GLM-5.3-Flash from AMD's Quark MXFP4 export, on eight cards (John McDonough, Nunze)
- Gemma 3 / TranslateGemma 27B with an optional DFlash2 drafter (mici81)

Engine:
- --kv-cache-dtype fp8_v4 and k6_v4 for Gemma 3 and Qwen3.8-Flash-Next (mici81)
- the rotated int8 trunk (i8a8h) for Qwen3.8-27B (eddie168168)
- eight-rank all-reduce bands, weighted shards and pieces (Nunze); --host-headroom-mib (sfjes)
- the dashboard shows the single-stream decode floor and its most recent window (Memoria)

Fixes: prefix-cache reservations kept until their save lands (baKon), tool calls in Responses
namespaces (#119), system messages merged when a template refuses several (#137), a prefill
continued with no open step (#127), calibration of a Gram accumulation (#122), JSON Schema patterns
read unanchored (davetha), GLM-style tool calls, the KV floor counting every sequence's state.
Plugin ABI 24.
This commit is contained in:
Deadcode committed 2026-10-19 21:58:07 +02:00
1 parent 778cbf315e
commit 685ec5bd85
136 files changed
+18917 -3821

No files matched your search

+4 -21
View File
@@ -43,7 +43,6 @@ struct Model {
rad_op mprev = 0, membed = 0, membed_ar = 0, men = 0, mhn = 0, meh = 0, mnorm_op = 0,
mselect = 0, mback = 0, mcopy = 0, mhead = 0;
bool have_mtp = false;
bool fuse_router = false, fuse_swiglu = false, gather_inverse = false;
};
static std::unique_ptr<Model> models[MAX_RANKS];
static thread_local std::unique_ptr<Model> probe_model;
@@ -159,7 +158,7 @@ static int buffers(RadBuilder* b, Model& m) {
m.mw.eoff = decl_b(b, nm.f("expert_offsets"), RAD_I32, { 289 });
m.mw.ecnt = decl_b(b, nm.f("expert_counts"), RAD_I32, { 288 });
m.mw.sorted = decl_b(b, nm.f("expert_sorted"), RAD_I32, { R * 8 });
if (m.gather_inverse) m.mw.inv = decl_b(b, nm.f("expert_inverse"), RAD_I32, { R * 8 });
m.mw.inv = decl_b(b, nm.f("expert_inverse"), RAD_I32, { R * 8 });
m.mw.egu = decl_b(b, nm.f("expert_gate_up"), RAD_BF16, { R * 8, 2 * F });
m.mw.eff.x = decl_b(b, nm.f("expert_ff"), RAD_BF16, { R * 8, F });
RAD_ARCH_TRY(m.mw.eff.declare_qs(b, nm, g, "expert_ff", F, R * 8));
@@ -242,7 +241,7 @@ static int layer(RadBuilder* b, Model& m, Layer& lay, Names& nm, int l, bool dra
nm.ckpt("%s.mlp.gate_proj.weight", pre),
nm.ckpt("%s.mlp.up_proj.weight", pre),
nm.ckpt("%s.mlp.down_proj.weight", pre) };
lay.dense.swiglu_quant = m.fuse_swiglu;
lay.dense.swiglu_quant = true;
RAD_ARCH_TRY(lay.dense.declare(b, nm, g, l, w, s, false, draft, kArNone, false, 10));
} else {
auto w = m.mw;
@@ -261,8 +260,8 @@ static int layer(RadBuilder* b, Model& m, Layer& lay, Names& nm, int l, bool dra
s.cfg.route_scale = 2.5;
s.cfg.swiglu_limit = 10;
s.cfg.shared_ungated = 1;
s.cfg.router_fuse = m.fuse_router;
s.cfg.swiglu_quant = m.fuse_swiglu;
s.cfg.router_fuse = 1;
s.cfg.swiglu_quant = 1;
for (int q = 0; q < 2; ++q) {
s.cfg.ff_lo[q] = g.rank * (2048 / g.world);
s.cfg.ff_hi[q] = (g.rank + 1) * (2048 / g.world);
@@ -273,19 +272,6 @@ static int layer(RadBuilder* b, Model& m, Layer& lay, Names& nm, int l, bool dra
if (!draft) RAD_ARCH_TRY(lay.ffn_hc.declare_post(b));
return RAD_OK;
}
/* A decode fusion of the MoE block, on unless its variable is 0. Each is byte-identical to the
* launches it replaces, so the switch is about speed alone; 0 restores the separate launches. */
static int fusion_switch(const char* name, bool* out) {
const char* e = std::getenv(name);
*out = true;
if (!e || !*e || !std::strcmp(e, "1")) return RAD_OK;
if (!std::strcmp(e, "0")) {
*out = false;
return RAD_OK;
}
fprintf(stderr, "radiance: %s='%s'; it is 0 or 1\n", name, e);
return RAD_E_INVAL;
}
static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* ctx) {
if (!b || !meta || !ctx || ctx->is_draft || ctx->rank < 0 || ctx->rank >= MAX_RANKS)
return RAD_E_INVAL;
@@ -326,9 +312,6 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c
g.wire_exact = !ctx->tp_wire_lossy;
g.wire_min_bytes = ctx->tp_wire_min_bytes;
if (g.max_tok < 1 || g.max_ctx < 1 || g.max_seqs < 1 || g.eps <= 0) return RAD_E_INVAL;
RAD_ARCH_TRY(fusion_switch("RADIANCE_GLM_ROUTER_FUSE", &m.fuse_router));
RAD_ARCH_TRY(fusion_switch("RADIANCE_GLM_SWIGLU_QUANT", &m.fuse_swiglu));
RAD_ARCH_TRY(fusion_switch("RADIANCE_GLM_GATHER_INVERSE", &m.gather_inverse));
RAD_ARCH_TRY(buffers(b, m));
RadKVGroupDecl d{};
d.kind = RAD_KV_FULL;