radiance 1.11.0

New models:
- GLM-5.3-Flash reads pictures: its vision tower and processor (--image-tokens sets the budget),
  with decode kernels for a few rows and the DSA indexer split over the ranks
- Sage-A1.5 (fp8 and MXFP4) with its vision tower and a DFlash2 drafter
- Unlimited-OCR (bf16)
- Gemma 4 31B with z-lab's DFlash and RedHatAI's DFlash2 drafters; at four cards its all-reduces
  are fused with the junctions, overlapped with the compute and sent compressed
- Ornith-1.5-35B-A3B w4a8 compose files

Speed:
- Block drafters (DFlash, DFlash2) accept their drafts on the card, and the next step is issued
  ahead
- The four-rank all-reduce is faster for every --tp 4 model
- qwen35_w8a8: the norms and SiLU write the int8 linears' operands directly
- --attn-prefill-fp8 off|qk|pv|both: fp8 QK and PV legs for the h256 prefill attention (about +20%
  prefill on a 221K-token prompt for the 27B MXFP4 at TP2); lossy, off by default

Features:
- Control vectors: --control-vector off|on|disabled (disabled by default), a per-request switch,
  and the published Qwen3.8-Flash-Next refusal-direction vector (its license is in NOTICE)
- Krea 2: the `rebalance` request field, as ComfyUI's ConditioningKrea2Rebalance
- Cards with a small PCI BAR run, with kernel arguments kept in host memory
- Dashboard: live acceptance figures; statsdump rotates its file at a size cap
- KV caches every rank holds whole (GLM-5.3's latent and index caches) take one host-tier slot

Fixes:
- Long conversations taking turns no longer fall back to an early snapshot: a host-tier restore
  makes room as memory pressure does and waits a step for the previous turn's release (two
  conversations of 142K and 147K tokens sent back to back: 31.3 s per turn before, 2.8 s now)
- Kernels before Linux 6.16 (amdgpu below 3.64) no longer hang at startup: virtual memory
  management is turned off there, with a warning
- Gemma 4 dense scales its token embeddings as Hugging Face does (bf16), which changes its output
- The four-rank all-reduce fences prefill-sized messages, for a rare divergence after a fresh start
- GLM-5.3: every refusal names the setting and the reason; its template keeps string content
- Several pictures in one request no longer refuse processors that take one image at a time

Changes: Plugin ABI 26: out-of-tree plugins must be rebuilt. The environment switches the PRs
added are fixed rules or flags now (R4D_ATTN_FP8 is --attn-prefill-fp8).
This commit is contained in:
Deadcode committed 2026-10-23 11:57:52 +02:00
210 files changed
+14363 -2138

No files matched your search

+31 -10
View File
@@ -111,6 +111,12 @@ struct SchedReq {
* snapshot more than an interval below it. */
enum class HitCut : uint8_t { None, NoSnapshot, Window, Adopt, ResumedBelow };
HitCut hit_cut = HitCut::None;
/* Admission waited a step for a sequence's deferred release before cutting its restore
* (Scheduler::admit_one); it waits once. */
bool restore_waited = false;
/* That attempt's restore came back cut (SchedMetrics::prefix_restore_cuts, counted once the
* admission happens). */
bool restore_cut = false;
/* The whole sequence is prompt ++ output; n_computed indexes into it. */
int64_t seq_len() const {
@@ -322,25 +328,27 @@ public:
* A block-diffusion drafter (RAD_DRAFT_BLOCK) proposes a whole block of `block` positions in
* one pass, so there are no rounds; instead it runs two passes of different shapes.
*
* block_begin right after commit(), while plan() still describes the step just run.
* Reserves the draft KV block the query pass writes, and returns which
* sequences may draft.
* block_begin right after the step is issued, before commit(), while plan() still
* describes it. Reserves the draft KV block the query pass writes, and
* returns which sequences may draft.
* block_context the context pass, draft_pass -1. Its entries mirror the trunk step's
* row for row (BlockSeq).
* block_query the query pass, draft_pass +1. One entry per drafting sequence: the
* anchor at its next position, then `block - 1` masks; `out_ids` names the
* last `depth` rows.
* block_end moves the filled range over what actually ran.
* block_end after commit(): moves the filled range over what actually ran.
*
* The drafter writes its proposal to its declared proposal buffer, not through the sampler,
* and the engine publishes it through set_draft().
*
* On the card (`on_card`), block_begin runs before commit() instead, right after the step is
* issued, so both passes queue behind it with no readback in between. The context pass is
* unchanged: it mirrors the trunk step, whose positions the host knows. The query pass's
* anchor depends on acceptance, so its rows are device rows (advance.h, ADV_BLOCK) staged at
* the furthest position acceptance could leave, and the reservation covers that far.
* block_end still runs after commit().
* Both passes queue behind the step with no readback in between. The context pass mirrors the
* trunk step, whose positions the host knows. The query pass's anchor depends on acceptance,
* so its rows are device rows (advance.h, ADV_BLOCK) staged at the furthest position
* acceptance could leave, and the reservation covers that far.
*
* With `on_card` false, block_begin runs after commit() instead and stages the query pass
* from the committed sequence. The engine does not use it; it is the reference the
* scheduler's tests hold the card's staging to.
*/
struct BlockRow {
uint64_t seq = 0;
@@ -397,6 +405,12 @@ public:
* --busy-prefill-chunk is off, or when auto has nothing to reserve. */
int64_t busy_cap(int64_t n_computed, int64_t n_target, int64_t budget, int64_t reserve,
bool shared = false, bool rows_only = false) const;
/* Where a prefill chunk of a `n_target`-token sequence may end. For a sequence with a runtime
* window (IKVManager::set_window) a chunk ends at the prompt, and past it the output a
* recompute replays runs one token a step: the ring rewrites its slots in place, so a
* multi-token chunk past the floor would overwrite keys its own earlier rows still read, while
* one token a step attends as its decode step did. Otherwise `n_target`. */
int64_t chunk_end(const Request& r, int64_t n_target) const;
private:
Program* prog_ = nullptr;
@@ -429,6 +443,13 @@ private:
* meta.n_layers; drafter layers bind from `base_layer` up) that the cache does not index?
* Unlike a drafter hole, recomputing the tail cannot repair it; see admit_one. */
bool hit_holes_trunk_ = false;
/* R-SWA: the groups whose KV manager carries per-sequence runtime windows, with the W a
* sequence is armed with (IKVManager::runtime_window_tokens). Empty for every model that does
* not declare one, in which case admission and commit are exactly as before. A sequence with
* one keeps its prompt as a reference and decodes into a ring after it; it is excluded from
* prefix publish, checkpoints and speculation (the window is runtime data). */
struct RswaWindow { int32_t group = -1; int64_t tokens = 0; };
std::vector<RswaWindow> rswa_windows_;
/* Draft refill: the drafter's window where a hit can leave a hole in a windowed block
* drafter's cache, else 0. The drafter would be declined until its window slid past the hole,
* which on a chat's follow-up turn is most of the reply, so the hit ends one window before the