Commit Graph
61 Commits
Author SHA1 Message Date
keptn42 da7b911c64 abi, sched: placeholder runs read both ways
An encoder states that the language model reads a picture's or video
frame's placeholders both ways (RadEncoderDecl::bidirectional). The
scheduler then ends no prefill chunk inside such a run, and a trunk
pass names its runs and the keys their rows see (RadBatch::n_bidi).
Fields appended; such a pass is not recorded.
2026-11-04 07:20:43 +01:00
Constantin c96cfc9e7b test: verify DSpark device KV rollback 2026-11-03 13:56:46 -05:00
Memoria (Noblistic) e53286cdbe dashboard: the history figures mean what their labels say
Five changes to one leg, committed together because they are one claim: a number on the
dashboard should be readable as the thing it is named for. They were deployed as
1.15.1-histfix without being committed, so the running engine carried code no commit
described, and a review of the working tree could not see its own context.

History labels. "avg" becomes "mean", the window figures appear only once enough rows
exist to be the window they name, ttft says median, and every history column carries a
title= spelling out what it averages and over what. A legend that has to be inferred
from a column header gets inferred wrong.

The prefill instrument. The history computed prefill speed as prompt tokens over
time-to-first-token, which charges queue wait to prefill; GUIDE:2808 warns against
exactly that formula. The scheduler now stamps admission and reports prefill_s, so the
column measures admission to first token. The page falls back to ttft when an engine
reports no admission time, so it still works against a stock build.

Windows in seconds. Every displayed window was a sample count, so "60s" meant 60 samples
and its span drifted with the poll rate: 60s at 500 ms, 6s at 100 ms. The rings now prune
by accumulated time and the sparkline's x axis is time-proportional rather than sample
index, so a busy stretch gets the room its seconds deserve and a gap in the samples shows
as a gap in the line. This is the precondition for the interval control below; at a fixed
rate the two agree, so a full ring draws exactly as before.

The interval control. An Advanced view with two editable fields, idle and busy, held in
localStorage: the cadence belongs to whoever is reading, not to what is serving, and the
server has no writable config that would survive an image swap. Both are plain numbers
rather than a mode switch, because the point is that the reader sets the rate; equal
values are one fixed rate and the summary says so.

Wind-down. The tile detail lines now sample on every poll, so "recent" follows the
engine's own idle decay instead of holding the last figure it saw, and a window older than
its own span is cleared rather than drawn as if continuous.

Fixes from an independent review on qwen, which found the first two:

admitted_us was never reset when a slot was recycled. add_locked only allocates when the
slot's pointer is null, so the struct survives release_locked with every field it does not
list intact, and the first-admission guard then kept the previous request's stamp. The
interval spans two requests, the stale stamp is always older, so prefill tok/s reads low
rather than missing. It reaches every row once the slot pool turns over. It feeds only
this one dashboard column: the engine-wide prefill tile uses an independent windowed
counter, and no admission, eviction, preemption or KV path reads the field.

Two tooltips still said prefill includes queue wait after the instrument stopped charging
it. Both now say what the code does and disclose the fallback, since one window can mix
rows measured from admission with rows fallen back to ttft.

Verified: both targets build clean. dashboard_test 241 checks over 8 cases, sched_test
62644 over 184, no failures. The new sched_test case drives submit, finish, reap and a
second submit onto the recycled slot and asserts prefill_s never exceeds ttft_s, since
admission cannot precede arrival; it fails against the bug and passes after the fix, so it
can fail. The embedded page parses under node --check, and 30 checks now execute the
shipped spark(), the clamp and the cadence trigger sliced out of the page rather than
restated: time-proportional spacing, the right-edge fill at startup, a sample gap drawn as
a line gap, the 100 ms floor, and the old storage key migrating to a flat rate. Not
tested: the controls' behavior in a real browser, and how the session extreme should read
when it outlives a cleared window.

Found in review by an independent qwen workstream; the slot-reuse finding was confirmed
by a second adversarial pass and against the source independently.

Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
2026-11-03 18:09:49 +01:00
fl0l0u 1c967b2f14 sched+engine: keep a scored request's size from reaching the pinned pool
A scored request asks the engine for the logits of chosen candidate ids
at its prompt's last position (Request::token_scores). Three places
where that readout's memory was someone else's decision:

The candidate list was bounded by value, never by count, and the count
is what a scored step pays for: the step stages the union of every
staged request's candidates as hidden and table rows in one pinned host
buffer, before anything is admitted or accounted. One request naming a
million ids -- any caller of the raw request seam -- is a multi-gigabyte
pinned allocation the box either loses or dies on. add_locked caps the
list at 4096, orders above what a decision request names (its prompt's
written answers, a few dozen), and says so in the refusal.

And when the pinned allocation is lost anyway -- the cap bounds one
request's rows, not the batch's union, and the pool can be low for
reasons of its own -- stage_scored_rows returned E_NOMEM into the step
loop's fail path: the whole engine stopped, every connection with it.
It cancels the scored requests instead, on the step loop's existing
deferred-cancel vector the sampler's grammar failures already use: a
request whose scores the box cannot hold is that request's failure. No
alloc-failure seam exists to test the branch directly; its cancel path
is the sampler stage's, applied at the same join.

And declare_scores now refuses a head table shorter than the
vocabulary: the scored readout indexes it by token id, the scheduler
bounds candidate ids by meta.n_vocab, and a table a few thousand rows
short turns the last block of the vocabulary into a read off the end of
a weight -- a device fault, not a refusal. Padding past the vocabulary
reads fine and stays fine.

sched_test: a_scored_request_names_at_most_the_candidate_cap.
build_test: declare_scores_wants_a_table_that_covers_the_vocabulary.
ASan+UBSan: sched/build/server/systemone/config/diag, 6/6.
2026-10-31 07:50:43 +01:00
baKon 9560780bfa sched: a preempted prefill reclaims cache and leaked state slots before it waits
The whole-recompute gate refused a preempted request forever when the pool held only cache entries, and an empty running set left a leaked state slot unreclaimed. Reclaim the cache over several rounds, release idle state slots when nothing is running, and admit the overdue waiter if it can ever fit. A prefill is never a victim while a decoder is running; tests cover the deadlock, the leaked slot, and the lost KV sequence.
2026-10-30 21:32:03 -05:00
Deadcode 9ed3ef7a7b radiance 1.15.0
New models and formats:
- IQR for Qwen3.8-27B: weights on the int8 grid under GPTQ, a trellis down each GPTQ column
  (IQR-V2), and IQR-V3, a computed trellis code under one scale a row, kept at its codes' width in
  VRAM and decoded in the GEMM; 15 IQR-V3 recipes from ~2 to ~7 bits a weight
  (data/recipes/q38-27b-*-v3.recipe, docs/IQR.md)
- libhalo: a kernel library for Strix Halo (gfx1151), preferred there over libr3d
- Nemotron 3.5 Embed 1B and 8B (nemotron35_embed): text and image embeddings through a Pixtral
  tower, on the card and on the CPU
- Nemotron 3.5 Rerank 8B
- /v1/systemone: Cloudflare's clef and clef-flash, Convai Innovations' Laya and Mica beside
  LiquidAI d1; scored steps read the candidates' logits from the head table with no lm_head pass
- LFM2's 8-bit trunk: block-fp8 or int8 linears with the fused producers, and the d1-3B recipe
- DeepSeek-V4.1's reply format with DSML tool calls and typed argument tags

Weights on the drive:
- The file tier reads only the experts the pass routes rows to; the draft head's weights stay in
  the host pool
- A hot VRAM cache for routed experts read off the drive, reads deposited straight into free host
  pool slots, and copyless evictions; the file tier's counters are now ssd_*
- GLM-5 Next shards its routed experts by expert, not by width, so they can live on the drive
- The stall watch counts drive reads as progress, and the DMA lane's room check reads the lane's
  own completion fence

Quantisation tooling:
- --calib-corpus, --calib-dir and --calib-layers record each linear's input Hessian; beside
  --kld-record the reference's own run records them
