Archived
90b1229bfcedecbdf5fd38d41b26019ed2cba298
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
b74a6b2ece |
spechub: mtp_couple_verify walks the live candidates only (151 -> 31 us a launch)
The sampler's candidate plane is kSampleCandidates (1024) wide and at top_k 20 about 20 entries are live, but the coupled verify ran its eligibility scan (global memory, one entry at a time) and its sums and walks on one thread over all 1024: 92-151 us a launch at any row count, on the critical path of every coupled step. The workgroup now checks validity and takes the maximum in parallel (order-free, exact), compacts the live indices in ascending order into LDS, and the serial sums and walks run over that list in the host reference's order, so the token is the same bit for bit. vtime (n_cand 1024, 20 live, every row bound): 151.7 / 92.8 / 100.5 -> 31.3 / 32.2 / 35.9 us at 4 / 16 / 64 rows; device == host on every row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
ce79b12126 |
dflash2 coupled walk: Q at temperature 0.6 by default
Q's temperature (RADIANCE_DFLASH_Q_TEMP) only moves acceptance, never the output law. Held-out tokens per verify step at request temperature 1, x4, 32 rows of the eval set, Qwen3.8-27B MXFP4 with a DFlash2 drafter fine-tuned on our traffic, our serving flags: ordinary rule 3.52; coupled with Q at 1.0 3.71, 0.7 3.88, 0.5 3.85, 0.35 3.77. The walk's scores are flatter than the target's law, so a sharper Q puts its mass where the target's is; 0.6 is the default now. At 0.6, 3 interleaved rounds against the ordinary rule (64 held-out rows at x4, and three requests at x1 and x4, 1500 tokens, T 1): - tokens per step 3.53 -> 3.82 (+8.2 %), every round apart (3.50/3.49/3.61 vs 3.82/3.79/3.86); time-weighted decode +5.4 %; - decode per stream: 0.7k prompt x1 174.1 -> 181.7 (+4.4 %), x4 144.6 -> 153.8 (+6.4 %); 22k prompt x1 186.6 -> 191.0 (+2.3 %), x4 135.1 -> 146.2 (+8.2 %); 41k prompt x1 186.9 -> 196.8 (+5.3 %), x4 125.8 -> 135.0 (+7.3 %); aggregate at x4 +5.3..+5.5 %. Coupled at 0.6 against the ordinary rule, 5000-6000 samples of tokens 1-4 of two chat prompts: chi-square p 0.62..0.99. The walk's kernel issues each candidate's successor slice and unary score before the predecessor's codebook row (both are independent of it). This is the build measured above; it moved the pass time within noise (91.3 -> 90.8 us at M 16, steps 7), and tokens, ids, x and status still match the host oracle on all 40 random lattices (q by FP64 exp ulps, <= 4.3e-16). ctest (the environment-only tests excluded) 105/105. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
cb0abe9ac7 |
dflash2: lossless coupled acceptance at T > 0 (--draft-coupling on)
DFlash2's drafts were the greedy walk over its candidate lattice, accepted
only when they equal the target's own sampled draw: P(y == x) instead of
rejection sampling's sum min(P, Q). --draft-coupling already did the latter
for a linear MTP head; this extends it to the block drafter.
- dflash_couple_propose (spechub plugin, device row + host oracle): after
dflash_select, the same lattice walked again, sampled. Position l scores
each candidate as dflash_select does (unary + low-rank edge from the
previous token), Q_l = FP64 softmax of score / q_temp over the best eight
in-vocabulary candidates, x_l ~ Q_l at (seed, base, KEY_DRAFT + l + 1),
x_l is the next predecessor. Position l writes round l+1's state row, so
the engine binds it and the sampler's mtp_couple_verify (maximal coupling,
residual (P - Q)+) verifies it exactly as an MTP round. Q depends on the
committed text and on x_0..x_{l-1}, never on the verify, and is stored
exactly. Greedy requests keep dflash_select's tokens (status 0); a draw
for another card or a Q that cannot be built takes the walk's argmax and
the ordinary verify (status -1). The shared arithmetic is in
abi/rad_spechub.h (rad_dflash_couple_step / _walk).
- The block driver stages one draw per drafting row before the query pass,
reads the states back with the slots and binds them after the commit
(Engine::bind_couple, shared with the serial driver).
- qwen35_fp8 declares the planes and the op under --draft-coupling;
RADIANCE_DFLASH_Q_TEMP sets Q's temperature (default 1, exact at any).
- Default (flag off): no op, no plane, no change.
Gates:
- spechub_dflash_couple_test (CPU): emitted token vs P by chi-square over 3
seeds each, Fisher-combined p 0.135..0.919, for Q = P, Q on fewer tokens
than P, Q mostly outside P, top_k 20 + top_p 0.95, top_p 0.6, top_k 3 at
T 0.7, peaked Q; acceptance = sum min(P, Q) within 5 sigma; the walk's
stored Q equals the softmax of its scores (1e-5) and x follows it (p
0.993); the whole draft/verify/bonus loop over 3 tokens matches the
target's autoregressive law (combined p 0.62 at q_temp 1, 0.67 at 0.5,
0.024 with every 2nd step on the ordinary verify).
- Device row vs host oracle, 40 random lattices at the production geometry
(V 248320, K 16, R 256, steps 7/3, M 1..16): tokens, x, ids, status
identical; q differs only by FP64 exp ulps (<= 4.3e-16 relative).
91 us a launch at M 16, steps 7.
- Engine, Qwen3.8-27B MXFP4 TP2, our serving flags, 4-6 tokens of two chat
prompts at T 1 / top_p 0.95 / top_k 20, 5000-11000 samples per arm:
coupled vs ordinary speculation chi-square p 0.23..0.81 (tokens 1-4 and
pair 1-2); both differ from no speculation on one prompt by the same
amount (the verify-vs-decode logits, not the rule).
- Flag off, old build (up12 5dbb5dc) vs this: greedy top-5 logprob traces
identical over 300 tokens (spec 7 and 0, two requests each), 6/6
fixed-seed sampled texts identical.
- ctest (the environment-only tests excluded) 105/105.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
||
|
|
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). |
||
|
|
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> |