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

+50 -3
View File
@@ -422,12 +422,13 @@ const std::map<std::string, std::vector<std::string>>& legal_values() {
{ "--model", { "/m/y.rad" } }, { "--download-dir", { "/d" } },
{ "--radiance-home", { "/h1:/h2" } }, { "--kernels", { "libref" } },
{ "--tp", { "2" } }, { "--tp-wire", { "wht6" } }, { "--tp-wire-min-kb", { "64" } },
{ "--tp-attn-split", { "rows" } },
{ "--p2p", { "off" } }, { "--max-num-batched-tokens", { "512" } },
{ "--busy-prefill-chunk", { "256" } }, { "--prefill-interleave", { "2" } },
{ "--max-num-seqs", { "4" } },
{ "--max-model-len", { "4096" } }, { "--rope-scaling", { "yarn:4" } },
{ "--gpu-headroom-mib", { "128" } }, { "--kv-cache-dtype", { "fp8" } },
{ "--attn-prefill-fp8", { "both" } },
{ "--state-cache-dtype", { "f16" } }, { "--attn-prefill-fp8", { "both" } },
{ "--host-pool-mib", { "1024" } }, { "--host-headroom-mib", { "2048" } },
{ "--embedding-placement", { "vram" } },
{ "--vision-tower-placement", { "ram" } }, { "--ngram-placement", { "disk" } },
@@ -435,7 +436,8 @@ const std::map<std::string, std::vector<std::string>>& legal_values() {
{ "--placement", { "all_vram" } }, { "--checkpoint-interval", { "256" } },
{ "--prefill-span", { "2" } },
{ "--checkpoint-slots", { "4" } }, { "--checkpoint-policy", { "tip-only" } },
{ "--num-speculative-tokens", { "2" } }, { "--draft-window", { "fixed" } },
{ "--num-speculative-tokens", { "2" } }, { "--draft-window", { "fixed" } }, { "--draft-short-from", { "4" } },
{ "--draft-coupling", { "on" } },
{ "--host", { "127.0.0.1" } }, { "--port", { "8001" } }, { "--api-key", { "k" } },
{ "--served-model-name", { "m" } }, { "--mm-max-patches", { "1024" } },
{ "--control-vector", { "off" } },
@@ -640,6 +642,20 @@ TEST(the_wire_mode_is_one_of_two_names) {
CHECK_EQ(parse({ "--tp-wire", "EXACT" }, &c), RAD_E_INVAL);
}
/* The row split of a prefill's attention is not bit-identical to the head split, so heads is
* the default and anything but the two names stops the server. */
TEST(the_attention_split_is_one_of_two_names) {
Config c;
CHECK_EQ(c.tp_attn_rows, 0);
CHECK_EQ(parse({ "--tp-attn-split", "rows" }, &c), RAD_OK);
CHECK_EQ(c.tp_attn_rows, 1);
CHECK_EQ(parse({ "--tp-attn-split", "heads" }, &c), RAD_OK);
CHECK_EQ(c.tp_attn_rows, 0);
CHECK_EQ(parse({ "--tp-attn-split", "1" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--tp-attn-split", "" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--tp-attn-split", "ROWS" }, &c), RAD_E_INVAL);
}
/* The prefill attention's e4m3 legs are lossy, so the default is off and anything but the four
* names stops the server. */
TEST(the_attention_fp8_mode_is_one_of_four_names) {
@@ -675,6 +691,20 @@ TEST(the_p2p_mode_is_one_of_three_names) {
CHECK_EQ(parse({ "--p2p", "OFF" }, &c), RAD_E_INVAL);
}
TEST(the_state_cache_dtype_is_f32_or_f16) {
Config d;
CHECK_EQ(parse({}, &d), RAD_OK);
CHECK_EQ(d.state_cache_dtype, std::string("f32"));
Config c;
CHECK_EQ(parse({ "--state-cache-dtype", "f16" }, &c), RAD_OK);
CHECK_EQ(c.state_cache_dtype, std::string("f16"));
CHECK_EQ(parse({ "--state-cache-dtype", "f32" }, &c), RAD_OK);
CHECK_EQ(c.state_cache_dtype, std::string("f32"));
CHECK_EQ(parse({ "--state-cache-dtype", "bf16" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--state-cache-dtype", "1" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--state-cache-dtype" }, &c), RAD_E_INVAL);
}
TEST(the_kv_cache_dtype_is_one_of_four_names) {
Config c;
CHECK_EQ(parse({ "--kv-cache-dtype", "bf16" }, &c), RAD_OK);
@@ -750,6 +780,22 @@ TEST(the_draft_window_is_fixed_or_adaptive) {
CHECK_EQ(std::string(draft_window_name(DraftWindow::Fixed)), std::string("fixed"));
}
/* --draft-coupling is off unless asked for, and only off and on parse: a misspelt value must not
* start a server on the other path. */
TEST(the_draft_coupling_is_off_or_on) {
Config d;
CHECK_EQ(parse({}, &d), RAD_OK);
CHECK(!d.draft_coupling);
Config c;
CHECK_EQ(parse({ "--draft-coupling", "on" }, &c), RAD_OK);
CHECK(c.draft_coupling);
CHECK_EQ(parse({ "--draft-coupling", "off" }, &c), RAD_OK);
CHECK(!c.draft_coupling);
for (const char* bad : { "On", "1", "yes", "true", "" })
CHECK_EQ(parse({ "--draft-coupling", bad }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--draft-coupling" }, &c), RAD_E_INVAL);
}
/* An unknown policy name is refused; falling through to the default would make a comparison
* silently measure the default against itself. */
TEST(the_checkpoint_policy_is_one_of_the_three_that_exist) {
@@ -1244,7 +1290,8 @@ TEST(usage_names_every_flag_it_documents) {
* for, so a flag added without a help line is caught. */
const std::string text = stderr_of([] { config_usage("radiance"); });
for (const char* f : { "--model", "--host-pool-mib", "--kv-cache-dtype",
"--num-speculative-tokens", "--draft-window", "--checkpoint-policy",
"--num-speculative-tokens", "--draft-window", "--draft-coupling",
"--checkpoint-policy",
"--prefix-cache-mib", "--prefix-cache-ttl", "--tp-wire",
"--attn-prefill-fp8", "--embedding-placement", "--ngram-placement",
"--kld-record", "--kld-ref", "--default-max-tokens", "--max-tokens-cap",