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

+63
View File
@@ -1072,6 +1072,69 @@ TEST(the_drafter_name_survives_the_program_leaving_the_builder) {
CHECK_EQ(p.drafter.depth, 3);
}
/* rad_drafter_short_block applies only to a declared block drafter, and only to a block shorter
* than its own that still proposes a token; anything else is refused at declare, since the core
* would stage a block the plugin has no ops for. */
TEST(a_block_drafters_short_block_is_shorter_and_still_proposes) {
Registry reg;
{
Builder b(reg, make_meta(), make_ctx());
CHECK_EQ(rad_drafter_short_block(&b, 4), RAD_E_STATE); /* nothing declared */
}
{
Builder b(reg, make_meta(), make_ctx());
RadDrafterDecl d{};
d.kind = RAD_DRAFT_SERIAL; d.name = "mtp"; d.depth = 4;
CHECK_OK(rad_declare_drafter(&b, &d));
CHECK_EQ(rad_drafter_short_block(&b, 3), RAD_E_STATE); /* a serial head */
}
{
Builder b(reg, make_meta(), make_ctx());
RadBufDecl bd{};
bd.dtype = RAD_I32; bd.rank = 2; bd.shape[0] = 256; bd.shape[1] = 4;
const rad_buf prop = rad_decl_buffer(&b, "prop", &bd);
RadDrafterDecl d{};
d.kind = RAD_DRAFT_BLOCK; d.name = "df"; d.depth = 4; d.mask_token = 5;
d.proposal = prop; d.proposal_pitch = 4; /* block 5: the anchor + 4 */
CHECK_OK(rad_declare_drafter(&b, &d));
CHECK_EQ(rad_drafter_short_block(&b, 5), RAD_E_INVAL); /* not shorter */
CHECK_EQ(rad_drafter_short_block(&b, 1), RAD_E_INVAL); /* proposes nothing */
CHECK_EQ(b.program().drafter_short_block, 0);
CHECK_OK(rad_drafter_short_block(&b, 3));
CHECK_EQ(b.program().drafter_short_block, 3);
}
}
/* A block drafter's proposal pitch is its row pitch, which the engine reads row s at: left at 0 it
* defaults to depth, and under depth it is refused, since a row could not hold the proposals. */
TEST(a_block_drafters_proposal_pitch_holds_its_proposals) {
Registry reg;
RadBufDecl bd{};
bd.dtype = RAD_I32; bd.rank = 2; bd.shape[0] = 256; bd.shape[1] = 4;
{
Builder b(reg, make_meta(), make_ctx());
RadDrafterDecl d{};
d.kind = RAD_DRAFT_BLOCK; d.name = "df"; d.depth = 4; d.mask_token = 5;
d.proposal = rad_decl_buffer(&b, "prop", &bd);
CHECK_OK(rad_declare_drafter(&b, &d));
CHECK_EQ(b.program().drafter.proposal_pitch, 4);
}
{
Builder b(reg, make_meta(), make_ctx());
RadDrafterDecl d{};
d.kind = RAD_DRAFT_BLOCK; d.name = "df"; d.depth = 4; d.mask_token = 5;
d.proposal = rad_decl_buffer(&b, "prop", &bd); d.proposal_pitch = 3;
CHECK_EQ(rad_declare_drafter(&b, &d), RAD_E_INVAL);
}
{
Builder b(reg, make_meta(), make_ctx());
RadDrafterDecl d{};
d.kind = RAD_DRAFT_SERIAL; d.name = "mtp"; d.depth = 4;
CHECK_OK(rad_declare_drafter(&b, &d));
CHECK_EQ(b.program().drafter.proposal_pitch, 1);
}
}
/* rad_drafter_shared_kv applies only to a declared serial drafter. With none declared, a block
* drafter, or a position no head occupies, it is refused at declare; a head staged the wrong way
* silently costs acceptance. */