Conflicts from the old m2xfp branch take upstream's version. Two libxe2 fixes the merge needs:
- rad_plugin_abi_layout: the plugin now exports the ABI layout hash the loader checks.
- gemm_nt_q_w4a16: upstream 492d33c sends bf16 activations to the w4a16 GEMM (the separate cast
is gone); the fast kernel took only f16, so every call fell back to the exact path (decode
~2.5 tok/s). A bf16 activation is narrowed to f16 (round to nearest even) into a workspace first,
the dropped cast bit for bit; decode back to ~57 tok/s on one request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Every linear of the trunk is a LinearFP8, so the container's encoding decides the
GEMM: bf16 stays `gemm_nt` exactly as before, a recipe's block E4M3 is gemm_nt_q at
fp8a8 over an activation quantised once per producer, and int8 is gemm_nt_q at
i8a8. The format is read off layer 0's first linear; a trunk mixing formats is
refused by name. The convolution, the norms and attention stay bf16.
On a block-fp8 trunk the fused producers run: rmsnorm_quant_fp8 with a fold for
each mixer's norm (the previous block's residual add included) and MlpFP8 for the
feed-forward, whose gate|up GEMM applies SiLU(gate) * up and quantises in its
epilogue. The convolution's C * conv(B * x) and the codes its out projection reads
become one gate_quant_fp8 at act none. `gemm_nt_q_gated_wide` puts whole prompts
through the fold instead of falling back to the pair past 64 rows; k and v ask
for `gemm_nt_q_short`; the head norms and rope ask for `rmsnorm_rows` and
`rope_rows`. Each of those is the model's own declaration, so no other
architecture's path moves.
The lm_head is read at its stored codes (bf16, or E4M3/int8 where a recipe made
it so, logits_gemm_fp8/_i8). A tied head also declares the final-normed rows and
the embedding table to the core (rad_declare_scores), so a scored step needs no
head read at all.
data/recipes/d1-3b-fp8.recipe: all 30 layers' linears to E4M3 with a bf16 scale a
128x128 block; the tied head to int8 per row per 128 columns.
Co-Authored-By: Pi <pi@localhost>
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).
A complete row set for the gfx11 family (1100/1101/1102/1103/1150/1151 plus gfx11-generic),
mirroring libr4d's structure: the quantised GEMM rows (m16, tiled, gated, the bf16 logits
gemm), the paged and ragged attention for decode and prefill, the KV store, the sampler
spine and the spec rows, with the recorded-fixture, board, selftest and comparison-driver
gates for each.
The gates are the record. Every row is measured against libref on the shape matrix: the
recorded fixture at 1153 cases with worst rel_l2 1.362e-03, the board's five modes with
bit-identical decision lines, the selftest at 74 rows, and the 233-case served-shape pairing
at 0 divergent against the tree libref. End-to-end on a 2B fp8 checkpoint served on the
card, coherent through prefix-cache adoption.
Two platform laws each shape the design. A kernel that calls device printf takes the
implicit hidden_hostcall_buffer argument and is undispatchable by the AQL backend, so the
trace records are plain stores behind a budget. And a plugin-owned __device__ global is not
a channel into the engine's dispatch path: in a dlopened plugin the runtime's symbol stub
is not the address the kernel's module writes, so the served trace channel is a hipMalloc'd
record slot passed as a kernel argument, with the device-global ring kept for the board.
kv_store bounds its slots at the pool's own plane (n_blocks x block_size), the span the
cache operand declares, not at the step's own span: a request that adopts a cached prefix
writes its new tokens at the allocator's global block indices, which sit past any bound
built from the step's token count, and a slot lost there is KV that attention then reads
stale. A corrupt slot map is dropped at the same bound.
engram_tables.py builds the Engram hash tables from the release's own tokenizer.json
and config.json, so rad-convert needs no llama.cpp converter run; imatrix_merge.py
fuses the gate/up imatrix entries llama.cpp's converter writes split, matching the
plugin's fused ffn_gate_up weights. The recipe is the UD-IQ1_S mix for the official
release (251.07 GiB plan).
Post-norm encoder with fused Wqkv and biases, NeoX rotary, non-causal attention, a dense MLP on even layers and a top-2 of 8 expert MLP on odd layers, mean pooling into the pooled f32 buffer for /v1/embeddings. The checkpoint is f32; data/recipes/nomic-embed-v2-moe-bf16.recipe casts the linears, the token embedding and the token-type table to bf16 (the device kernels read bf16), norms and biases stay f32. The checkpoint's shared experts.bias is not applied: against a llama.cpp run of the same checkpoint at Q8_0 the variant without it matches best (cosine 0.9994; the others 0.9990 to 0.9993), and llama.cpp's own nomic-bert-moe does not carry it. Verified on a gfx1201 card and on libavx/libref against a pure-float32 torch reference: mean cosine 0.99995, min 0.99983 over 20 texts. Unit tests declare and lint a cut-down model. Not verified: inputs above 512 tokens against a reference on the device, other quantisations.
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.
q38-27b-paro-mxfp4-df2.recipe for a paroquant_m2xfp4 checkpoint: the trunk is imported as it
ships, rotations included, and the drafter's linears go to M2XFP4 as in q38-27b-m2xfp4-df2.recipe.
TOOLS.md names the import beside rad-convert's other imports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DenseFP8, the drafter's linear, reads a plain m2xfp4 encoding as LinearFP8 does: the weight view
takes the codes and meta planes together, the E8M0 plane is b_scale and b_ref, and gemm() issues
gemm_nt_q at dtype m2xfp4 over the same E4M3 pair. declare_slice stays block fp8 and clears the
flag. The DFlash2 block keeps an M2XFP4 gate_up off the fp8a8 gated fold, as it does an MXFP4 one.
The recipe is q38-27b-mxfp4-df2.recipe with its 4-bit trunk and drafter rules at m2xfp4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rounded to nearest, the 31B's w4a8 trunk leaves streamed tool calls inside their string arguments:
after `sku:<|"|>MS-110` it prefers `**,` (58%) to the string's close (41%; bf16 ~1.0), and
BetterBench's order request stalled in 10 of 20 tries. This adds what it takes to make the same
container (same grid, kernels and size) with the trunk's int4 codes chosen by GPTQ against the bf16
model's own activations.
- arch/gemma4: with RADIANCE_CALIB_DIR set, the plugin serving the 31B's bf16 checkpoint sums the
Gram of every dense linear's bf16 input over the corpus a server is fed (gram_accum into a
PERSIST [K, K] f32 buffer a tap) and writes the files at RADIANCE_CALIB_TOKENS, as arch/gemma3's
tap does: q|k|v's and gate|up's input whole from rank 0, o_proj's and down's this rank's columns
as `<stem>.part`, which libquant places on the diagonal. The files carry the names the w4a8
container gives the weights (gemma4_bf16's attn_qkv, attn_o, ffn_gate_up, ffn_down), so a GPTQ
recipe converting that container reads them with calib=DIR. RADIANCE_G4_CALIB_LAYERS=lo:hi records
a slice of layers (the 31B's taps are ~364 MiB a layer a rank at --tp 4, and 60 layers of them do
not fit beside the bf16 weights). Under the tap a step runs whole and on one lane; without
RADIANCE_CALIB_DIR nothing changes.
- data/recipes/gemma4-31b-dense-bf16-w4a8g-df2.recipe: the -df2 recipe with `gptq codes=i4
group=128 scale=f16 rule=search calib=$CALIB` on the trunk's four linears.
- docs/GEMMA4-31B-GPTQ.md: the route, the corpus, how to run it, and the measurements.
Measured (1.11.0, the same tap and recipe): by GPTQ the close is 99.8% and no try stalls; KL against
bf16 on the model's own turns falls from 0.341 to 0.251 (the w8a8 container 0.226), at the same
speed. The convert takes 75 minutes with OpenBLAS in the image (#220; an estimated days without). A
container made this way is on Hugging Face as Ashlyn4202025/gemma4-31b-w4a8-gptq-dflash2, and with
the block-16 drafter as Ashlyn4202025/gemma4-31b-w4a8-gptq-dflash2-b16.
Tests: engine_e2e takes the tiny Gemma 4 (shaped like the 31B) through the whole route at --tp 2:
the tap's files, by name and width on each rank; rad-convert with the two shipped recipes, every
trunk linear fitted and none rounded to nearest; and the GPTQ container's KL against the bf16 model
on held-out documents more than three times below the round-to-nearest one's (0.0018 against
0.0105). With rank 0's and rank 1's .part blocks swapped the margin is 2.2 times, which fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fp8 watercolour and oversaturation claims predated the root cause: the velocity
head's norm_out shift/scale table was staged at the narrow pitch argument instead of
the declared row width, landing all zeros at t>0, so both heads ran un-modulated.
Since the staging fix no quant has been seen to band. minimax-h3-w8a8.recipe keeps
the int8 case (uniform grid, no E4M3 448-clamp, closest to the int8-convrot finetune
lineage) without the artifact story; the fried-hunt conclusion in NOTE-REF2VA and the
decoder-dump and keyframe-anchor comments carry the same correction as history.
Also accuracy against the shipped server: GUIDE 5.16 and ARCHITECTURES document
i2va/l2va/fl2va/ref2va (first_frame/last_frame parts, 9/3/3 reference ceilings,
keyframes xor refs) instead of t2va-only; NOTE-REF2VA's stale keyframe-pin pending
claims marked shipped, ticket numbers stripped from its shipped headings, its ABI-24
line qualified; the ComfyUI blurb widens to ~50-60 GiB for the w8a8 containers; and
PORT-REF2VA.md leaves the index -- info/exclude always meant it local-only.
conv1d keeps both stride forms: upstream's causal codec downsample with cu_div (Fish Audio) and the port's explicit-pad non-causal one (the H3 audio encoder's), in libref, libavx and libr4d alike; the ABI takes upstream's 27 on top of the port's RadVideoGenBatch growth.
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).
Wikitext-2 KL against the HF bf16 reference: bf16 0.0015, w8a8 0.076, w4a8 0.242 (attention and
layers 19-23 int8, feed-forward int4; all int4 is 0.612).
The ref2va heads are the vae/ and audio_vae/ encoders, in every pipeline
directory since the ref2va release -- what a T2VA-era container lacked was the
plugin's declare, not the weights. A reuse with nothing marked changed converts
only the never-declared head weights and copies the rest where they are; the
w8a8 recipe adds that a reuse under it re-quantises the DiT linears on the way,
since a weight copies only at the same encoding.
minimax-h3-dasiwa-fp8.recipe is minimax-h3-fp8.recipe with the modulation rule
dropped -- the same one-line delta minimax-h3-dasiwa-w8a8.recipe carries for the
int8 line. A curve-form checkpoint reads its ada as K=8 table GEMMs, which no
128x128 block quantiser can serve, so the plugin declares those weights plain
bf16 and the recipe must leave them as the checkpoint holds them.
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).
Merges upstream 1.10.0 (152 commits: the LoRA acquire/runtime refactor, the
form-1 LTX-2 scheduler family, guidance terms + negative prompts, decoder
selection, input_reference, new architectures) into the ref2va port branch.
Resolution rule throughout: keep BOTH feature sets; ABI numbering follows
upstream (RAD_ABI_VERSION 26, RAD_FORMAT_VER 2), with the port's video fields
unioned into RadVideoGenBatch/RadVideoGenDecl and abi_layout_table.h
regenerated from the live table.
Notable reconciliations:
* videos.cpp: the task grammars are disjoint by capability -- keyframe tasks
(i2va/l2va/flash-attn l2va/fl2va) are recognized only when decl.encodes,
so upstream models keep refusing them as unknown tasks; input_reference,
the LoRA tag/field pipeline, and the guidance/negative_prompt rendering
coexist with refs/ref2va; the prompt put() helper hoisted to block scope
for the media branch.
* video_schedule(): upstream's (steps, video_tokens, refine) keeps its
positional slots; the port's shift_video/shift_audio overrides move to the
tail so upstream's schedule tests call unchanged.
* r4d_selftest conv3d cases: the port's sp/st/causal/down/refl geometry and
upstream's tpad/tpre fold into one reference (ft = causal ? 2 : tpad==2 ?
2+tpre : 1); rms_mod rows keep the port's i8/fp8 quant modes alongside
upstream's wadd/norm_once/norm parameters.
* tests/oot_plugins.sh: the per-plugin cmake --install gains a --prefix
staging dir -- plugin .so files still land in the absolute
RAD_PLUGIN_INSTALL_HOME, but libr4d now also installs r4d_selftest to a
relative bin/, which needs no root.
Host ctest: 112/113 (mm_test's webp gap pre-exists this merge); r4d_selftest,
engine_e2e, oot_plugins, abi_layout, all LoRA tests green.
Co-Authored-By: Claude <noreply@anthropic.com>
The trunk linears, the routed and shared experts, and the DFlash2 linears
round to OCP-MXFP4 (fp4_e2m1, one e8m0 scale per 32 of K); output.weight
stays block FP8 and the draft head its 2-bit copy. 19.52 GiB against the
block-FP8 sibling's 34.45, served at 25.8 GiB of VRAM a card on tp2.
Sage-A1.5 (InternScience) is Qwen3.5-MoE's routed trunk with the Qwen3.5 vision tower beside it -- a shape qwen35moe_fp8 already declares, but no fixture covered the two together: the MoE fixture had no tower, the VL fixture was dense. arch_test gains q35moe_vl_meta, and checks the tower declares once for the build (not a copy a rank), that it is withheld when no encoder budget is given, and that the routed blocks, the folded shared expert and the MTP layer's own router are still declared beside it.
sage-a1.5-fp8.recipe puts every trunk linear -- attention, the delta net's in- and out-projections, the routed and shared experts of all 40 blocks, and the MTP layer at index 40 -- into block fp8, the head likewise, and keeps the routers, the shared-expert gates, the delta net's parameters, the norms, the embedding and the whole vision tower as the checkpoint ships them. recipe_test reads the shipped file and asserts all of that.
sage-a1.5-fp8-df2.recipe is the same trunk with incoai/Qwen3.6-35B-A3B-DFlash2's tensors in place of the MTP head, which the shared source declares through declare_dflash2. On two R9700s it decodes 392.9 tok/s against 281.6 with the MTP head, at 49.3% acceptance and depth 7; on one card, 231.6 against 168.3.
Compose: sage-a1.5.yaml (two cards, four 32k sessions), sage-a1.5-tp1.yaml (one card, an 8 GiB pinned host pool, one 262,144-token session) and sage-a1.5-df2.yaml. README, DOCKER.md and ARCHITECTURES.md list the containers and the drafter.
The DaSiWa overlay ships its modulation curve as a precomputed table (adaln_t_table
[1025,8]): timestep_embed gains a curve mode -- y[m] = the table linearly sampled at the
timestep, no sinusoid, no MLP -- in the HIP, AVX and ref tiers, and the arch drives the four
timestep rows (video, audio, and each re-embedded with its reference pin) through it with the
ada projections as plain bf16 K=8 lines. The dasiwa-w8a8 recipe carries the overlay.
Device-verified at 512: T2VA, I2VA and FL2VA complete clean and the T2VA re-run is
bit-identical; the fried look PERSISTS on the exact finetune the reference clips rendered
from, which kills the checkpoint-style theory and pins the fork to Radiance's forward.
For the value-parity localisation: R4D_DIT_SEL (env, driver and plugin) declares f32 PERSIST
shadows of the stream entering block 0, the timestep table and the step-0 modulation, and the
driver reads those plus the velocity head back on a plain request's step 0 into
R4D_ENC_DUMPDIR, for the CPU reference DiT replay to diff against.
Co-Authored-By: Claude <noreply@anthropic.com>
The 31B's prefill steps of 1024 rows or more run as two slices with each slice's all-reduces
beside the other's compute; q, k and v as one linear where the container holds them so; the 31B
serves RedHatAI's DFlash2 speculator; DFlash2's fc projection is split over the ranks, bit for bit.
Squashed from:
- arch/gemma4_bf16: a prefill step in two slices, each slice's reductions on the second lane
- arch/gemma4_bf16: q, k and v as one linear where the container holds them so
- data/recipes: the 31B -df recipes make q, k and v one linear (blk.*.attn_qkv)
- arch/gemma4: the 31B serves RedHatAI's DFlash2 speculator (gemma-4-31B-it-speculator.dflash2)
- libr4d: gemm_nt_q takes split_n, and all_gather lands rows at a wider output pitch
- arch/common: DFlash2's fc split over the ranks as windows of block-aligned rows, bit for bit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gemma 4's DFlash drafter moves into arch/common so both Gemma 4 plugins declare it, on the int8
grid too; the 31B declares it beside its w4a8 / w8a8 trunk when the container carries one; the
w4a8 and Q8 -df recipes and compose files; the tests.
Squashed from:
- arch: Gemma 4's DFlash drafter into arch/common, for both Gemma 4 plugins, and on the int8 grid
- arch: z-lab's DFlash drafter beside the 31B's w4a8 / w8a8 trunk, its gqa-8 attention at gqa 4
- data/recipes: gemma4-31b with DFlash, the w4a8 trunk with a block-fp8 drafter, and Q8
- tests: the 31B with its DFlash drafter declares the chains where libr4d's fused ops are not declared
- tests: the 31B's steps with its DFlash drafter lint clean, on both grids, at one, two and four ranks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Discovery's third path, <home>/vectors/<arch>-control-vector.gguf, was the one an operator could
never rely on: it existed, but nothing filled it, so a deployment had to fetch Cudecnik's package
and rename two files before the switch was worth anything. The published file is small (483 KB),
specific to this architecture and width rather than to any one quant, and unchanged from upstream,
so it belongs with the other things the home ships next to architectures/ and kernels/.
CMake copies the GGUF and its JSON into the built home (and installs them under the data dir), which
means a missing file is a configure error rather than a silently missing feature. Discovery order is
unchanged, so the per-container and per-directory sidecar paths still win when an operator places one.
The directions are a derivative of Qwen3.8-Flash-Next and are not ours to relicense: they stay under
the Qwen Community License 1.0, whose text now sits beside them (data/vectors/LICENSE.qwen-community-1.0.txt),
is recorded in NOTICE, and is installed to share/doc/radiance/third_party/qwen-community.LICENSE. The
Apache-2.0 grant covers the loader and the kernels, not the directions.
The feature is still opt-in -- without --control-vector the file is never read -- and the request
default is still off, because what this particular vector removes is a safety behaviour.
LoRA for image and video generators:
- civitai and Hugging Face adapter files as published: kohya, ComfyUI and diffusers/PEFT key names;
LoRA, LoCon, LoHa, LoKr and full-weight diffs; DoRA, OFT and Tucker are refused by name
- stacked per request with a strength each, through the `loras` field or <lora:name:strength> tags
in the prompt; --lora-dir serves every file in a directory, GET /v1/loras lists them, and
--max-loras / --max-lora-rank size the slots on the card (generators default to rank 64)
- Krea 2, Qwen-Image 2.1, FLUX.3 [klein], MiniMax H3, LTX-2.5, Anima and SDXL
New models:
- Anima (base, aesthetic and turbo): Cosmos-Predict2 DiT with the Qwen3-0.6B text encoder and the
Qwen-Image VAE, on one card
- Stable Diffusion XL and its single-file finetunes (Illustrious, NoobAI including V-Pred, Pony),
read as civitai ships them, with the Euler, Euler a and DPM++ 2M samplers
Recipes:
- q38-27b-mxfp4-df2: any bf16 Qwen3.8-27B or finetune at MXFP4 with the DFlash2 drafter
- Krea 2 finetunes from civitai: scripts/krea2_native.py reads Krea's own key names, and
krea-2-fp8-unscaled keeps a plain-fp8 file's codes exactly
Changes: --max-num-batched-tokens defaults to 2048 (was 8192). Plugin ABI 25: out-of-tree plugins
must be rebuilt.
The denoiser's linears were E4M3 with fp8a8 activations. Three mantissa bits
band the smooth per-token activations that carry image detail (a watercolour
look) and the 448 clamp clips highlights (oversaturated colour). int8 is 126
uniform levels per group with no clamp, at the same one byte a weight, so the
container footprint and served memory are unchanged; iu8 WMMA runs at the fp8
rate. A quarter of E4M3's error on the activations that were the fidelity limit.
Serve the fp8 and the new int8 containers from one plugin, told apart by
probing one trunk linear (linear_is_w8) before the activation code planes are
declared. There are no int8 forms of the fused producers (rms_mod_quant_fp8,
gated_quant_fp8), so for the int8 trunk the producers come apart: plain rms_mod
writes a bf16 modulated-norm plane and each int8 linear quantises that plane
into its own codes (LinearFP8::i8's quant_act_i8g), and the gate is a bare
silu_mul. The attention's own quantiser already emits int8 (QuantFP8 q8_fed),
so o_proj reads those codes directly. A trunk read entirely by int8 linears
declares no E4M3 code pair (ActFP8::declare_qs fp8_pair=false), freeing arena
the KV cache needs.
data/recipes/minimax-h3-w8a8.recipe converts the DiT linears to symmetric int8
on a per-row 128-column grid; reuse the fp8 container and list only the
transformer.* tensors as changed.
Co-Authored-By: Claude <noreply@anthropic.com>
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).
The text side of Unlimited-OCR: a 12-layer, 1280-wide decoder, 10 query heads over 10 KV
heads at head_dim 128, a dense layer 0 and 64 routed experts (top-6, softmax, no
renormalisation) plus one ungated shared arm in layers 1-11. arch/unlimitedocr_bf16/
carries its own plain-Llama bf16 attention, the shared MoE block in its bf16
external-input mode, and the tied LM head; data/recipes/unlimited-ocr-bf16.recipe is the
bf16 passthrough convert. core/format/checkpoint.cpp learns n_routed_experts, so n_expert
is read from the checkpoint's own key.
The router is issued as one op rather than a selection and a sort: libref gains
router_topk_scatter and router_gemm_topk_scatter (the second with the shared expert's
one-column gate at N = 1), libavx composes both from its router/gemm/scatter kernels, and
both get sweep geometries and the gate-absent/gate-present tests.
libr4d had no head_dim 128 leg at ratio 1, so every attn_paged band of this geometry
resolved to no kernel and the server refused to start on device.
r4d_attn_paged_h128_gqa1.hip instantiates the generic body at GQ 1 for both legs; the
rows and the selftest cases come with it.
Device numbers, one R9700 (gfx1201, HIP 7.16), bf16 weights and KV, no reference-kernel
fallback: a 523-token prompt prefills at 35.0-35.8k tok/s (15 ms) and a 4043-token prompt
at 54.2k tok/s (75 ms); decode is 351-354 tok/s (2.82-2.85 ms/token) at short context and
315 tok/s at 4k. r4d_selftest is 0 failures; the host suite is 86/87, the miss being
mm_test's lossless-webp decode, which fails on this box in code this change does not touch.
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.
An architecture plugin for GLM-5.3-Flash (45 layers, 4096 wide) from its Quark MXFP4 export: four
mHC residual streams; KDA layers and full layers with absorbed MLA behind the DSA indexer; a MoE
block of 288 MXFP4 experts (top 8, sigmoid routing with a correction bias and route_scale 2.5) and
an ungated shared expert; clamped SwiGLU; the block-fp8 attention and MTP weights at their f32
scales; and its native MTP layer as the drafter. Under tensor parallelism experts shard by width,
MLA by whole heads, and the f32 router and index-head projections split their columns from 256 rows.
The MoE block's decode fusions are on by default (RADIANCE_GLM_ROUTER_FUSE,
RADIANCE_GLM_SWIGLU_QUANT, RADIANCE_GLM_GATHER_INVERSE; 0 restores the separate launches, byte for
byte). Its tool-call format is derived from the chat template, as for the other models.
data/recipes/glm53-mxfp4.recipe decodes only the combined MLA projection to bf16; every other
weight keeps its stored encoding.
arch_test declares the model at one, two, four and eight ranks and lints its steps: the mHC
connections, the routing's f32 path, the head-complete MLA shards, the indexer's cache pages and
tail ring, KDA's local heads, the expert geometry at TP4 and TP8, that the sizing declares give
the real graph at every arena level, where the decode fusions replace their launches, and, with
the fusions off, a pinned graph and step hash.
Co-Authored-By: Nunze <lorenz.lamping1@web.de>
Ref2VA ref-image conditioning verified on-device: ref step runs all steps no
fault; output differs ref-present vs ref-absent (by log). 6-9 images rejected
cleanly at submit (no engine crash). Merged-cell modulation (<=9) tracked next.
NOTE: placeholder author -- re-author before any push. Do NOT push this branch.
Co-Authored-By: Claude <noreply@anthropic.com>
The gemma3 section of ARCHITECTURES.md (geometry, traps, KV groups, linears, calibration,
measurements, the DFlash2 drafter), the calibration variable and the conversion of record in
GUIDE.md, the README's models table. Recipes: the int8 calibration container (KL 0.003),
MXFP4 + GPTQ (KL 0.042, 56 tok/s a stream on two R9700s), and with a drafter. The compose file
serves a plain Gemma 3 template: TranslateGemma's own refuses the startup render's plain turn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the bf16 release: the trunk's linears RTN int8 under fwht128 (weight error 6.3e-3), the
lm_head int8 (6.8e-3), the drafter as q38-27b-fp8-df2.recipe makes it; 29.0 GiB. Against the
bf16 model over 45K mostly-Go positions: mean KL 0.00051 and 99.25% top-1, against 0.00404 and
97.75% for Qwen's FP8 release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- MiniMax-H3 and FastH3 no longer stop the server on a prompt longer than 16 tokens (FastH3) or
128 tokens (MiniMax-H3)
- latent upscaling for the MiniMax-H3 containers: with LBH-123-AI's latent upscaler in the
container, `latent_upscale` runs the first steps at a smaller size and refines the latent at the
full size; `upscale_refine_steps` sets how many steps refine, and the video object reports both
- rad-convert --in-place extends a container whose weights the plugin has regrouped since
- plugin ABI 22: out-of-tree plugins must be rebuilt
- video: MiniMax-H3 and FastVideo's FastH3 8-Step V2, a video with its stereo soundtrack from text
on OpenAI's /v1/videos, block fp8 on two cards
- music: MiniMax-Music3, songs from lyrics and a description on /v1/audio/speech
- speech: Breeze-TTS-2 on /v1/audio/speech and vLLM-Omni's realtime WebSocket
- runtime LoRA adapters beside the base model, picked per request by `model` (baKon, #105)
- several agent streams keep their cached history: --checkpoint-slots auto, the new default, sizes
the snapshot store by --max-num-seqs (#108)
- the Swift 1.5 27B W4 releases convert and serve: compressed-tensors AWQ and GPTQ int4, AutoRound,
ModelOpt NVFP4 (#110)
- the image's host tests pass where perf_event_open is refused, as in BuildKit's sandbox (#106)
- plugin ABI 21: out-of-tree plugins must be rebuilt
- 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
- Qwen-Image 2.1 and 2.1 Turbo: text to image and image edits over OpenAI's images API,
/v1/images/generations and /v1/images/edits. An edit takes up to ten pictures and an optional
mask, outside which the picture comes back exactly as it was; `background: transparent`, png,
jpeg and webp output, `n` pictures from one prompt, streamed previews (`partial_images`), and
vLLM-Omni's seed, negative_prompt with true_cfg_scale, num_inference_steps, width and height.
arch/qwenimage21 serves the diffusers pipeline directory, converted with
data/recipes/qwen-image-2.1-fp8.recipe (block fp8) or qwen-image-2.1-bf16.recipe.
deploy/compose/qwen-image-2.1.yaml and qwen-image-2.1-turbo.yaml serve the fp8 containers on
two cards. Two R9700s make a 2048x2048 picture in 61 s at the base model's 40 steps and in
13 s with Turbo (56 and 12 s with --tp-wire wht6), a 1024x1024 one in 6.0 and 2.6 s. The
models are under Qwen's research license, which is non-commercial
- an image generator is a program kind of its own (core/gen): an architecture declares its
conditioning, denoising and decoding passes, and the driver runs the schedule, the pictures of
a batch and the conditioning cache. An image model's /v1/models entry is its generator's name
(qwen-image-2.1, qwen-image-2.1-turbo), and its capabilities and startup banner list only the
images endpoints
- the tiled prefill GEMMs run their tiles in groups of activation bands, 16 for fp8 and 8 for
bf16, so an operand larger than the 64 MB cache is read once a group instead of once a band. A
bf16 GEMM with more than 64 MB of weight runs up to twice as fast
- fixed: a second lane opened in the middle of a step started beside work lane 0 had not
finished. Gemma 4 26B-A4B opens its lane that way, so its first step after startup could read
rows not yet written
- startup no longer warns about --checkpoint-slots when it was not passed, nor about an expert
floor on a model with no experts
- the image's FFmpeg writes png, jpeg and webp (libwebp)
- for out-of-tree plugins: RAD_ABI_VERSION is 16. The op vocabulary gains the image generator's
ops (conv2d_nhwc, ln_mod, ln_mod_quant_fp8, flow_euler, attn_prefix_self and others; docs/OPS.md,
"Image generation"), and all_reduce takes an optional `overlap`. Plugins built against 1.5.0
must be rebuilt
- 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
The drafter's head was `gemm_nt` over the target's bf16 table -- 352 MiB a rank at tp 4, every draft
pass, 566 us of a 26B-A4B decode step under --profile-ops on 4x R9700: the widest read on the draft
path, and the "first thing to change once the model runs" its own comment named.
A container may now hold the table a second time as `dflash.draft_head.weight`, block fp8 -- one
checkpoint tensor, two logical weights, as rad_block_dflash2.h does it -- made by the recipe line
dflash.draft_head.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
which the three gemma4-26b-a4b -df recipes now carry. Where the copy is there, the head is
quant_act_fp8 over the gathered rows and gemm_nt_q over the copy at fp8a8: half the bytes, for 176
MiB a rank more. The copy is row-sharded exactly as the table, so a rank's rows are the same
vocabulary slice and row_topk's vocab_off, the all_gather and pair_argmax are unchanged. Drafts are
verified, so the coarser logits change what is proposed and never what is accepted --
draft_n_accepted says whether they propose worse; there is no rerank against the bf16 table yet.
Where the copy is not there -- every container converted before this, or one whose recipe made it
something other than block fp8 -- the head reads the bf16 table exactly as before. The decision is
the stored encoding's (weight_enc on the copy's name), and the copy's name map entry alone writes
nothing: rad-convert walks the declared weights. The startup note names the head in use. The
block-fp8 test moves to one helper, which the routed experts' encoding check now uses too.
arch_test: with the copy's encoding block fp8, the copy is declared and the head is gemm_nt_q over
it from the quantised rows; without, nothing is declared and the head is gemm_nt over the table;
a draft pass issues the head once either way. ARCHITECTURES.md says so.
Not yet run on the cards; it needs a container converted with the new recipe line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The three containers arch/gemma4 has been served from, each with the usage header the in-tree
recipes carry:
- gemma4-26b-a4b-df: the routed experts' gate_up block fp8, their down bf16 (K = 704 is not
whole 128-blocks), the drafter's linears block fp8. The measured container.
- gemma4-26b-a4b-df-pad768: both expert projections fp8, from a checkpoint whose experts were
padded 704 -> 768 before conversion (zero rows of gate and up, zero columns of down: exact).
The padding is described rather than shipped: the tool that did it is Python and stays out of
the tree.
- gemma4-26b-a4b-df-bf16x: only the drafter quantised -- the bf16 reference for the KL mode.
The rules are the ones the containers were converted with; only the headers are new.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rotated Qwen3.8-27B checkpoints: ParoQuant MXFP4, int5 bit-plane and z-lab's int4 import (the givens
transform with parts, per-row scales, zero points), the w5a16/w4a16_asym decode GEMMs, the
w4a8i8/w5a8i8 prefill band, the givens_rotate kernel, and the dense per-group rotation
(givens_dense_quant: one 128x128 f16 matrix a part and group on the matrix cores) for the quantising
rotation in prefill. gemm_nt_q gains part bounds (pb1/pb2), an op-schema change an out-of-tree
kernel library has to follow.
Fixes on top: the dense matrices are a container table ("t.dense") that rad-convert composes in f64
from the pairs and angles, and the loader only moves its bits. A container converted before this is
refused at load, naming the re-convert (--reuse copies every unchanged weight). A gemm_nt_q row that
does not read part bounds refuses them instead of ignoring them. libavx implements givens_rotate and
givens_dense_quant.
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.