- --kld-top N records a sparse KL reference (the N most likely tokens and the tail's mass)
- GPTQ in a third of the time with the same codes, trellis GPTQ on the card, vector codebooks
  with coordinate descent, and rad-convert --reuse repeated, each container supplying what the
  earlier ones lack

Speculation:
- Prompt lookup alone (--spec-ngram K, --spec-ngram-min/-max): each sequence keeps an index of its
  n-grams, and a proposal is verified only when its measured step cost says it pays;
  --draft-window adaptive follows it

Speed:
- IQR decode: the narrow tile splits K for four times the int8 tile's waves and folds each 128-K
  block once; at 8 tokens down and the output projections run in 0.61-0.82x and 0.70-0.92x FP8's
  time (2-6 bits); IQ6R-S-V3 with its DFlash2 drafter steps in 26.3 ms at TP2, against 29.4 ms
  before and FP8's 27.3
- Qwen MXFP4 feed-forward: the gated fold up to 16 rows, not 8
- libr4d: the gated prefill fold, the short-prompt split row, and the rows forms of rmsnorm and
  rope; KLATE again for the head-256 gqa6 paged prefill; gram_accum on the matrix cores

Features:
- /health, /v1/health and /ping answer 503 with "status": "stuck" once the device has advanced
  nothing for a minute or a queue has faulted, so a supervisor can restart a wedged server (#356)
- --image-gen-max-pixels and --image-gen-max-refs size an image generator's buffers (#344)
- The startup report lists only the options not at their default, with a count; -v lists all
  (#250)
- --preempt-wait-ms bounds how long a preempted prefill waits for its whole-recompute room
- --placement layer_offload spills dense layers so one --max-model-len sequence fits
- Startup refuses amdgpu with CWSR off and says how to fix it;
  --proceed-with-incompatible-configuration starts anyway under an UNSUPPORTED banner

Fixes:
- The n-gram read-ahead hands each row to the reader once and reads only as far ahead as the row
  cache holds, and pauses while decode reads: about one drive read a row instead of two (#355)
- A file-tier window reads each of its runs once, not once a run per run
- The decode split law's verify floor is bounded by the batch's workgroups: max_seqs 256 no longer
  declares 64x the scratch (#342)
- A prefetch DMA list's mark stays out of the signal pool until the engine has read it, and a
  prefill stage copies only the blocks its own tables name (#343)
- The split-KV row sum is read with fetch-inactive (#328)
- LFM2 on the host backend: libref and libavx serve the row-form ops it declares (#348)
- The preempted-prefill gate skips a KV group that holds no blocks (#352)
- Every request entry point bounded, gated and sanitised (JSON depth, invalid UTF-8, control bytes
  in the log, the dashboard's CSP, cross-origin browsers on the loopback-only routes); a prompt id
  outside the vocabulary refused at admission; --api-key "" refused at startup
- The telemetry the HTTP thread reads is atomic
- An RMS norm row no longer depends on how many rows its launch carries; prefill attention's
  rescale is decided by live rows only
- A --kld-record prefill chunk that finishes no sequence gets its logits on a tied-head model
- A kernel's lazily made counter block is zeroed outside the lock other ranks take (a TP2 first-step
  hang)

Changes: Plugin ABI 32. Every plugin exports a layout fingerprint of the ABI structs and the loader
refuses a plugin without it or with another (#302), so out-of-tree plugins must be rebuilt.
Appended: RadBuildCtx calib_* and gen_max_*, RadArchProbe gen_max_*, RadBatch score_only and
plugin_words, RadDeviceProps::unified, RadChatFormat arg_json_value_prefix.
2026-10-30 22:01:01 +01:00
DeadcodeandClaude Opus 5.5 d773992abc [FIX] restore the prompt vocabulary check, the empty --api-key refusal and scored steps' issue-ahead rule
33108e48 (the preempted-prefill gate's wait bound) was cut from an older main and, landing, took
back three changes that had merged before it:

- a28221eb: a prompt id outside the vocabulary is refused at admission (Scheduler::add_locked),
  never staged into a pass where the embedding gather faults the device and stops the engine; and
  its test, a_prompt_names_real_vocabulary_rows.
- b9c685a9: --api-key "" is a startup error, not a server that looks guarded and answers every
  keyless request; and the guide's lines on it and on the loopback-only routes.
- ed1e5caf: a scored row the step in flight finishes gets no step issued ahead; and its two tests,
  the non-scored one with a token left after the step in flight so that a step ahead exists (#349).

The wait bound itself, the lookup index and the rest of 33108e48 are unchanged. sched_test 176,
config_test 62 and server_test 177 cases pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qthwau4zwWgAaD8vZrycp1
2026-10-30 12:18:29 +01:00
mici81andClaude Opus 5.5 8df9240d65 sched: the preempted-prefill gate skips a KV group that holds no blocks
Every program carries a sentinel KV group at index 0. KVGeom reads its decl.kind 0 as RAD_KV_FULL
with block size 1, while the manager's plan for it pages nothing and owns no block. The gate
(e668d49) walked every group KVGeom calls paged, so for the sentinel it wanted the whole prompt,
one block a token, out of a pool of none: a preempted request was never readmitted. The bound on
the wait (33108e4) cannot help, since preempting running requests frees nothing in that group.
engine_e2e_test's qwen35_preemption_by_recompute_changes_no_logit hung on it (the KL recording of a
small pool: one preempted document, nothing left running); with the group skipped it passes in
0.9 s. It may also be the live request in #346 that waited 710 s with gen=0.

The gate now skips a group with no blocks (total_blocks 0), as KVManager::ensure skips a group its
plan does not page.

sched_test: a_preempted_prefill_ignores_a_kv_group_that_holds_no_blocks (a group the scheduler sees
as full and the manager as empty; the preempted request stayed Preempted after the pool emptied
before the fix). 173 cases pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 12:11:13 +01:00
Gaspa79 94c90b17ad nemotron 3.5 implementation 2026-10-30 10:22:53 +01:00
baKon 33108e488b sched: a bound on the preempted-prefill gate's wait 2026-10-30 10:21:57 +01:00
Code000andPi ed1e5caf9d core, abi: scored steps -- rad_declare_scores, RadBatch::score_only, and /v1/systemone's model
A scored request (Request::token_scores, what /v1/systemone asks: the raw logits
at a few candidate ids) does not need the half-gigabyte lm_head read the sampler
would consume. A plugin whose head is the bf16 embedding table declares the
final-normed hidden rows and that table (rad_declare_scores); on a step whose
sampled rows are all scored rows and whose program declared both, the core sets
RadBatch::score_only, the plugin issues everything but the head, and the core
reads the hidden rows and the candidates' table rows back and takes the dot
products in f64 on the host. RadBatch gains one trailing int32 (score_only, 360),
which the pass key mixes; an older plugin never sees it set.

The scheduler issues no step ahead of one that brings a scored row to
max_tokens: that forward pass reads nothing and a max_tokens=1 question would
pay a decode step after its prefill. Scored rows only -- every other decode keeps
the step of overlap it had.

/v1/systemone reports which model answered.

Co-Authored-By: Pi <pi@localhost>
2026-10-29 16:23:28 +01:00
fl0l0u a28221eb6a sched: refuse a prompt id that names no vocabulary row
The scored-prompt path (Request::token_scores) has always vetted its ids against the
vocabulary; the prompt itself never was. Raw id arrays arrive at admission verbatim from
the request body -- /v1/completions, /v1/embeddings and the generator take them -- and an
id past the embedding table is gathered by the step, fails it, and a failed step is a
device fault (spec 17): one request, {"prompt":[2147483647]}, ended every session on the
server. The check belongs at admission, where a refusal is a 400, not mid-pass, where it
is an exit.

The sched fixture's model declares 512 vocabulary rows and its requests spell prompts
from 1000 up; admission now refuses those, so the fixture's vocabulary moves above the
ids it uses.
2026-10-29 16:22:35 +01:00
baKon 187a015bda sched: tighten preempt gate headroom and test pool 2026-10-29 13:16:07 +01:00
Bakon e668d493d9 sched: gate preempted prefill on whole recompute plus running headroom 2026-10-29 13:16:07 +01:00
Deadcode 4a61d7296b radiance 1.14.0
New models and formats:
- libr3d: a kernel library for RDNA3 (gfx11) cards
- nomic-embed-text-v2-moe (the nomicbert plugin)
- Gemma 4 E2B with its per-layer MLP width, and Google's unmodified E2B/E4B directories in bf16
- DeepSeek-V4.1-Flash converted straight from its release: the Engram tables, the fused imatrix and
  rad-convert --chat-template for a release that ships no template
- GGUF Q8_0, Q4_K and Q6_K tensors import as their planes; rad-convert writes them without a recipe
- Qwen3.8-Flash-Next-FP8 converts and serves through qwen4exp_fp8

Speed:
- hc_read's decode kernels as one grid (34.7 -> 25.2 us at 4 rows) and its tiled up-mix pipelined
- gemm_fp8a8: the narrow form's scales staged through LDS (Flash-Next int8 at 32 rows 83.6 -> 68.3
  us), the gated three-tile form at 8 waves (gate_up at 48 rows 272.9 -> 180.6 us)
- Qwen3.8-27B: the delta net's out-projection read beside its decode recurrent update (x1 19.40 ->
  19.10 ms a step), and the verify's split-KV attention sized by context depth (x3 at 180K 42.4 ->
  40.3 ms a step)
- Hy-Memory (HYV3) decode: fused QK norm, RoPE and KV store, residual adds folded into the norms,
  coalesced one-token expert GEMMs
- spechub: the coupled verify walks the live candidates only (151 -> 31 us a launch)

Speculation:
- DFlash2: lossless coupled acceptance at T > 0 (--draft-coupling on)
- A block drafter's proposals verified as a tree, on by default for the Gemma 4 31B's DFlash2, with
  a block-16 tree that runs its short block under load

Features:
- Decode-hot residency: --draft-expert-placement host, --expert-profile, --expert-pin-top, and
  --expert-stats FILE for the routed experts each layer selects
- --ngram-placement ram=DIR: one n-gram table shared by engines on separate cards
- Prefix cache: --prefix-resume exact (default) resumes a hit on the cold run's own chunk grid, so it
  answers bit-identically; snapshots at a head other prompts share, from 528-token prompts, and for
  tip-only one drafter window below the tip; hits on models whose KV groups have different block
  sizes; the snapshot store keeps a floor of 8 ahead of --host-headroom-mib
- Typed tool-call argument tags; rad-chatparse --request renders and reads back one request as the
  server does
- MiniMax-H3: keyframes ride a latent upscale
- Gemma 3's fused all-reduce junction on the lossy wire

Fixes:
- A speculative step shorter than its band (an MTP step of 4 rows at gqa 8) no longer stops the
  engine with a scratch refusal at issue (#293)
- --p2p off: prefill back to 1.12.0's rate; 1.13.0's push check read a host-memory slot over the link
  twice (#323)
- A chat template that cannot render a conversation is refused at load, not mid-request
- imatrix entries found under llama.cpp's spelling; the W4A8 prefill's tail scale read; the GDN conv
  kernels on an f32 weight; dense integer rows at the group they compute (a Q8_0 weight at group 32)
- --expert-profile refuses a profile recorded on another model
- hc_read's one-grid wait traps past its deadline instead of reading a stale value

Changes: Plugin ABI 31, unchanged. RADIANCE_DRAFT_TREE, DFLASH2_TREE_NODES, DFLASH2_TREE_TEMP and
DFLASH_Q_TEMP are gone (trees run where the probe says they pay; temperatures 1.25 / 0.6).
2026-10-29 12:04:24 +01:00
baKon 662b7720b5 core/sched: a prefix hit resumes on the cold run's chunk grid, so it recomputes the cold run's own chunks
A hit recomputes the tokens past where it resumes. Kernels may round a row differently at another
chunk length (spec §17: the fp8 GEMM's split-K count is chosen from M), so a hit that recomputes
its tail in other chunks than a cold prefill of the same prompt can flip a near-tie in greedy text.
On the DeepSeek-V4.1 daily (TP4) a 24k-token prompt that hit a 16k one's tail snapshot resumed at
15856, ran a 528-token chunk to the next boundary and answered differently from its cold run.

--prefix-resume exact, the default:

- ChunkGeometry carries the grid an idle server's cold prefill chunks on: --max-num-batched-tokens
  rounded down to the quantum, or the checkpoint interval where chunks split at it and it is the
  smaller, times the span from the second interval on.
- plan_chunk writes checkpoints only on that grid. A prompt's tail snapshot is taken where its last
  chunk starts (sliding-window snapshots keep their one-block margin) instead of at its last
  quantum boundary. The chunk already ends there, so a long cold prompt no longer runs a short
  extra step at its end.
- A checkpoint interval past the chunk must be a multiple of it; otherwise it is rounded up, and
  startup says so.
- admit_one steps a hit with no snapshot to resume from (full attention) back to the grid. A
  request's own checkpoint (Request::checkpoint_at, /v1/systemone's shared head) is honored where
  it falls.

--prefix-resume nearest keeps the previous rule.

The cost is re-prefill: an exact repeat runs the cold run's last chunk again, and an agent's next
turn resumes where the previous prompt's last chunk started, about half a chunk more than nearest
(2048 tokens at a 4096-token budget). The property holds on an idle server; a prefill that shares
its steps with decode rows or other requests (--busy-prefill-chunk, --prefill-interleave) is cut
differently, as batching already changes greedy text.

Tests: sched_test covers the grid for six geometries (GDN hybrid, interval past the budget, span,
periodic and tip-only window snapshots, full attention), the interval rounding, the tail snapshot
at the last chunk start, admission stepping back to the grid, and a property over prompt lengths:
every checkpoint is a chunk start of the cold run of its prompt and of any longer prompt it
prefixes, and a hit from it cuts the cold run's chunks. config_test covers the flag.
2026-10-28 12:50:54 +01:00
baKon f43929ccb8 core/mem, core/sched: a prefix hit on a model whose KV groups have different block sizes, and a hybrid's window in the checkpoint slot
DeepSeek-V4.1 declares its compressed attention at one KV row per r tokens: kv_index_r2 and
kv_compressed_r2 at 2-token blocks, kv_index_r1 and kv_compressed_r1 at 1-token blocks, beside a
16-token sliding window (kv_window), a linear compressor state (kv_comp_tail_r2) and a conv window
(kv_engram_tokens). On that model no request ever reused a token, for two reasons:

- PrefixCache::configure took the first full group's block size as its granularity and left every
  paged group with another block size out ("block 1 != cache granularity 2: not cached").
- KVManager put a trunk's window in the checkpoint slot only on a model without linear state, and
  the scheduler refuses a hit that leaves a trunk group uncovered. With linear state beside the
  window, every hit was zeroed (HitCut::Window).

Either alone leaves the hit at zero. On an agent's growing conversation that is the whole context
prefilled again every turn.

The cache now holds every paged group but a windowed one. An entry covers the lcm of their block
sizes and holds lcm / B blocks of a group with B-token blocks (PrefixCache::entry_groups,
blocks_per_entry). A lookup hands each group its own blocks for adopt(); insert, eviction, trim,
rebind, restore_room, release_session and unshared_tokens count per block; trim() and trim_for()
count entries. The chunk quantum is already a multiple of every paged group's block, so
checkpoints and hits stay on the entry grid. With equal block sizes an entry is one block a group,
as before.

A trunk's window rides in the checkpoint slot whether or not linear state is beside it; the slot is
the state, then the window pages, the layout KVManager::checkpoint_copy already walked. The
scheduler lets a hit stand on a windowed trunk group when it resumes at a window snapshot
(win_hit no longer needs a model without linear state); any other trunk group the cache does not
hold refuses the hit, as before. The reserve's trim asks for entries, from the group furthest
short. The idle tiers move an entry as its blocks: TierExec and the slot layout take
entry_groups(), where a group appears once for each block it holds in an entry, and the VRAM
estimate counts the same.

No plugin on main has a window beside linear state or paged groups of different block sizes, so
every model here keeps its cache and slot as they were. DeepSeek-V4.1 (#266) has both; its slot
grows by the window's pages (10 blocks of kv_window, 6.25 MiB a rank at TP4).

Tests: mem_test -- an entry at the lcm over block sizes 2/1, 2/4 and 16/2 (lookup blocks, adopt,
refcounts, eviction and trim in entries, restore_room, unshared_tokens), a publish short of one
group's blocks refused and unwound, checkpoints on the entry grid (and the binding's key), an
interval off the grid refused, a hybrid with a window and mixed blocks, an entry over mixed block
sizes through the host tier byte for byte (one to three ranks, replicated beside zero), and a
checkpoint carrying linear state and the window together; the window-snapshot rule's test now
expects the window beside linear state. sched_test -- a hit on a hybrid whose slot carries the
window resumes at the snapshot, a trunk group neither cached nor in the slot refuses the hit, a
hit over mixed block sizes adopts each group's own blocks, and the reserve trim asks for entries.
2026-10-28 12:50:54 +01:00
mici81andClaude Opus 5.5 74e701ea17 prefix cache: a snapshot at a head other prompts share
A model with snapshots (recurrent state, or a sliding window the cache does not index) resumes a
hit only at a snapshot, and those are taken on the checkpoint interval and at each prompt's tail.
A head every request starts with -- the same system prompt or instructions in front of a different
text, as a translation service sends its pieces -- is usually shorter than an interval, and each
tail is its own, so the head was computed again by every request.

The cache now counts the blocks published right after each block (Entry::n_children) and reports
where a lookup leaves a head that at least two cached prompts already left differently
(CacheHit::branch_at; one is not enough, the next prompt could be the same conversation going on).
When nothing resumes within kSharedHeadMin (256) tokens of that point, admission sets the request's
own checkpoint there (Request::checkpoint_at, which n > 1 already uses), and the requests after it
skip the head.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 18:17:21 +01:00
Deadcode 6645337f69 radiance 1.13.0
New models:
- Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls
- M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% ->
  92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints
- Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by
  default; Ornith-1.5-122B compose files

Speed:
- Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default):
  the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13%
- Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a
  step at 25-41K context), and the prefill KV split for small launches (a short turn over a long
  context decodes the other sequences 27% faster in that step)
- MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows:
  TranslateGemma +2-5% at 2-8 streams)
- ParoQuant int4/int5 tiled GEMMs 6-9% faster
- Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one
  that ends its requests, and the MTP head's first draft no longer collapses after short chats in
  the prefix cache

Features:
- --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3)
- MiniMax-H3: reference media and keyframe conditioning with the VAE encoders
- Krea 2 rebalance presets balanced, detail and subtle
- The dashboard's request history; a stall watch that reports a frozen step's thread and stack
- rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's
  per-layer embeddings read ahead off the step path
- A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container

Fixes:
- The two-rank all-reduce checks that a peer's push has landed before reducing it
- z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit
- MiniMax-H3's modulation rows

Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is
--weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT,
R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone.
2026-10-27 16:47:35 +01:00
AshlynandClaude Opus 5.5 66c86b9f89 speculation: a group the window snapshot restores is no hole in a drafter's KV after a prefix hit
On Gemma 4 (sliding layers the prefix cache does not index, no linear state) a hit resumes the
trunk's window from a window snapshot. The check for a hole in a block drafter's own KV after a
hit counted every paged group the prefix cache does not index, the trunk's windowed one included,
so it found a hole the snapshot fills. z-lab's DFlash drafter keeps a full-attention cache, which
the prefix cache indexes; with that false hole its floor sat at the hit, and with no window to
slide it was declined for the rest of every turn after a hit (on the 31B: 1.00 tokens a step on
those turns, 4.25 with this). The scheduler now counts a group the snapshot restores
(IKVManager::window_snapshot, the KV manager's KVGroupPlan::win_snap) as no hole, and the startup
line says how many: `draft floor: 3 paged group(s), 2 prefix-cached, 1 in the window snapshot -> a
hit leaves no hole`. A drafter's own windowed group is not in the snapshot, so DFlash2 and every
model with linear state are unchanged.

Tests: sched_test (a full-attention drafter drafts at once after a hit the window snapshot resumes,
and with the trunk's window counted as a hole never drafts again that turn; the fixture gains a
full-attention trunk).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:21:44 +01:00
AshlynandClaude Opus 5.5 bf6c019571 engine: stream a step's tokens before the drafter's passes behind it end
Since 1.11.0 a block drafter's context and query passes (DFlash, DFlash2), like a serial drafter's
rounds (MTP), are queued behind the step before its readback, and the host waited for all of them
before it read the sampled ids. The ids' copy was already issued ahead of the passes, but the
commit that streams the tokens came only after the passes had run: every token, the first one
included, reached the client a drafter's passes late.

The copy now has an event of its own (tok_end_). collect_step waits on it, the commit streams the
tokens while the card runs the passes, and the step loop waits for the step's end (step_end_)
right after the commit, before finish_*_drafter reads the slots and before anything else is
issued. The commit issues no device work, so whatever it releases is in use only by the passes
that wait covers, and the next work that could reuse it is issued after the wait. KL mode and
embedding programs keep the old wait; RADIANCE_IDS_EARLY=0 restores it, for an A/B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:18:57 +01:00
AshlynandClaude Opus 5.5 f55570e351 sched: no step issued ahead behind a step that ends every request it carries
A pipelined engine issues each step's successor before the step is read back: block drafters
(DFlash, DFlash2) since 1.11.0, serial MTP and decoding without a drafter since 1.0.0. The step that
emits a request's last token therefore had one more step queued behind it, for a request its commit
then finishes. That step verifies nothing, yet the card runs its whole forward pass and the
drafter's context pass behind it, and a request that arrives once the last token is out -- a
single-stream client's next turn, sent as the reply ends -- waits for all of it before its prefill
starts. On Qwen3.8-27B ParoQuant int5 with DFlash2 on one R9700 that is about one decode step (34-53
ms) of TTFT on every back-to-back request (#225: 105 -> 139 ms); for 127 requests 1.12.0 ran 806
decode steps, all issued ahead, against 1.8.1's 680.

Scheduler::step_next_locked, beside the other rules for issuing ahead and before the next step's KV
is reserved, now issues nothing when the step just issued ends every request it carries: when it can
bring each to its max_tokens (certainly with the token it emits, possibly with the drafts it
verifies: output + 1 + drafts >= max_tokens), or, most likely, when those drafts hold an
end-of-generation id (ignore_eos requests excepted). The engine hands the scheduler the
end-of-generation ids at start (set_eog), the sorted list the card's acceptance reads. A guess that
misses (a drafted end the verify rejects, too few drafts accepted to reach max_tokens) costs one
step built after the commit instead of before it. Ends it does not predict still leave one step
behind: an end the verify chose itself, a stop string, the context limit. Without a drafter only
max_tokens ends are caught, exactly. At -v the commit names each request that ended with a step
issued ahead behind it (finish reason, its last step's tokens and accepted drafts, output against
max_tokens, whether its drafts held an end).

Tests: sched_test pins both halves (a drafted end issues and reserves nothing; a request whose next
token is its last, or whose token and accepted drafts could reach max_tokens, issues nothing; an
ignore_eos request's drafted end, drafts without an end, and a request that every draft accepted
would leave a token short still issue ahead; of two requests one going on, both issue ahead); the
test of a request finishing under a step issued ahead now ends it on an end of text the scheduler
cannot see coming. engine_e2e_test: two 32-token replies without a drafter are 62 decode steps, all
issued ahead, not 64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:18:33 +01:00
C_Tamas a9e627b7ca engine: the KV plan split, the host mirror, and --kv-resident bring-up 2026-10-24 19:19:19 +07:00
Deadcode 5a9ce4912b 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).
2026-10-24 13:12:28 +02:00
John d6957e88a1 sched: skip periodic window snapshots under tip-only
Treat tip-only as a true opt-out from periodic window snapshot creation and interval chunk splits, while retaining the existing tail snapshot and explicit request checkpoints. Leave recurrent-state scheduling unchanged and report the effective chunk bound accurately.

Cover geometric-backoff and keep-all interval behavior, tip-only chunk planning and single-snapshot reservation, aligned and short prompts, explicit checkpoints, and recurrent-state scheduling.
2026-10-24 11:08:38 +02:00
John 192fe10278 sched: checkpoint sliding windows at prefill intervals
Keep intermediate window snapshots as well as the prompt-tail snapshot so a tail edit can resume below its divergence instead of re-prefilling the entire matched prefix. Reuse the existing checkpoint retention policy and preserve the pre-template-divergence tail boundary.

Add scheduler and cache regression tests for interval snapshots, aligned prompt tails, constrained chunk budgets, and edited-prefix lookup. Update the geometry report and guide to describe periodic window snapshots.
2026-10-24 11:08:38 +02:00
mici81andClaude Opus 5.5 da52bc8593 review fixes of the block drafter's short block (independent review)
- declare_drafter: a block drafter's proposal_pitch, now the row pitch the engine reads row s
  at, defaults to depth (it defaulted to 1, which a pitch-reading engine would take as packed
  rows: wrong drafts from the second sequence and a read past the readback) and is refused
  under depth. The engine's fallback goes.
- run_block_drafter: hysteresis -- the short block goes on at --draft-short-from decoding
  sequences and off only two below, so a load wavering at the threshold does not switch the
  block (a new pass shape, the adaptive estimates) every step. Comment: the proposals are for
  the next step.
- block_begin's comment: after a long block a short one's reservation stops short of the trunk
  step's end; the rejected rows past it land on freed pages with slot -1, which every kv_store
  drops. Named as the load-bearing rule it is.
- The --draft-short-from warning names a serial head as such; the arch_test stub returns the
  real builder's codes.
- build_test: the pitch's default and refusal.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 11:24:45 +00:00
mici81andClaude Opus 5.5 90e14c5015 block drafter: a short block chosen per step by load (--draft-short-from N)
A block drafter proposes its block whole, so the block's length is paid for every drafting
sequence whatever each verifies. At one sequence a long block pays: Qwen3.8-27B + DFlash2
(block 8, --draft-window adaptive) decodes one stream 135 -> 155-165 t/s against block 4. At
sixteen it does not: block 8 750-790 t/s, block 4 900, its drafter rows and weaker first
positions costing more than the extra drafts bring. --draft-window adaptive alone cannot help,
since it only shortens what each sequence verifies.

- rad_drafter_short_block(b, block): additive export (RAD_ABI_VERSION unchanged); the plugin
  declares that its query pass also runs at `block` rows a sequence. Builder validates it
  (block drafter, shorter than its own, still proposes).
- --draft-short-from N (default 0 = never): the engine stages the short block once N sequences
  decoded in the step just run (Scheduler::decoded_seqs).
- The engine reads the proposals at the drafter's declared row pitch, not at the step's count:
  dflash_select writes row s at s * pitch, and a short block fills only a row's front (with the
  pitch read as the count, every sequence but the first got the wrong tokens).
- Dflash2: a short block of 4 rows (depth 3) wherever its own is longer: its own convolution and
  selector ops at that block (every other op is per row); the query pass picks by T / n_seq and
  fails the step on a block it has no ops for. qwen35_fp8 and gemma3 declare it.
- Tests: build_test (the declaration's checks), arch_test (the qwen35 family's short query pass
  runs the short ops, a block without ops fails the step; the DFlash2 pin moves), config_test.

Measured (Qwen, speculation 7 adaptive, short block from 4 sequences, against production's
speculation 3 fixed): one stream +15-20 % (kratky) / +9 % (syslog), 4 streams +3 %, 16
streams equal (915 / 906 t/s).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 11:24:35 +00:00
Deadcode 9eaf10da6e 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).
2026-10-23 11:57:52 +02:00
d912c694f3 feat(sampler): port linear MTP coupling and cooperative verify upstream
Port GitHub PRs #12 and #13 onto Codeberg upstream main, retaining upstream kernel-chain handling. Include the source Clang target-attribute fixes required by the host build; omit the KFD header workaround and unrelated fork work.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-10-22 22:58:08 +02:00
Nunze 3aded1bbf8 server: DELETE /sessions forgets one stored conversation
A client that deleted a conversation, or compacted it past a prefix, knows the
rest is dead before --prefix-cache-ttl does. DELETE /sessions/<label> (or
?label=, ?id=<engine id>) walks the session's chain from the tip inwards like
expiry: VRAM blocks to the pool, the host copy with them, the session's
snapshots to the store. ?keep_tokens=N keeps the chain's start in whole blocks.
Blocks another stored session shares (the system prompt) and blocks a live
request reads stay and are counted apart; the row is cut at the deepest block
that stayed, so a later release reaches it. A request of the same conversation
in flight is 409. IScheduler::release_session beside reset_prefix_cache,
PrefixCache::release_session over the tiers' session table (find_sessions,
shared_prefix_blocks, cut_session). Counters released{entries,snapshots} on
/sessions and /stats, prefix_cache_released_total{what} on /metrics.
2026-10-22 09:58:08 +00:00
NunzeandClaude Opus 5.5 4be0a34791 kv tiers: a restore makes room the way pressure does, and a chain the pool cannot hold stops at a snapshot
A restore reserved only from the free list. The reserve's trim leaves a quarter of the pool free
after every publish, so a returning conversation larger than that came back as far as the free
list reached, and the lookup stopped at the first block still on the host. On GLM-5.3-Flash at
eight ranks, two conversations of 314K tokens in a 446,832-token pool: the second turn of the
first brought back exactly the 27,930 free blocks, hit 111,772 tokens, and on its hybrid state
resumed at the snapshot at 1,024, since geometric backoff keeps nothing between 1,024 and 131,072.
Its prefill took 84 s instead of under one.

PCBinding::restore_plan now makes room before the engine plans the restore, the same way
PCBinding::evict does for an admission: PrefixCache::trim_for drops entries whose host copy has
landed, the engine lands pending copies (flush_fn), and it drops again. It never erases one,
spares the restoring chain itself and every chain a waiting request holds, and like trim never
touches one a running sequence reads. The free quarter may go; the reserve's trim after the next
publish frees it again. One block table serves every rank, so the room rank 0's cache makes is
room on every rank, as with evict.

When the pool still cannot hold the chain, PrefixCache::restorable_from cuts it at the deepest
valid snapshot the shorter prefix reaches, so no block comes back past the point the hit resumes
from; without recurrent state it cuts where the room ends. TierExec::issue_restore keeps its own
cut as the backstop.

Both cuts are counted: radiance:prefix_restore_cuts_total for restores the pool could not hold
whole (/sessions moved.restore_cuts), and radiance:prefix_hit_cuts_total{reason="resumed_below"}
for admissions that resumed more than one checkpoint interval below their attention hit, which
hit_cut_tokens alone did not tell apart from many small tails (/stats and /sessions hit_cuts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:24:20 +02:00
AshlynandClaude Opus 5.5 cb5a69ac3f engine: a block drafter on the card's acceptance -- its passes queued behind the step, the next step issued ahead
A block drafter (DFlash) ran its two passes after the commit, staged from the committed sequence:
the verify, a host wait and the commit, the context and query passes, a second host wait for the
proposals, then the next step's build and issue, with the cards idle through each host turn and
the ranks starting every pass at different times. Pipelining was off for block drafters.

It now takes the serial drafters' path (sched/advance.h). After the trunk's ranks join, the
acceptance runs on every rank (ADV_ACCEPT). block_begin runs before the commit (on_card): the
context pass mirrors the trunk step, whose positions the host knows (a row issued ahead continued
from the committed end, as commit() reads it); the query block's rows are device rows staged at
the furthest anchor acceptance could leave, with the KV reservation that far, and ADV_BLOCK puts
the anchor (the token the verify chose) and the masks at the card's committed end. After the
query pass, ADV_BTAKE takes the proposals into each StepSlot behind the anchor, which is the token
row the next verify reads (ADV_TRUNK), so issue_ahead verifies them with no host round trip. The
slots come back with the step's one readback; finish_block_drafter checks the card's acceptance
against the host's, as the serial driver does, publishes the proposals and moves the drafter's
filled range.

RADIANCE_DRAFT_BLOCK_HOST=1 keeps the host's driver, for the A/B, and has a row in GUIDE.md's
environment table. On libref with the tiny 31B-shaped checkpoint (and one doctored so its drafter
is right part of the time) the two drivers give the same replies, the same draft acceptance and
the same sampled text, and greedy matches plain decoding. sched_test runs 24 pipelined steps
against the host's driver: the same trunk steps and the same context and query passes, positions,
lengths and slots (the context pass's token ids aside, which that pass does not read);
advance_test covers the two modes and the chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 09:48:51 +02:00
Juup 859efc7208 review: apply the Unlimited-OCR code-review findings
The 2a1ca01..f308216 range's 45 review findings (12 performance, 33 quality)
are applied: ABI 23 for the RadBatch append, the fused q|k|v projection, the
batched patch-embed GEMM and pitched layout copies, the sam_attn w-dot hoist
with an alignment-gated vector row path and NaN poisoning for malformed
segments, the fused quick_gelu act, and the R-SWA/scheduler/drafting gates.

Quality items: stale comments corrected, env reads hoisted, the ngram_window
negative refusal, the parts-form chat template instruction, the whitelist
fallback warning, and the segmented R-SWA refusal of the fixed/runtime window
mix.

The 3.2 MB generated resample header becomes a 9.6 MB little-endian blob
(tests/data/golden/uocr_resample_golden.bin) read by a small loader;
resample_golden.py emits and round-trip-verifies it.

One perf-med item (AVX2 bicubic passes/LUT patch staging in the processor) is
left as the follow-up the review itself recommends; the code says why.

Verified: ninja -C build-review -k 0; host ctest 89/89; GPU r4d_selftest
0 failures, kbench/kbench_moe and the card tests pass.
2026-10-20 07:06:18 +00:00
Juup fad4ba7f1a unlimitedocr: the DeepEncoder tower, R-SWA ring KV and the n-gram ban
DeepEncoder (arch/common/rad_block_sam.h): the checkpoint's SAM ViT-B/16,
neck and CLIP ViT-L/14 producing its 16x17+1 row layout, with a new
`sam_attn` op for the windowed, zero-padded SAM attention and its
decomposed relative-position bias (libref oracle, libavx kernel, libr4d
kernel and selftest). The plugin declares the tower when the container
records `radiance.encoder`, and splices its rows over the placeholders
after embed_lookup.

BOS: the chat path adds BOS when the rendered template does not already
start with it. This checkpoint's template is a bare concatenation and its
tokenizer states add_bos_token, so without it every position was off by
one and the det boxes came out wrong. A media run's placeholders shift
with it.

R-SWA: RAD_KV_RING, paged like a window group but with a per-sequence
floor armed at admission. adv_groups now computes the same clamped
seqused and modulo ring slots the builder stages; the mismatch read the
block table's -1 padding and faulted the card. Prefill stays causal;
prefix cache, checkpoints and speculation are off for the group.

Sampling: sample_ngram_ban in libref/libavx/libr4d and the host chain,
the request knobs, and the container's generation config (35 over 128).

Processor: the checkpoint's grid/mode selection, its tall-last tie order,
Pillow's bicubic pass order, and goldens generated from its own code.

Tools: --mm-max-patches auto-detection accepts a tower stated as per-width
tables under vision_config.image_size, and rad-convert records
radiance.encoder.

Verified: tower stages match the checkpoint's code (rows cos 0.9998), the
device sam_attn selftest is within tolerance, the R-SWA device repro
returns text, a GPU e2e reproduces the reference's first det block, and
the host suite is 88/89 (known webp decode baseline).
2026-10-20 07:04:01 +00:00
Deadcode 685ec5bd85 radiance 1.9.0
New models:
- LTX-2.5 (base and distilled): video with a stereo soundtrack from text or from text and a first
  frame, on one card, with its duration head, tiled VAE decoding, the diffusion decoder and the x2
  latent upsampler
- Krea 2 Raw and Turbo, and FLUX.3 [klein] and its base: text to image, and for FLUX.3 edits from up
  to ten reference pictures, on one card
- GLM-5.3-Flash from AMD's Quark MXFP4 export, on eight cards (John McDonough, Nunze)
- Gemma 3 / TranslateGemma 27B with an optional DFlash2 drafter (mici81)

Engine:
- --kv-cache-dtype fp8_v4 and k6_v4 for Gemma 3 and Qwen3.8-Flash-Next (mici81)
- the rotated int8 trunk (i8a8h) for Qwen3.8-27B (eddie168168)
- eight-rank all-reduce bands, weighted shards and pieces (Nunze); --host-headroom-mib (sfjes)
- the dashboard shows the single-stream decode floor and its most recent window (Memoria)

Fixes: prefix-cache reservations kept until their save lands (baKon), tool calls in Responses
namespaces (#119), system messages merged when a template refuses several (#137), a prefill
continued with no open step (#127), calibration of a Gram accumulation (#122), JSON Schema patterns
read unanchored (davetha), GLM-style tool calls, the KV floor counting every sequence's state.
Plugin ABI 24.
2026-10-19 21:58:07 +02:00
Memoria (Noblistic) ed2da8c9da sched: record the fastest single-sequence decode step, for the dashboard to read
The dashboard's restart advice needs a reference the degraded engine is read
against. Asking a human to type a ruler is fragile (a stale or mistyped number
silently mis-advises) and cannot see steps taken while the dashboard tab is
closed. The engine sees every step and knows the concurrency of the exact step it
just timed (plan_.n_seq_decode), so it can keep the reference itself.

Records two figures over single-sequence decode steps: the floor (the fastest
window mean this process has measured) and the current (the most recent window
mean). Both are window means of one stream at one size, so the advisory compares
like with like. A min, not a max: drift only raises the CURRENT step, so the
reference a degraded engine is read against is its own demonstrated floor.
Single-sequence on purpose -- a decode step at eight sequences is a different
measurement, so keying the floor to one row keeps a batch arriving from being
misread as drift. A mixed step is excluded by the phase gate even when it carries
one decode row: that row shared the step with a prefill chunk an order of
magnitude dearer.

Why not a raw min over step brackets: step timing is host-side, and with
pipelining on the next forward pass is issued behind the current step's commit.
Behind a step with long host work -- a prefill chunk, or a decode step that saves
a KV checkpoint -- the decode pass is finished before its own bracket opens, so
the bracket holds readback and commit and no GPU work. It is a real step
advancing a real token, so no token-count or predecessor-phase guard catches it.
A raw min latches that degenerate on the first occurrence and never recovers:
measured live 2026-10-18 on a TP2 R9700 lane, 1.16 ms against a 15.55 ms mean on
the first request after bringup.

Why averaging alone is not enough: these degenerate brackets are not rare. At the
observed ~1.4% rate a min over hundreds of windows reliably lands on a
degenerate-heavy window, and the floor sits ~10% below the true floor -- still
phantom drift, because the engine can never reach a floor that was an artifact.
So a candidate is rejected BEFORE it enters a window when it is under half the
running mean of accepted steps: degenerate brackets sit at ~9% of a real step and
real single-sequence steps at ~96%, so the populations are ~10x apart and any
threshold between them separates them -- 0.5 is the midpoint of that gap, not a
value tuned to one distribution. Filtering at the step level is essential; at
this rate a degenerate dilutes inside a 32-step window to ~0.91x, which no
window-level threshold would catch.

The first window is recorded by neither figure. The rejection gate needs a
window's worth of accepted samples before it can judge one, so the first window
is un-gated by construction; recording it lets the floor latch an unreachable
value forever (measured: a 5% degenerate rate put the floor ~2% low through
bootstrap alone). The cost is one window -- about a second of single-stream
decode -- against a 46 s bringup and a 10 s repaint, so it is never observed.

The estimator is a small struct (rad::DecodeFloor) so it is testable on a
synthetic stream: the scheduler fixture runs steps in microseconds and cannot
manufacture a degenerate bracket, which is why the first round of tests missed
this. The tests feed streams laced with degenerate-short samples, assert a raw min
latches them, assert the estimator rejects them and tracks the true floor, and
assert the rejection does not eat real steps.

Emitted on /stats as step_ns_decode_best and step_ns_decode_recent (0 until the
first gated window completes). Trailing zero-defaulted fields on both SchedMetrics
structs plus the adapter copy -- neither struct is ABI-pinned (scheduler<->server
internal), so this is the sanctioned append. Matches the kv_tokens_max
running-extremum precedent.

Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (xhigh) via Open WebUI

(cherry picked from commit bf5a803deaa08ae0c2d94e2c3dda0d518c08d9aa)
2026-10-19 17:35:05 +00:00
Deadcode 1e968f6e1d radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves
  every shipped container
- Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime
- /v1/messages works with Claude Code as it ships (gearwave00001)
- a long agent conversation keeps its cached history when the client rewrites its last turn
  (manueloverride)
- a stream's first event goes out with the first token, so llama-benchy measures prefill right
- opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42)
- four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b)
- NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA
  adapters (baKon)
- many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool
  arguments and the CPU's vision and audio encoders
- plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
2026-10-16 18:25:18 +02:00
Deadcode b93b531f63 radiance 1.5.0
- Gemma 4 31B (PRs #74, #75, #81, #86; sfjes, keptn42): sliding and global attention with their
  own kernels, the assistant head as a drafter that reads the trunk's cache, the vision tower, a
  fused w4a8 decode step, bf16 and compressed-tensors int4 checkpoints, and window snapshots so a
  prefix hit on a sliding-window model resumes instead of prefilling again.
  deploy/compose/gemma4-31b-w4a8.yaml serves keptn42's container on two cards
- ParoQuant (PRs #65, #66, #67; malic): Qwen3.8-27B checkpoints with learned Givens rotations,
  as int4, int5 and MXFP4, imported without re-quantising, the prefill's rotations on the matrix
  cores. deploy/compose/qwen3.8-27b-paro.yaml serves them on one card. A ParoQuant container made
  with the PR builds is refused: convert it again with --reuse <old container>
- Gemma 4 26B-A4B with z-lab's DFlash drafter (PR #88; Perire): arch/gemma4 serves Google's bf16
  checkpoint with the routed experts in block fp8 or bf16 (data/recipes/gemma4-26b-a4b-df*.recipe),
  and libr4d gains its windowed paged attention, the fused sandwich-norm joins, expert_scale and
  the sharded draft head's pair_argmax. A prefill chunk runs as two slices with its all-reduces
  beside the compute, bit-exact with the whole step. The 31B's global layers take the windowed
  attention too: an 11.5K-token prefill on two R9700s in 3.1 s instead of 4.9
- a startup that logs nothing for two minutes says where it waits (#89): the system call (a KFD
  request by name), the library that made it, and its stack, which addr2line resolves against the
  binary
- the prefix cache is kept in VRAM and host memory only (#70): the disk tier wrote every block and
  snapshot a prompt produced, and its copies never outlived the process. --prefix-cache-host-mib
  is renamed --prefix-cache-mib; --prefix-cache-dir and --prefix-cache-disk-mib are removed, and
  startup refuses all three with what replaced them. The compose files no longer mount /data, and
  .env no longer needs RADIANCE_STATE
- --prefix-cache-ttl S (default 3600, 0 never): a conversation no request has used for that long
  leaves the cache, whichever tier holds it; radiance:prefix_cache_expired_total counts them. A
  full host tier now drops its least recently used conversations
- --vision-tower-placement vram|ram (#84): ram keeps an encoder tower in pinned host memory and
  gives its VRAM to the KV cache, read over the link once an image
- timings carry ttft_ms and total_ms (#85): the server's own time from the request body's arrival
  to the first and the last token, queueing and tokenisation included
- a KV-cache recall that found a moved expert with nowhere to go stopped halfway and leaked the
  slots it had already freed: after it every recall failed, the cache stayed short until a
  restart, and requests failed with HTTP 500. A recall now waits for the slots it is owed and
  always finishes
- a tool result or tool-call arguments that are not JSON are no longer refused as nesting past
  1024 levels for their unmatched brackets (#90): only text that parses as JSON is held to the
  bound, since nothing else is parsed into a tree
- the host-pool refusal names the limit that applies to pinned memory (RAM less 1/64 and
  1.5 GiB), not ttm.pages_limit
- --embedding-placement auto, removed in 1.3.0, is refused with what replaced it
- for out-of-tree kernel libraries: gemm_nt_q gains two operands (pb1, pb2, the part bounds), and
  the loader requires identical op schemas, so a library built against 1.4.0 must be rebuilt. For
  architecture plugins, rad_op_declared(b, op) asks whether an op is in the loaded vocabulary
  without declaring it
2026-10-13 19:35:16 +02:00
AshlynandClaude Opus 5.5 29bfe8f00c sched: --draft-window adaptive applies to block drafters
The adaptive window priced only a serial head's rounds and was refused for a
block drafter, on the grounds that the block is proposed in one pass. But
every verified draft is still a verify row, and on a MoE whose verify reads
the experts each row routes to, rows are not free (16 rows read ~10x the
experts one does). A block drafter now takes the same policy with its rounds
fixed: each sequence verifies the first min(D, its stop) of the block, its
stop from its own measured acceptance and D from the measured step times.
Prompt lookup alone keeps the fixed window and says so.

Speculation stays lossless: what is verified is a prefix of the proposal.

Measured on gemma-4-26B-A4B-it + z-lab DFlash (block 15), 4x R9700, TP4,
together with gemma4k's split-KV merge rewrite (landed in the same build, so
the two are not separated): story at T=1 95 -> 177 tok/s, greedy thinking
~360 -> 572 tok/s; code at T=0 319-334 tok/s (it verifies deep either way).

tests/sched_test.cpp: the block-drafter case now expects the policy on
(4 drafts verified while the estimate is the prior, 1 after 64 rejected
steps, draft_verify_depth[4] and [1] both counted); the prompt-lookup-only
and no-speculation cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:40:04 -05:00
Deadcode 7c7f755931 Merge Gemma 4 31B: PRs #74, #75, #81 and #86 (sfjes, keptn42), with fixes
The gemma4_bf16 architecture (sliding and global attention, the proportional RoPE ladder, the
assistant head as a drafter that reads the trunk's cache, the vision tower), its w4a8 decode
junctions, the h512/gqa8 and h256/gqa2 attention kernels, compressed-tensors int4 import, multi-EOS
from generation_config, the call/reasoning reply format, a window group that keeps the keys a
prefill chunk still reads, and window snapshots in checkpoint slots so a prefix hit on a
sliding-window trunk resumes.

Fixes on top: the investigation switches and diagnostic blocks out of the served paths; int4 import
through the checkpoint import framework; attention_k_eq_v from the config; the fused junctions only
where every reader takes their pair; a shared-KV head binds no group of its own; the compose file
without HSA_ENABLE_IPC_MODE_LEGACY (TP2 fails with it on ROCm 10.1); a checkpoint carries a window
only where a hit resumes from it; the README says the linked container is keptn42's calibrated GPTQ
build and what the in-tree recipe gives.
2026-10-12 20:46:37 +02:00
Deadcode dc339b4cd2 radiance 1.4.0
- Qwen3.8-Flash-Next on one card: the heat engine moves 64 experts a step (was 8), its copies and
  the prefill's expert staging run on the card's DMA engines instead of as copy kernels, and at
  decode the next layer's likeliest experts are copied onto the card ahead of its GEMMs. Against
  1.3.0 at --tp 1: prefill +17-20% from 8K tokens up, throughput under load +16-20%
- deploy/compose/flashnext-tp1.yaml: Qwen3.8-Flash-Next on one card and 64 GB of host RAM
  (4096-token prefill steps, 4 sequences, a 301K-token cache)
- #61: --busy-prefill-chunk (default auto): a long prefill leaves the rest of the step to the
  requests decoding beside it and to new arrivals, instead of taking all of it (baKon)
- LiquidAI's LFM2 and LFM2-VL, and d1's /v1/systemone (after zivius's PR #50)
- a startup report: every option with its value and where it came from, the hardware, and what
  on it costs speed with the fix; /diagnostics serves it (behind the API key; without one, only
  to the same machine)
- #69: a GPU memory fault names the buffer and kernel argument behind it and ends the server at
  once (exit status 70), instead of hanging or writing a core of tens of gigabytes
- #64: a card without Resizable BAR is refused at startup, naming what to turn on, instead of
  crashing at the first launch
- the image is built with ROCm 10.1 (the host's amdgpu driver must support it), with ROCm's
  libLLVM rebuilt so the same source compiles to the same kernels every time; a source build
  takes ROCm 10.1 or 7.2
- #71: the image ships curl, jq and a CA bundle, so --model <HF repo id> works in the container,
  and hfget.sh runs under its busybox (baKon)
- --profile-ops shows how long each op's lane sat idle before it; cardclock.py skips an
  integrated GPU instead of stopping
2026-10-12 11:46:14 +02:00
keptn42 e35052abfe sched: a prefix hit on a sliding-window model resumes from a snapshot of the window behind it
The prefix cache cannot index a windowed group, so every hit on a windowed
trunk re-prefilled the whole prompt (73620ef). Gemma 4 31B (50 of 60 layers
windowed at 1024) paid that on every chat and agent turn: 17-48 s to the
first token at 25-49k tokens.

A model with a window and no linear state now takes one checkpoint per
prompt, a block short of its end -- the next turn re-renders the last few
tokens -- if the prompt is --checkpoint-interval tokens or longer, and does
not split chunks at the interval. The prefix cache treats the window like
linear state: a hit is reusable at a checkpoint only. admit_one adopts the
full-attention blocks as before, seeds the windowed groups at the window's
floor, and the entry's restore fills them from the slot; anything else
re-prefills as before. A model with both linear state and a window keeps
refusing the hit.

Measured on Gemma 4 31B, TP 2, agent transcripts: a follow-up turn's first
token in 0.8-3.4 s instead of 17-48 s; greedy output byte-identical to a
cold prefill with the same chunk boundaries (32 turns, chains five hits
deep, thinking on and off).
2026-10-12 09:04:43 +00:00
keptn42 997e1ae05f drafter: a serial head that keeps no cache of its own
rad_drafter_shared_kv(b, pos_offset), an additive builder export: the
declared SERIAL head reads the trunk's K and V and writes none (Gemma 4's
assistant head has a query projection and nothing else per layer). A
plugin that does not call it drafts exactly as before; RAD_ABI_VERSION is
untouched (same pattern as rad_kv_group_zero).

For such a head the serial driver changes in two places:

- No history is owed. The history pass carries round 1 only: one row a
  drafting sequence, at the committed position, with the token the trunk
  chose after it and the trunk's hidden state there. A sequence that does
  not draft gets no row; a step with nothing to draft runs no pass.
- Every round runs at that same position, over the same context. seqused
  ends at the committed position: past it, the trunk's cache holds the K
  and V of drafts the verify rejected, or nothing.

`pos_offset` (0 or 1) is where the rows sit for the rotary, relative to the
committed position; it moves nothing else.

Card side: ADV_HIST and ADV_ROUND take the shape from AdvanceArgs::shared_kv
and rot_shift, which the scheduler fills from the Program. Host side:
serial_begin/serial_batch stage one row and a constant ceiling.

Tests: build_test checks the export's refusals; sched_test stages one verify
step both ways (the old path pinned: five history rows, rounds stepping),
checks that a cacheless head runs no pass when nothing drafts, and runs the
card's advance rows directly for both shapes.
2026-10-10 16:29:34 +00:00
keptn42 921b02b60b kv: a window group keeps the keys a prefill chunk still reads
ensure() recycled a RAD_KV_WINDOW group against the end of the step, so a
prefill chunk lost the keys its first rows read (a 2185-token prompt kept
no window KV for positions 0..1151). Recycle below the step's first query
(keep_from = n_computed), size the caps for one extra chunk, and trim the
window when a prefill chunk is committed. The old test pinned the bug.

Found while debugging #75 (Gemma 4).
2026-10-10 08:08:43 -07:00
sfjes 73620ef00e sched: a prefix hit on a windowed TRUNK re-prefills — reuse cannot cover a group the cache does not index
prefix.cpp indexes the RAD_KV_FULL groups and skips RAD_KV_WINDOW (its own
words: "a hit's blocks do not describe a cache whose floor moves" — the
blocks below the window are recycled). admit_one clamped a hit for the
linear/checkpoint cases; a model whose own attention includes a group the
cache skips — every windowed+full pair — passed every clamp, reused, and
adopted blocks covering the CACHED groups only. The windowed trunk layers
take used = ctx_len + n_tokens (batch.cpp) and read positions below
ctx_len this sequence never wrote; grab_block's min-heap (kv.cpp) hands
out the most recently freed blocks, i.e. the previous tenant's. The
sequence attends to the PREVIOUS REQUEST'S KV as its own prefix: fluent
text carrying the last request's content. Reproduced on a live server
with sequential prompts (A-B-C-A-B: the re-run of A reads C's prompt),
and it is why a windowed model with the prefix cache on cannot currently
serve more than one conversation at a time.

The fix is a second predicate next to the drafter floor, computed once
in init(): a paged group bound to a TRUNK layer (below meta.n_layers —
a drafter borrows from base_layer and above, per rad_bind_layer_kv) that
cached_groups() does not name. In admit_one, a hit with such a hole
reuses nothing: the prefix re-prefills (windowed prompts are small;
milliseconds). The drafter's own hole stays the refill design's —
HitCap ends the hit one drafter window before the prompt's end so the
tail-recompute covers the drafter's window while the trunk reuses the
rest (the e95d397 tests keep passing, all of them); no tail-recompute
can repair a trunk hole, which is why zero is the honest answer there.

sched_test gains an opt-in WINDOW group in the fixture (bound to a
trunk layer) and a_hit_on_a_model_with_a_windowed_group_reuses_nothing:
a deep, checkpoint-covered hit — legal under every other clamp — on a
cache indexing only the FULL group. Reuse lands at 0, nothing is
adopted, and attn_cached_tokens still reports the 304-token match: the
cache hit and the scheduler refused it. Disable the clamp and the hit
adopts 16 blocks of the seeded (previous tenant's) KV — n_computed 256,
the leak as shipped; that is the regression net.

Box: ctest lane + A-B-C-A-B battery green (evidence in the PR body).
2026-10-09 23:13:26 -07:00
sfjes f1d9afadfa sched: a prefix hit on a windowed TRUNK re-prefills — reuse cannot cover a group the cache does not index
prefix.cpp indexes the RAD_KV_FULL groups and skips RAD_KV_WINDOW (its own
words: "a hit's blocks do not describe a cache whose floor moves" — the
blocks below the window are recycled). admit_one clamped a hit for the
linear/checkpoint cases; a model whose own attention includes a group the
cache skips — every windowed+full pair — passed every clamp, reused, and
adopted blocks covering the CACHED groups only. The windowed trunk layers
take used = ctx_len + n_tokens (batch.cpp) and read positions below
ctx_len this sequence never wrote; grab_block's min-heap (kv.cpp) hands
out the most recently freed blocks, i.e. the previous tenant's. The
sequence attends to the PREVIOUS REQUEST'S KV as its own prefix: fluent
text carrying the last request's content. Reproduced on a live server
with sequential prompts (A-B-C-A-B: the re-run of A reads C's prompt),
and it is why a windowed model with the prefix cache on cannot currently
serve more than one conversation at a time.

The fix is a second predicate next to the drafter floor, computed once
in init(): a paged group bound to a TRUNK layer (below meta.n_layers —
a drafter borrows from base_layer and above, per rad_bind_layer_kv) that
cached_groups() does not name. In admit_one, a hit with such a hole
reuses nothing: the prefix re-prefills (windowed prompts are small;
milliseconds). The drafter's own hole stays the refill design's —
HitCap ends the hit one drafter window before the prompt's end so the
tail-recompute covers the drafter's window while the trunk reuses the
rest (the e95d397 tests keep passing, all of them); no tail-recompute
can repair a trunk hole, which is why zero is the honest answer there.

sched_test gains an opt-in WINDOW group in the fixture (bound to a
trunk layer) and a_hit_on_a_model_with_a_windowed_group_reuses_nothing:
a deep, checkpoint-covered hit — legal under every other clamp — on a
cache indexing only the FULL group. Reuse lands at 0, nothing is
adopted, and attn_cached_tokens still reports the 304-token match: the
cache hit and the scheduler refused it. Disable the clamp and the hit
adopts 16 blocks of the seeded (previous tenant's) KV — n_computed 256,
the leak as shipped; that is the regression net.

Box: ctest lane + A-B-C-A-B battery green (evidence in the PR body).
2026-10-09 18:47:09 -07:00
baKon 04405089cb sched: a long prefill leaves the rest of the step its room (--busy-prefill-chunk)
A prefill chunk took every token the step had left (plan_chunk(..., budget)). On a step budget of
a few thousand tokens and a prompt of a few hundred thousand, that is every step for a minute or
more, and for all of it a decode row behind the prefill in running_ got nothing (`want > budget`
-> break) and admission never ran (`while (... budget > 0)`). A mostly-cached turn that needed a
few hundred tokens waited for somebody else's whole prompt: on three ranks at
--max-num-batched-tokens 2048, a 94,529-token turn with 94,208 cached took 40.6 s to its first
token, which landed on the instant a 264,725-token cold prefill ahead of it ended (#61).

--busy-prefill-chunk auto (the default) holds a prefill chunk back only when work that would
otherwise get nothing is pending in the step: one row plus the draft window for each decode row
behind it, a share (an eighth of the budget, at least one quantum) for each prefill behind it and
for the next request waiting to start. The chunk never drops under the smallest step the prefill
stager overlaps -- under it every routed layer reads its pooled experts synchronously, the
-65 % prefill measured at a budget one token under the threshold. Where holding it back for a
waiting request or another prefill would leave a remainder under that floor before the checkpoint
boundary, the interval is split into two staged halves instead. Decode rows alone only take their
few tokens: the chunk ends a quantum short of the boundary and the next step finishes the
interval, the same pair of steps a prefill already runs when decode rows are planned ahead of it.
(Halving for decode rows too held a long prompt to half-interval chunks for as long as anything
decoded behind it, the larger cost.) Whatever the reserve was not used for (a refused admission, a
decode row that drafted less than its window) goes back to the chunk before the step is issued.
Admission shares the same way, so a cold prompt admitted with others queued behind it does not
take the whole step either; an embedding input still runs whole or not at all.

A prompt with nothing beside it, and rows already planned ahead of the prefill, are planned
exactly as before, so a lone request's steps -- and every greedy output -- are unchanged. `off`
restores the old loop including its break. `N` holds a chunk that shares the step to N tokens,
rows ahead included (the operator trading prefill speed for every other row's latency); startup
warns when N is under the stager's step.

The engine hands the scheduler the stager's smallest pass after init (PrefillStager::min_rows,
the largest over the ranks). radiance:engine_prefill_chunks_capped_total counts the chunks held
back. sched_test covers admission during a long prefill, a decode row behind one, off reproducing
the old plan, a lone prefill unchanged, an explicit N with rows ahead and behind, the share
handed back when nobody takes it, and the cap's arithmetic at a 2048-token step with the stager
at 1025, with and without a share in the reserve.
2026-10-09 00:28:03 -05:00
Deadcode 89cee7ce41 radiance 1.3.0
- #47: llama-server's request fields, routes and sampler order, and /props (with baKon's model
  entry: max_model_len, root and capabilities on /v1/models, and /v1/models/:id)
- new APIs: Anthropic's Messages API (/v1/messages), OpenAI's Responses API (/v1/responses),
  llama-server's /completion and /infill, logprobs (OpenAI's logprobs and top_logprobs, up to
  20; llama-server's n_probs), OpenAI's legacy `functions`, and X-Api-Key beside the bearer key
- #4: --model takes a Hugging Face repo id (owner/name), fetched before startup into
  ~/.cache/radiance/hf or --download-dir and checked for changes at every start (redxherring)
- #46: --tp 3 --tp-wire wht6 serves -- a three-rank two-shot all-reduce with uneven shards and
  the tiered-int8 wire over it (baKon); scripts/cardclock.py names what holds each card's clock
  under load (baKon)
- CPU-only serving works again; --kernels names the kernel libraries to load; a model the
  loaded libraries cannot fully serve refuses at startup instead of failing its first request;
  --vram-kv-mib and --vram-weights-mib are gone (the split is automatic)
- --embedding-placement ram is the default, and `auto` is gone
- #40: Swift 1.5 recipes; rad-convert reads which shard holds a tensor from the index
- #53: the pinned host pool gets huge pages where shmem THP is off; #57: a crash on video with
  an odd frame width is fixed
2026-10-08 18:22:08 +02:00
Deadcode 7d840861af radiance 1.2.4
- EmbeddingGemma 2 (google/embeddinggemma-2): text, image, video and audio embeddings on the
  card (libr4d) and on the CPU (libavx); prompt_name, Matryoshka dimensions, image budgets,
  mixed content parts and the messages form on /v1/embeddings
- #43: on serves that lend the activation arena to the experts (Qwen3.8-Flash-Next with
  expert_tiered), every image after the first read its rows from the wrong place -- garbage
  replies, or an earlier request's image. Fixed
- the Qwen vision towers' attention resolves on the card again (broken on main after 1.2.3,
  never released)
- #42: a warning at startup when amdgpu cwsr_enable is 0, and a stalled queue is reported as
  slow or stuck; the guide covers the GPU-hang-and-reset chain
2026-10-07 22:42:45 +02:00