radiance 2.1.0

New models. Recursive Flint (39.8B, about 2.5B active) by everplays (#422): `arch/flint`, as an
IQ8R container with rotated int8 experts or a four-bit one, with a sink-aware WMMA prefill
attention and the fused attention prologue at `rotary_dim` 0. Meta Muse Glimmer 30B by
launch80_assets (#423): bf16, an int4 trunk or IQ8R, its windowed vision tower, its DFlash
drafter, the ATEM tool dialect and context extension. Ling-3.0-tiny by RikshaDriver (#441):
served from its GGUF releases or as IQ8R on `bailing_hybrid`, with six more libr3d kernels. Block
FP8, MXFP4 and NVFP4 conversions of the three are not served. IQ8R containers of all three
(round to nearest, no calibration) are on Hugging Face under StillDeadcode: flint-iq8r,
muse-glimmer-30b-iq8r-dflash and ling-3.0-tiny-iq8r. They were checked for sane answers on two
R9700; nothing was benchmarked, and Muse Glimmer's pictures, video and tool calls were not tried.

Speech. Breeze-TTS-2 clones a voice from a reference recording and its transcript, with an
optional delivery direction, by farcryjohn (#436). The published Breeze container needs
converting again with the updated recipe before it can.

Tools. A model entry with `diagnose: DIR` runs a fixed workload on the engine instead of serving
and writes a report: step times, tokens a step, draft acceptance, TTFT and prefill rates by
category, concurrency and prompt length, and with `diagnose-baseline` a token-for-token comparison
against an earlier report (docs/DIAGNOSE.md), by Code000 (#418).

Scheduler. `mixed-step-target-ms` holds a mixed prefill and decode step to a service time, off by
default, by tnhnyzc (#413). `scheduler.stuck-exit` (60s by default, 0 never) ends the process when
the device has advanced nothing for that long, so a restart policy brings a hung server back
(#409, #415, #428).

Fixed. Draft trees with the int8 KV cache, which stopped Gemma 4 31B with DFlash2 on its first
request (#454, diagnosed by aelfwyne). The expert loan held at zero by a few leftover cache blocks
after long sessions (#455, diagnosed by thekk1). The mapped tier's pages kept in the page cache
across a load and a restore, by C_Tamas (#421). Replayed tool calls with blank arguments, and
arguments that are not JSON refused naming the call, by dschmitz (#444). The dashboard's card
temperature reads the junction sensor, by dschmitz (#453). The VRAM shortfall report says what the
KL mode needs, by baKon (#448). The out-of-tree plugin test builds its plugins in parallel and
takes its toolchain from the tree.

Plugin ABI 40: out-of-tree plugins need to be rebuilt.

Thanks to @everplays, @launch80_assets, @RikshaDriver, @farcryjohn, @Code000, @tnhnyzc, @C_Tamas, @dschmitz, @baKon, @aelfwyne and @thekk1.
This commit is contained in:
Deadcode committed 2026-11-15 16:00:05 +01:00
1 parent ddcb9c69bb
commit 2a2b756371
166 files changed
+20749 -327

No files matched your search

+3
View File
@@ -152,6 +152,9 @@ inline SchedMetrics bridge_metrics(const rad::SchedMetrics& m) {
o.steps_ahead = m.steps_ahead;
o.prefill_chunks_capped = m.prefill_chunks_capped;
o.steps_held = m.steps_held;
o.mixed_step_target_steps = m.mixed_step_target_steps;
o.mixed_step_target_misses = m.mixed_step_target_misses;
o.mixed_step_target_prefill_cap = m.mixed_step_target_prefill_cap;
o.decode_rows_unspeculated = m.decode_rows_unspeculated;
o.step_ns = m.step_ns; o.step_ns_decode = m.step_ns_decode;
o.step_ns_decode_best = m.step_ns_decode_best;
+23 -11
View File
@@ -254,9 +254,16 @@ int Server::speech_request(const json& body, const std::string& text,
}
if (refs.empty()) r->ref_cu.clear();
}
if (!refs.empty() && !inst.empty())
const bool ref_direction = !refs.empty() && !inst.empty();
if (ref_direction && info.tmpl_ref_instruct.empty())
return fail(err_unsupported("instructions", "a request with references takes no "
"instructions; the clips set the voice"));
/* A model whose negative template omits the reference has not declared reference CFG.
* In particular Breeze's ref_clone_tata is an unguided continuation, not voice design. */
if (!refs.empty() && info.branches != 1 && r->cfg > 1.0f &&
(!ref_direction || info.neg_tmpl_ref.empty()))
return fail(err_unsupported("guidance_scale", "voice cloning requires guidance_scale 1; "
"this model has no guided reference template"));
/* ---- the prompt */
std::string i2, t2, why;
@@ -277,26 +284,28 @@ int Server::speech_request(const json& body, const std::string& text,
/* One reference (ref_item): its header, the transcript in it, tokenised as one segment with
* its special tokens (the speaker tags prepare() allows), a row a frame of its clip, and what
* follows the clip as another segment. */
int64_t frame0 = 0;
auto render_ref = [&](size_t i, std::vector<int32_t>* ids_out) {
auto render_ref = [&](size_t i, std::vector<int32_t>* ids_out,
std::vector<int32_t>* frame_map, int64_t& frame0) {
static const std::string kAudio = "{audio}";
const std::string idx = std::to_string(i + 1);
const size_t a = info.ref_item.find(kAudio);
encode(subst(subst(info.ref_item.substr(0, a), "{index}", idx), "{text}", refs[i].text),
true, ids_out);
r->ref_frame.resize(ids_out->size(), -1);
frame_map->resize(ids_out->size(), -1);
for (int64_t f = 0; f < refs[i].frames; ++f) {
ids_out->push_back(0);
r->ref_frame.push_back((int32_t)(frame0 + f));
frame_map->push_back((int32_t)(frame0 + f));
}
frame0 += refs[i].frames;
encode(subst(info.ref_item.substr(a + kAudio.size()), "{index}", idx), true, ids_out);
};
/* A template a segment at a time: its own text with special tokens, each slot without. */
auto render = [&](const std::string& t, std::vector<int32_t>* ids_out) {
auto render = [&](const std::string& t, std::vector<int32_t>* ids_out,
std::vector<int32_t>* frame_map) {
static const std::string kInst = "{instructions}", kInput = "{input}",
kRefs = "{references}";
size_t at = 0;
int64_t frame0 = 0;
while (at <= t.size()) {
const size_t a = t.find(kInst, at), b = t.find(kInput, at), c = t.find(kRefs, at);
const size_t p = std::min(a, std::min(b, c));
@@ -304,7 +313,7 @@ int Server::speech_request(const json& body, const std::string& text,
ids_out);
if (p == std::string::npos) break;
if (p == c) {
for (size_t i = 0; i < refs.size(); ++i) render_ref(i, ids_out);
for (size_t i = 0; i < refs.size(); ++i) render_ref(i, ids_out, frame_map, frame0);
at = p + kRefs.size();
continue;
}
@@ -314,11 +323,14 @@ int Server::speech_request(const json& body, const std::string& text,
encode(is_inst ? i2 : t2, !is_inst && info.input_special, ids_out);
at = p + (is_inst ? kInst : kInput).size();
}
if (frame_map) frame_map->resize(ids_out->size(), -1);
};
render(!refs.empty() ? info.tmpl_ref : inst.empty() ? info.tmpl_plain : info.tmpl,
&r->tokens);
if (!refs.empty()) r->ref_frame.resize(r->tokens.size(), -1);
if (!info.neg_tmpl.empty()) render(info.neg_tmpl, &r->neg_tokens);
render(ref_direction ? info.tmpl_ref_instruct : !refs.empty() ? info.tmpl_ref :
inst.empty() ? info.tmpl_plain : info.tmpl, &r->tokens,
refs.empty() ? nullptr : &r->ref_frame);
if (ref_direction)
render(info.neg_tmpl_ref, &r->neg_tokens, &r->neg_ref_frame);
else if (!info.neg_tmpl.empty()) render(info.neg_tmpl, &r->neg_tokens, nullptr);
const size_t n_prompt = std::max(r->tokens.size(), r->neg_tokens.size());
if ((int64_t)n_prompt > info.max_prompt)
return fail(err_bad("input", "the prompt is " + std::to_string(n_prompt) +
+3
View File
@@ -372,6 +372,9 @@ HttpResponse Server::handle_stats(const HttpRequest&) {
o["prefill_chunks_capped"] = m.prefill_chunks_capped;
o["steps_decode"] = m.steps_decode;
o["steps_held"] = m.steps_held;
o["mixed_step_target_steps"] = m.mixed_step_target_steps;
o["mixed_step_target_misses"] = m.mixed_step_target_misses;
o["mixed_step_target_prefill_cap"] = m.mixed_step_target_prefill_cap;
/* Time inside steps. The one rate the page cannot derive: wall clock between polls also
* covers idle time (see SchedMetrics::step_ns). */
o["step_ns"] = m.step_ns;
+4
View File
@@ -142,6 +142,9 @@ struct SchedMetrics {
int64_t steps_ahead = 0; /* issued behind the step before, ahead of its commit */
int64_t prefill_chunks_capped = 0; /* held back for other work in the step (--busy-prefill-chunk) */
int64_t steps_held = 0; /* decode-only steps --prefill-interleave inserted */
int64_t mixed_step_target_steps = 0; /* mixed steps observed by --mixed-step-target-ms */
int64_t mixed_step_target_misses = 0; /* those whose completed wall time exceeded the target */
int64_t mixed_step_target_prefill_cap = 0; /* current learned mixed-prefill row cap */
int64_t decode_rows_unspeculated = 0;
/* Cumulative nanoseconds inside steps, all shapes and decode-only. Wall clock over a step
* count is not a step time: the engine idles between turns, and a prefill chunk costs an
@@ -753,6 +756,7 @@ struct AudioGenInfo {
/* RadAudioGenDecl's references: the prompt with them and one reference ("" when the model
* takes none), the clips' rate and frame, and the most of them and their samples. */
std::string tmpl_ref, ref_item;
std::string tmpl_ref_instruct, neg_tmpl_ref;
int64_t ref_rate = 0, ref_hop = 0, ref_max_samples = 0;
int32_t ref_max = 0;
};
+13
View File
@@ -154,6 +154,7 @@ void Metrics::sample(const SchedMetrics& m) {
/* Nanoseconds in the scheduler, seconds on the wire, as engine_step_seconds_* use. */
g_step_best_.set((double)m.step_ns_decode_best / 1e9);
g_step_recent_.set((double)m.step_ns_decode_recent / 1e9);
g_mixed_step_target_cap_.set((double)m.mixed_step_target_prefill_cap);
const int seen = std::max(0, std::min(m.draft_depth_seen, (int)MAX_DRAFT_POS));
for (int j = 0; j < seen; ++j) {
const int64_t r = m.draft_pos_reached[j];
@@ -184,6 +185,8 @@ void Metrics::sample(const SchedMetrics& m) {
c_steps_ahead_.advance_to(m.steps_ahead);
c_prefill_capped_.advance_to(m.prefill_chunks_capped);
c_steps_held_.advance_to(m.steps_held);
c_mixed_step_target_steps_.advance_to(m.mixed_step_target_steps);
c_mixed_step_target_misses_.advance_to(m.mixed_step_target_misses);
c_rows_unspec_.advance_to(m.decode_rows_unspeculated);
c_step_secs_.advance_to((double)m.step_ns * 1e-9);
c_step_secs_decode_.advance_to((double)m.step_ns_decode * 1e-9);
@@ -418,6 +421,16 @@ std::string Metrics::render() const {
w.counter("radiance:engine_steps_held_total",
"Decode-only steps run after a prefill chunk while other sequences decode "
"(--prefill-interleave).", L, c_steps_held_.get());
w.counter("radiance:mixed_step_target_steps_total",
"Mixed prefill/decode steps observed by --mixed-step-target-ms.",
L, c_mixed_step_target_steps_.get());
w.counter("radiance:mixed_step_target_misses_total",
"Mixed steps whose completed service time exceeded --mixed-step-target-ms.",
L, c_mixed_step_target_misses_.get());
if (g_mixed_step_target_cap_.get() > 0)
w.gauge("radiance:mixed_step_target_prefill_cap",
"Current learned prefill-row cap used while decode sequences are active.",
L, g_mixed_step_target_cap_.get());
w.counter("radiance:decode_rows_unspeculated_total",
"Decode rows that took no draft, for any reason.",
L, c_rows_unspec_.get());
+2
View File
@@ -149,6 +149,8 @@ private:
* rate over a window rather than an average dominated by startup. */
Counter c_steps_prefill_, c_steps_mixed_, c_steps_decode_, c_rows_unspec_, c_steps_ahead_;
Counter c_prefill_capped_, c_steps_held_;
Counter c_mixed_step_target_steps_, c_mixed_step_target_misses_;
Gauge g_mixed_step_target_cap_;
/* Seconds inside a step, all shapes and decode-only. Wall clock over a step count is not a
* step time (see SchedMetrics::step_ns). */
Counter c_step_secs_, c_step_secs_decode_;