Archived
b52a1801417e7b8d1906731aa16637ffbf2fc8c0
20
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ddcb9c69bb |
radiance 2.0.0
Radiance becomes a multi-model engine: one process serves several models behind one port, loads each when a request names it, parks it in host memory or restores it from its container, and shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP). Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5, Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B, the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0 serves all of them. Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill reworked, and a reworked adaptive draft window. Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server, each accelerator's memory by model, model states over time. Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410); eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi (#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon (#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and multi-model serving as asked for in #367 and #109. Plugin ABI 39: out-of-tree plugins need to be rebuilt. Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz. |
||
|
|
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. |
||
|
|
d73abc28d5 |
libr4d: the dense integer rows take the group they compute -- a Q8_0 weight at group 32 was read as 128
The dense integer kernels compile their group in and read no `group` argument, and neither the
rows nor the layout hooks checked it: w8_enc_layout accepted an `i8*f16[1x32]` weight (a Q8_0
block) at group 32 and the kernel computed it at 128. The twelve dense gemm_nt_q rows now carry
C_EQ("group", ...), and the four hooks (w4, w5, w8, w2a8) answer RAD_E_DTYPE at any other group,
the one code select() counts as a refusal. relayout_parity_test pins the hooks, plugin_test the
rows.
Co-Authored-By: Claude Opus 5.5 <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). |
||
|
|
4ec175549c |
pipelined prefill: review fixes
The parts of the series' review rounds that concern the pipelined prefill and the second lane, carried over when the series was split: - qwen35_fp8: a trunk whose norms write rotated int8 codes (qwen35_w8a8 where libr4d serves the `_had_quant_i8g` forms) prefills serially -- the boundary norms on the second lane issue the E4M3 pair only, and before the fix libr4d refused them for the int8 op, failing every one-sequence prefill step of 1024 rows or more; a pipelined step whose bounds have no storage fails the step rather than falling back on one rank only. - The three- and eight-rank overlap all-reduce rows accept every tunable pin their wide rows accept (r4d_selftest checks it). - rad_builder.h: the window joins lane 1 into lane 0 at its end only, so an op declared before it must not be issued again while lane 1 has work pending. - tests: arch_test for the w8a8 trunk; plugin_test's lane-row comment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
ad01fcaf19 |
review notes of the pipelined prefill past two ranks; selftest timings warm the clocks first
Independent review of fa118d8 / 14fb72c: no defect. Notes taken: - RADIANCE_PREFILL_PIPELINE takes 1 / true as on and 0 / false as off (the old per-arch switches took 0 for off; such a value must not leave the pipeline on); the header says that past two ranks only the two-shot band is narrow and that eight ranks pipeline on the exact wire only; the note says the switch allows the pipeline (gemma3 may still turn it off); "rad_arch.h" as the other common headers include it; comment lines rewrapped. - plugin_test resolves the all-reduce at `overlap` 1 against the real libr4d: the two-shot band takes the lane row at three, four and eight ranks, exact and ti8; the one-shot band keeps the wide row. arch_test: every spelling of the switch, off at two ranks in all three; no three-rank arch case (neither test model's heads split three ways, nor do the real models' KV heads). - r4d_selftest: gemv_wide's two column tiles at four row tiles and on the per-row scale. - r4d_selftest: every timed pass is preceded by an untimed one. A fresh process otherwise times its first pass while the clocks ramp up from idle (up to 1.5x slow, +-30 % between runs); two builds of the same machine code read 13 % apart until both warmed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
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). |
||
|
|
eb14e4f642 |
glm5next: the MLA row form, opt-in with RADIANCE_GLM_MLA_ROWS=1 -- a prefill-sized step by rows over the ranks, each rank with all 64 heads
From GlmTp::kSplitRows each rank runs its run of the step's rows (GlmTp::run_of: ceil(T / world) rows, the last run shorter) through q_b, absorption, attention with all 64 heads (mla_attn_rows_bf16), expansion and o, and an all_gather of whole runs takes the all-reduce's place. The latent cache and the DSA selection are whole on every rank, so nothing is exchanged before the attention; each rank sends its run to seven peers, half the bytes of the two-shot all-reduce, through the same exchange instance. In a 4096-row chunk at 16k of context a rank's attention drops from 14.0 to 3.9 ms a layer on the kernel bench. The price is q_b, kv_b and o at full width on every rank: 120 MiB a layer, 1.29 GiB a card over the 11 trunk layers, and about 0.1 GiB of activations; the MTP layer keeps its heads. The full-width weights are whole views (RadWeightDecl::source) of blk.N.attn_q_b, attn_kv_b and attn_output, the head form's container entries, so they take the stored encoding (fp8a8f32, bf16) and need no name map; LinearFP8 gets `stored` for that, served by its block-fp8 branch only, and LinearFP8::step writes a run of rows from a given output row. The head form stays the default, unset or RADIANCE_GLM_MLA_ROWS=0, and declares none of it: that graph is the one before this change, byte for byte (the pinned hashes). The row form is not bit-identical to the head form, and GLM-5.3 turns that into a measurable divergence: over a 43k-position KL corpus at TP8 (English prose, German prose, code) the row form scores a mean KL of 0.033 against the head form (median 0.004, top-1 agreement 93.5 %), with greedy text unchanged. The projections are not the cause: q_b and o over a rank's rows give the head form's bytes (r4d_emu), and o summed as eight rank partials in the all-reduce's order (RADIANCE_GLM_MLA_ROWS=2, a test form, GlmMla::Form::rows_sliced_o) scores 0.032. The attention's rounding is: the rows kernel parts from the paired union tile in about 0.1 % of every row's outputs by one bf16 step (the union pairing sums a pair's second row in another order), and the 16-head tile, which parts in the same share of every second row only, halves the KL to 0.015. A bit-identical row form would run the union tile eight times a row over its own group of eight heads, without this kernel's gain, or need a rows kernel with the union's arithmetic; neither is here, so the form is opt-in. Measured on eight R9700 at Gen5 links, the same build: a 20k-token prefill 5074 tok/s in the row form against 4270 in the head form, BetterBench prefill at 22k 4984 against 4151, single stream 181.8 against 180.2 tok/s, eight streams 468 against 454. glm5next_test declares the block at one to eight ranks and checks the full-width views and their sources, the fp8a8f32 GEMMs, the gather's bound against the all-reduce's, each rank's operands at 300 rows (runs of 38, the last 34 at eight ranks) and the head form at 255; the o-slices form's eight GEMMs and seven adds; the model's counts and the TP8 pin under RADIANCE_GLM_MLA_ROWS=1 (0x1d378152c40f8834 / 0x82ed1094dbf4b637), with the default pins unchanged; and the row rule against both formulas it replaced. plugin_test resolves every band of every op the row form adds at eight ranks against libr4d, with no card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
87701cb6b8 |
libr4d: mla_attn_rows_bf16 -- one key load for all 64 heads of a query row
A third mla_attn row, at 64 heads. A workgroup takes one query row and all its heads, four waves to each group of sixteen, and loads each 16-token key chunk once for all of them, where the matrix row loads it once a tile of sixteen. The scores are K Q^T, tokens as the tile's rows and heads as its columns, so a head's running maximum and denominator stay in its lane; the waves of a group each take a quarter of the latent's dot products and add the four partials in one order, and the probabilities reach the value product through a permlanex16 swap instead of LDS. The next chunk's keys are fetched into registers while the current one is multiplied, two barriers a chunk. A row's bytes do not depend on the other rows of the batch. Under 32 rows the launcher runs the matrix row's kernel; r4d_mla_rows_pin_form, a test hook, pins the element-wise key load, 32 heads a workgroup, the rows kernel at any row count, or the matrix row's kernel at every row count (the form a KL measurement needs to tell this kernel's share of a row split's difference). Measured on gfx1201 (r4d_selftest --perfmla, one sequence past the DSA budget at 16k of context, 513 blocks): 512 rows x 64 heads take 3.9 ms, 35 TFLOP/s, against 12.3 ms on the matrix row, and the 4096 rows x 8 heads they stand for in a TP8 prefill chunk 14.0 ms on the paired union tile. Against the wave row the output stays within the matrix row's tolerance (max abs 2.4e-4 at 513 blocks). r4d_selftest checks it against libref at 1 to 33 rows, 32 and 64 heads, every fill and both key loads, and times it against the matrix row (--case mla_attn_rows_bf16, --perfmla at 64 heads). r4d_emu_mla runs it on the host against an f64 softmax, its forms bit for bit against each other, a run of rows against the same rows of the whole batch, and a mixed TP step (decodes, a verify window, a prefill past the budget, a fresh chunk) split by heads over the matrix row and by rows over this one, at runs that do and do not divide the step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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. |
||
|
|
78c58841bf |
libr4d: GLM-5.3's kernels -- mHC, KDA, the DSA indexer, MLA, f32-scaled FP8, MXFP4 experts
The device rows for GLM-5.3-Flash's ops, at its geometry and at TP4 and TP8 slices: - mhc_pre / mhc_post / mhc_contract, and mhc_pre_partial / mhc_pre_finish, which run mhc_pre's own projection and finishing kernels with its chunk-sum order, so the pair is byte-identical to mhc_pre at n 4096, hc 4, chunk 2048. - kda_update_k128_v128_bf16, one, two or four value rows a wave, both state forms. - dsa_pool_fp8, dsa_query_fp8 and dsa_score_fp8 (fp8 WMMA, 32 heads of 128). - mla_attn: a matrix row whose WMMA tile holds a query's heads, or pairs eight heads of two neighbouring queries over the union of their page tables, above the wave row; mla_project with up to eight rows a thread or wave. - gemm_nt_f32 and router_sigmoid_topk in tiled and one-wave-a-row forms; gemm_fp8a8_f32scale and moe_gemm_fp8a8_f32scale read f32 block scales in place; moe_gemm_mxfp4a8 decodes e2m1 into exact E4M3 bytes for fp8 WMMA, with an expert-major decode form and a wide prefill form. - swiglu_clamped, and the device-only fusions of GLM's MoE block: swiglu_clamped_quant_fp8, router_sigmoid_topk_scatter, and moe_scatter_inv / moe_gather_inv, which pass the gather's slot table from the sort instead of rebuilding it. moe_gather takes f32 routing weights in its column-per-thread kernel. The sort and the gather kernels move from r4d_moe.hip into r4d_moe_sort.h and r4d_moe_gather.h, so the fused router and gather instantiate the same code. Every form that replaces another gives its bytes: tests/r4d_emu runs the kernels on the host (test_f32, test_fp8f32, test_kda, test_mhc, test_mla, test_moefuse, test_moemx), r4d_selftest compares them on a card against libref and against each other, and plugin_test pins the mla_attn band. docs/OPS.md states what libr4d serves. Co-Authored-By: John McDonough <18016200+JohnCMcDonough@users.noreply.github.com> |
||
|
|
0eb3d96ce1 |
libr4d: at eight ranks the exact one-shot ends at 8192 elements, the two-shot at 8 blocks
The exact all-reduce at eight ranks shared the three- and four-rank band: one-shot up to 524288 elements. The one-shot sends (ws-1)*N bytes a rank, seven times the message at eight ranks, where the two-shot sends 2*(ws-1)/ws*N, and on eight R9700 (PCIe P2P, bf16, warm) the two-shot is the faster from 16384 elements on. A decode step of eight streams with a draft window of six on GLM-5.3-Flash (4096 wide, an out-of-tree plugin) reduces 48 x 4096 = 196608 elements: 232 us one-shot, 68 us two-shot, where all_reduce was 20.7% of the step's device time. R4D_AR_8RANK_ONESHOT_MAX_ELEMS is 8192, a multiple of 64, the eight-rank two-shot's DIV; cArTsExact8 starts one element above it. The two-shot's block rule stops at 8 blocks at eight ranks: every block handshakes with seven peers, and past eight blocks the extra flag rounds cost more than the reduce bandwidth they add (4 blocks up to 393216 elements, 5 at 524288, 8 instead of 16 from 2097152). Both rows fold in fp32 in ascending rank order, so neither change moves a bit. numel before after 4096 one-shot 22.5 us one-shot nb 4 12.8 us 16384 one-shot 39.7 two-shot nb 4 21.5 131072 one-shot 176.3 two-shot nb 4 52.3 196608 one-shot nb 16 233.2 two-shot nb 4 68.7 524288 one-shot 573.7 two-shot nb 5 177.4 2097152 two-shot nb 16 615.8 two-shot nb 8 610.5 8388608 two-shot nb 16 2460 two-shot nb 8 2489 16777216 two-shot nb 16 4999 two-shot nb 8 4824 At 4096 the rule already chose 4 blocks; the 22.5 us was the microbenchmark's, ten launches after the host-side check, which now warms up with as many launches as it times. Band edges are the union over every candidate row (core/plugin/bands.cpp), so the edge at 8192 splits the two-, three- and four-rank bands too. Both halves resolve the same row, kernel and bits, at the cost of one more instance per (width, dtype) whose slot holds 8192 elements. Keeping the edge to eight ranks would need the band builder to skip rows whose fixed constraints the geometry rules out (world_size 8 here), a change to every op's bands for one row; plugin_test states the new edges instead. r4d_selftest runs the eight-rank rows (ar_oneshot_8rank_exact, ar_twoshot_8rank_exact, ar_gather_8rank) through the width-parametrised cases of the three- and four-rank ones instead of skipping them: the pattern's band edge is at 8192 and 8256 there, and a 9-word message must be refused. --perfar8 numel [iters] [dtype] times both rows, one thread a card, at the block rule and at 4 to 64 blocks, each checked bit for bit against the fold on every rank. On the cards: ar_oneshot_8rank_exact 20 ok, ar_twoshot_8rank_exact 16 ok, ar_gather_8rank 5 ok. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
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 |
||
|
|
a378b41abb |
libr4d: the exact two-shot all-reduce takes every prefill-sized message
R4D_AR_TWOSHOT_WIDE_MAX_ELEMS was 20971520 -- a 4096-token chunk of a 5120-wide residual -- and the band above it went back to the one-shot, which sends (ws-1)*N bytes a rank where the two-shot sends 2*(ws-1)/ws*N. At the default --max-num-batched-tokens 8192, Gemma 4 26B-A4B's attention reduce is 8192 x 2816 = 23M elements and its feed-forward reduce, which carries both branches for their own post-norms, 46M: both over the bound, so every full prefill chunk went one-shot at twice the bytes. --profile-ops on 4x R9700, tp 4, a 20489-token prefill (chunks of 8192, 8192, 4105) fits one link rate across all of it: the attention reduces 16.8 ms the three calls (two one-shot, one two-shot) and the feed-forward reduces ~37 ms (all one-shot), 1.6 s of the 2.7 s prefill. The same rate with every call two-shot is ~9 and ~19 ms: about 0.8 s less a 20k prefill. The bound guards the kernel's int word offsets and nothing else -- the scratch already holds a full message per slot (r4d_ar_entry.hip build()), twice what the two-shot uses -- so it is now 2^28 elements, 2^26 words at fp32. The fold is the one-shot's, fp32 in ascending rank order, so the band edge moves no bits. Fewer bands also means one scratch set less: the old 20971520 band was its own instance, ~335 MiB a rank at tp 4. plugin_test: a 16384-token chunk is two-shot to its end, and the one-shot still takes a message past the bound. r4d_selftest's three-rank pattern walks a 46137344-element message, past the old ceiling. Not yet run on the cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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 |
||
|
|
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 |
||
|
|
e466fa07e2 |
radiance 1.0.10
- Four-rank Qwen3.8-Flash-Next (PRs 14 and 16 by keptn42): the all-reduce runs fused with the hyper-connection's write, and with the MoE gather in front of it, on decode and verify steps on the exact wire. The routed experts are split in four classes, so every rank computes the same share; moe_gemm_q_mod4 is the new grouped GEMM. The oracle now checks moe_gemm_q on w4nl and w5nl containers. - --embedding-placement and --ngram-placement, each auto | vram | ram | disk. The token embedding can live in the pinned host pool, read in place over the link (from PR 17 by mechkbfan). An n-gram table can be copied into locked RAM at load instead of read from the container (from PR 15 by keptn42). auto takes the fastest tier with room once every other weight is placed, and startup prints what it chose and why. A tier that cannot be honoured stops the start with the reason; the embedding on disk and the n-gram table in VRAM are refused, since nothing can serve them. - The expert_tiered placement no longer spends the pinned host pool twice when it falls back to layer offload, and a lossy-wire request for a four-rank fused write is a selection miss rather than a startup abort. |
||
|
|
20d6c2119f |
radiance 1.0.9
- Pinned host memory is locked in pieces of at most 1 GiB (issue 13): an Intel VT-d host in scalable mode that refuses any single pin above about 2.5 GiB now takes the host pool with IOMMU translation, and peer-to-peer access, left on. - Four-rank all-reduce (PR 11 by keptn42): the tiered-int8 wire serves in-place calls, so --tp 4 --tp-wire wht6 runs. At four and eight ranks the exact all-reduce is one-shot up to 524288 elements and two-shot above, chosen by the selector, so the band report names the kernel that runs. The docs and the startup warning describe the four-rank lossy wire; eight ranks have none. - A VRAM allocation the card cannot take is refused, saying what the card has left and which processes hold memory on it. ROCm 7.2's runtime crashes on such an allocation once a queue has been destroyed, which every startup does. - rad-convert --changed FILE: with --reuse, converts only the weights that read a changed checkpoint tensor and copies the rest. |
||
|
|
966bda899a |
radiance 1.0.7
- Chat responses report usage.completion_tokens_details.reasoning_tokens: how much of completion_tokens was the reasoning block. A reply that ran out of max_tokens inside <think> now reads as that, instead of as a model that answered nothing. - thinking_token_budget (vLLM's name; thinking_budget is read as the same field) caps the reasoning. At that many tokens the block is closed and the model answers from what it has reasoned so far. It holds under speculative decoding and at any temperature. --thinking-token-budget sets the default for clients that send none. - Every completion response carries a `timings` object in llama.cpp's shape: prompt and generated token counts, times and rates, and the speculative tokens drafted and accepted for that request. It is on the buffered response, on each streamed choice's final chunk and on the usage chunk, so a proxy such as llama-swap can read per-request speed. /metrics stays the aggregate. - Peer-to-peer access between the cards is checked at launch. The all-reduce kernels need it; on a machine where the cards cannot reach each other's memory, startup stops and names device.p2p instead of the first all-reduce faulting or hanging. A kernel library can require it with a constraint on the new "device." keys, which match the machine and not the op's parameters. - A pool allocation the driver refuses says why, with the card's free VRAM at that moment and, for the host pool, the pinned memory taken against the amdgpu limit (ttm.pages_limit). Every rank pins its own --host-pool-mib, so --tp 2 pins it twice. |
||
|
|
ae74a8aebf | radiance 1.0.0 |