radiance 1.12.0

New models:
- Fish Audio drama-3: speech with speaker tags and inline direction, voices cloned from reference
  clips (the `references` field of /v1/audio/speech and the streaming session), two cards
- Gemma 4 E2B/E4B (KV-shared layers, per-layer embeddings, clipped vision linears), with
  NVIDIA-Nemotron-3.5-Bolt-E4B in bf16 with DFlash and vision on one card, and E4B recipes

Speed:
- MXFP4 GEMMs for one to 64 rows and a tiled prefill GEMM at TN=4 from 1024 rows: the 27B MXFP4
  with DFlash2 decodes about 1% faster at c1, 5% at c4 and 14% at c16
- The fp8 and int8 LM heads read their weight once for 65 to 128 rows
- A prefill step of one sequence runs in two pieces on a second lane at two ranks (qwen35_fp8,
  gemma3): a 45K-token prompt on the 27B fp8 in 15.1 s instead of 16.2 s
- Gemma 3's fused all-reduce junctions also under a lossy wire
- --draft-short-from N: a block drafter runs its shorter block from N decoding sequences on
  (off by default; with 8 on the 27B MXFP4: c8 +12%, c16 +18%, c64 +32%, c1 unchanged)
- --tp-attn-split rows: GLM-5.3-Flash's MLA attention split by rows over the ranks, 18 to 21%
  faster prefill; lossy, `heads` stays the default
- --draft-coupling on: Qwen3.8-Flash-Next's MTP drafter samples its proposals from its reranked
  top-8 and the target's draw is coupled to it; pays at high temperatures (c1 at T 1.0: 155 ->
  178 tok/s), costs at low ones; off by default

Features:
- Edited prompts on windowed models (Gemma 4) reuse their prefix: periodic window snapshots, and
  snapshot-backed prefix KV kept across recomputes (an edited tail on Gemma 4 31B: 96 s -> 2.6 s)
- DELETE /sessions/<label> and DELETE /sessions?id=<id> forget one stored conversation
- --state-cache-dtype f16: the delta-net state cache at half the memory (qwen35 plugins; lossy)

Fixes:
- A browser's CORS preflight allows DELETE

Changes: Plugin ABI 27: out-of-tree plugins must be rebuilt. The environment switches the PRs
added are flags now (--tp-attn-split, --draft-coupling, --state-cache-dtype).
This commit is contained in:
137 files changed
+12959 -1126

No files matched your search

+55
View File
@@ -905,6 +905,9 @@ RadBuildCtx Engine::build_ctx(int rank, int64_t max_tok) const {
bc.kv_quant = cfg_.kv_cache_dtype == "fp8_v4" ? RAD_KVQ_V4
: cfg_.kv_cache_dtype == "k6_v4" ? RAD_KVQ_K6V4 : RAD_KVQ_NONE;
bc.attn_prefill_fp8 = cfg_.attn_prefill_fp8;
bc.tp_attn_rows = cfg_.tp_attn_rows;
bc.state_dtype = cfg_.state_cache_dtype == "f16" ? RAD_F16 : 0;
bc.draft_coupling = cfg_.draft_coupling ? 1 : 0;
bc.tp_wire_min_bytes = cfg_.tp_wire_min_kb * 1024;
bc.scope = "";
bc.max_enc_patches = cfg_.mm_max_patches > 0 ? cfg_.mm_max_patches : 0;
@@ -1029,6 +1032,40 @@ int Engine::declare() {
return RAD_E_UNSUPPORTED;
}
}
/* The row split is a graph only the plugin can declare, and it splits over ranks. A plugin
* that does not say it serves it (RadArchProbe::tp_attn_rows_ok), or a single rank, would
* serve the head split under a name that promised the other, so the flag is refused rather
* than ignored. */
if (cfg_.tp_attn_rows) {
RadArchProbe pb{};
(void)rad_tools_probe(plugins_, meta_, &pb);
if (!pb.tp_attn_rows_ok) {
RAD_ERR("--tp-attn-split rows: the '%s' plugin does not split attention by rows for "
"this model (heads does)", plugins_.arch_plugin.c_str());
return RAD_E_UNSUPPORTED;
}
if (cfg_.tp < 2) {
RAD_ERR("--tp-attn-split rows splits a prefill's attention over tensor-parallel ranks, "
"and --tp %d has none to split over (heads does)", cfg_.tp);
return RAD_E_INVAL;
}
RAD_WARN("attention: a prefill-sized step splits by rows over the %d ranks "
"(--tp-attn-split rows): every card holds the attention's projections at full "
"width, and the result is not bit-identical to the head split", cfg_.tp);
}
/* Likewise an f16 recurrent state: a plugin that does not say it declares one would keep f32
* under a flag that promised half the state memory. */
if (cfg_.state_cache_dtype == "f16") {
RadArchProbe pb{};
(void)rad_tools_probe(plugins_, meta_, &pb);
if (!pb.state_f16_ok) {
RAD_ERR("--state-cache-dtype f16: the '%s' plugin does not declare its recurrent state "
"at f16 for this model (f32 does)", plugins_.arch_plugin.c_str());
return RAD_E_UNSUPPORTED;
}
RAD_INFO("recurrent state cache: f16 (--state-cache-dtype), half the state memory; lossy, "
"the generated text differs from f32");
}
/* Resolved here, not at argument parsing: the plugin states its drafter's depth, and it is
* selected only once the container is open. Every consumer of `n_spec` (buffer sizing, kernel
* bands, the scheduler's window) runs after this. rad_arch_probe is the core's only source of
@@ -1303,6 +1340,24 @@ int Engine::declare() {
drafter_name_ = p0.drafter_name;
drafter_.name = drafter_name_.c_str();
if (cfg_.n_spec <= 0) drafter_ = RadDrafterDecl{};
drafter_short_ = drafter_.kind == RAD_DRAFT_BLOCK && cfg_.draft_short_from > 0
? p0.drafter_short_block : 0;
if (cfg_.draft_short_from > 0 && drafter_.kind == RAD_DRAFT_NONE)
RAD_WARN("--draft-short-from %lld: this deployment runs no drafter, so there is no block "
"to shorten", (long long)cfg_.draft_short_from);
else if (cfg_.draft_short_from > 0 && !drafter_short_)
RAD_WARN("--draft-short-from %lld: '%s' %s", (long long)cfg_.draft_short_from,
drafter_name_.c_str(),
drafter_.kind == RAD_DRAFT_BLOCK ? "declares no shorter block, so it keeps its own"
: "is a serial head, which proposes no block");
if (drafter_short_)
RAD_INFO("speculation: from %lld decoding sequences on, '%s' runs its short block of %lld "
"row(s), %lld token(s)", (long long)cfg_.draft_short_from,
drafter_name_.c_str(),
(long long)drafter_short_,
(long long)(drafter_short_ - ((drafter_.block > 0 ? drafter_.block
: drafter_.depth + 1) -
drafter_.depth)));
if (drafter_.kind != RAD_DRAFT_NONE) {
/* A zero proposal handle means the sampler's token buffer: the head's logits go through
* the ordinary sampler chain. */