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

+80
View File
@@ -56,6 +56,23 @@ struct StatsScheduler : FakeScheduler {
occ->host_cap_bytes = 64 << 20;
return 1;
}
/* The one stored conversation is "conv-7" (engine id 7); "busy" has a request in flight. */
std::vector<std::pair<std::string, int64_t>> released;
int release_session(const std::string& label, uint64_t id, int64_t keep_tokens,
SessionReleased* out) override {
if (label == "busy") return RAD_E_STATE;
if (label != "conv-7" && id != 7) return RAD_E_NOTFOUND;
released.push_back({ label.empty() ? "id" : label, keep_tokens });
out->sessions = 1;
out->entries = 48 - keep_tokens / 16;
out->tokens = out->entries * 16;
out->device_bytes = out->entries * 4096;
out->host_bytes = out->entries * 2048;
out->snapshots = 2;
out->kept_tokens = keep_tokens;
out->kept_shared = 2;
return RAD_OK;
}
TierCounters tier_counters() const override {
TierCounters c;
c.to_host = 3; c.dropped = 2; c.promoted = 1; c.host_drops = 4; c.failures = 0;
@@ -247,6 +264,69 @@ TEST(sessions_lists_each_conversation_and_what_the_tiers_did) {
CHECK_EQ(s["linear"].value("hit_cut_tokens", (int64_t)0), (int64_t)9000);
}
/* DELETE /sessions forgets one stored conversation by its label or engine id and answers with
* what went and what stayed; an unknown session is 404, one with a request in flight 409, a
* malformed count 400, and an engine without a prefix cache 501. */
TEST(a_session_is_released_by_label_or_id_and_the_answer_says_what_went) {
Dash d(false);
HttpResponse r = d.srv->router().call("DELETE", "/sessions/conv-7");
CHECK_EQ(r.status, 200);
json o = json::parse(r.body, nullptr, false);
CHECK_EQ(o.value("label", ""), std::string("conv-7"));
CHECK_EQ(o.value("entries", (int64_t)0), (int64_t)48);
CHECK_EQ(o.value("tokens", (int64_t)0), (int64_t)768);
CHECK_EQ(o.value("snapshots", (int64_t)0), (int64_t)2);
CHECK_EQ(o["kept"].value("shared", (int64_t)0), (int64_t)2);
CHECK_EQ(o["kept"].value("tokens", (int64_t)0), (int64_t)0);
REQUIRE_EQ(d.sched.released.size(), 1u);
CHECK_EQ(d.sched.released[0].second, (int64_t)0);
/* keep_tokens reaches the scheduler and comes back in the answer. */
r = d.srv->router().call("DELETE", "/sessions/conv-7?keep_tokens=160");
CHECK_EQ(r.status, 200);
o = json::parse(r.body, nullptr, false);
CHECK_EQ(o.value("keep_tokens", (int64_t)0), (int64_t)160);
CHECK_EQ(o.value("entries", (int64_t)0), (int64_t)38);
CHECK_EQ(o["kept"].value("tokens", (int64_t)0), (int64_t)160);
REQUIRE_EQ(d.sched.released.size(), 2u);
CHECK_EQ(d.sched.released[1].second, (int64_t)160);
/* By engine id, and by a label the path cannot carry. */
r = d.srv->router().call("DELETE", "/sessions?id=7");
CHECK_EQ(r.status, 200);
o = json::parse(r.body, nullptr, false);
CHECK_EQ(o.value("id", (int64_t)0), (int64_t)7);
CHECK(!o.contains("label"));
r = d.srv->router().call("DELETE", "/sessions?label=conv-7");
CHECK_EQ(r.status, 200);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions/conv-8").status, 404);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions?id=8").status, 404);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions/busy").status, 409);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions").status, 400);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions?id=seven").status, 400);
CHECK_EQ(d.srv->router().call("DELETE", "/sessions/conv-7?keep_tokens=-1").status, 400);
CHECK_EQ(d.sched.released.size(), 4u);
/* The stored-sessions view carries the counters beside the expiry ones. */
const json s = d.get("/sessions");
CHECK(s.contains("released"));
CHECK(s["released"].contains("entries"));
CHECK(s["released"].contains("snapshots"));
}
TEST(a_session_release_without_a_prefix_cache_is_not_implemented) {
FakeScheduler sched; /* the base: no release_session */
FakeTokenizer tok;
Deps dd;
dd.sched = &sched;
dd.tok = &tok;
ServerOptions o;
o.model_id = "dash";
Server srv(dd, o);
CHECK_EQ(srv.router().call("DELETE", "/sessions/conv-7").status, 501);
}
/* ================================================================== the page's field contract */
/* Every field the page's script reads from /stats (in its update and the request table) and from