Archived
ceb92ea70164d0aa44c1508b1c19ec9975d2b622
10
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. |
||
|
|
19d4e8fe0e |
radiance 1.17.0
IQR-V4 for Qwen3.8-27B: - 15 recipes, data/recipes/q38-27b-iq2r-v4 .. q38-27b-iq8r-v4 (2.5 to 8 bits a weight), docs/IQR.md "IQR-V4". On the quantisation board's private split every entry has 2-19% less KL than its V3 twin of the same size (10-19% from 2.5 to 5.4 bits); IQ4R-L-V4 is 24% below the official FP8 checkpoint at 55% of its size, and IQ2R-L-V4 (2.8 bpw) is below the MXFP4 checkpoint. Containers with the DFlash2 drafter and the vision tower: huggingface.co/StillDeadcode/qwen3.8-27b-iqr-v4, served by deploy/compose/qwen3.8-27b-iqr-v4.yaml (IQR_V4 names the size) - GPTQ runs in act order inside the column trellis (tcq_order=1); the head-fed projections (attn_output, ssm_out) take a bf16 scale a (row, 128) block from five bits up; widths from measured prices - A vocabulary-weighted lm_head: four width classes of the computed trellis (output.k<B>), the tokens carrying the probability on the widest, decoded in one launch by logits_gemm_vocab with 16-bit head activations; 0.62 ms at one token on a TP2 rank against the int8 head's 1.02 ms. tools/vhead.py and data/vhead/ build the class split from the bf16 checkpoint; libquant reads the head's input Hessian for every class - At IQ6R-L and up, the int8 lm_head is GPTQ'd against its input Hessian (same bytes, median KL -8..-12%) - embed_lookup_iqr takes u7/u8 tables under a zero point and the 4096-state trellis at 6 and 7 bits - The whitepaper: radiance.stilldeadco.de/whitepapers/iqr-v4.pdf Faster IQR kernels: - The one-token GEMV gives each 16-row weight tile a block whose waves split K (5120 x 6144 at one token 42.3 -> 30.0 us), with a biased-int fold, a v_perm activation broadcast and one code stream a column - A 16-token WMMA tile without block barriers serves 2 to 16 tokens (6- and 7-bit codes from one token): a 4-bit weight takes 0.52-0.66 of FP8's time from one token to sixteen, 1.15-1.74x V3's kernels from four tokens up - The activation quantisers after the IQR gate_up (gemm_iqr_gated), the delta net's decode conv fold (gdn_conv_recurrent_update_had) and the attention gate (gate_had_quant_i8g) are folded into their producers, byte for byte the same codes: 128 fewer launches a decode step - End to end on one R9700 (TP1, no speculation): IQ4R-S-V4 decodes one stream in 24.7 ms against the MXFP4 checkpoint's 25.8 at five times lower KL; IQ3R-S-V4 is faster than MXFP4 at 1 to 8 streams. Prefill stays 8-9% behind MXFP4's 4-bit tile Quantisation tooling: - rescale=1 refits each row's scale to its codes after GPTQ; gptqsim measures a tensor's W16A16 form (tcq_code=mad16); an int8 trunk's calibration Grams can be recorded from the codes its GEMMs read (--calib-dir, TP1) - Fixed: the GPU trellis packs tcq_code=mad16's values two int16 a register New models (merged): - Spark 2.5 (spark25: bf16 and rotated-int8 IQ8R checkpoints, tensor parallelism with exact collectives, reasoning and tagged tool calls) with its DSpark drafter (exact attention and Markov walk ops), docs/SPARK25-IQ8R.md (@gostar) - Ling-3.0-flash (bailing_hybrid: KDA, dense latent attention with mla_attn_paged, group-limited sigmoid routing, the clipped SwiGLU and its MTP layer as a serial drafter), its w4a8 recipes and compose files for four and two cards (@keptn42) - Gemma 4 12B (gemma4_unified, served by the gemma4 plugins): its picture and audio embedders, a picture's placeholders read both ways on the sliding layers as the model was trained (the scheduler ends no prefill chunk inside such a run; RadBatch::n_bidi), windowed attention at head_dim 512, the assistant head as MTP drafter at one, two and four ranks, suppress_tokens from generation_config, bf16 and i8g compose files (@keptn42) Merged: - The prefill KV split sized by the live KV length rather than the model's max_ctx, recorded passes keyed by their split geometry, and --gpu-memory-mib, the inverse of --gpu-headroom-mib (@gostar) - Possessive quantifiers in tokenizer patterns where the greedy reading provably matches the same (Ling-3.0's), and the Grafana dashboard's first screen of totals (@keptn42) - The dashboard's history line (decode, prefill and TTFT over finished requests, kept in the browser, JSON export), session extremes that age and reset on a restart, card-count changes, an Advanced tab for the poll intervals, each request's prefill time from admission in /stats (prefill_s), and the page's JavaScript run by tests/js (@Memoria) - From PR #390: the file tier reads a routed layer with its own router's counts and waits for its deposits; the stop-string hold-back keeps back only a tail that can still become a stop string (before, every delta waited up to the longest stop's length); the sampler's planes are sized by the step's token bound, the n-gram ban runs beside a drafter, and a top-1 row issues no candidate cut (@Code000) - The n-gram reader refills its reads as they land, and a decode gather waits on the other rank's read of a row instead of reading it again (#369, @pokesjw) - libr3d's GEMM structs value-initialised so the tape audit sees no padding (@RikshaDriver) Added: - --ngram-placement disk=DIR: the n-gram table read from its own file, DIR/ngram-<id>.bin, filled from the container at the first start, on a faster or separate drive (#130) Fixed: - input_reference's H.264 round trip runs on libopenh264, which the image carries, at a quantiser held at the crf (a side under 16 padded and cut back); a build with no H.264 encoder answers 501 (#163) - kvtier: at most 1024 session rows under one shared first block; with one shared prompt the list grew a row a request and prefill fell from 9k to 2.5k tok/s after 500K requests (#375) - Speculative steps on an architecture with no pass-key callback keep their recorded passes under the live-KV prefill split Plugin ABI 35: - RadArgs::kv_used_max_h and wgp_count, RadBatch::kv_used_max_h and positions_h, the optional rad_arch_pass_key export and RAD_KERNEL_CAP_DYNAMIC_PREFILL_SPLIT; RadEncoderDecl::bidirectional and RadBatch's n_bidi runs. The layout fingerprint table is regenerated; out-of-tree plugins rebuild against 35 Thanks to @gostar, @keptn42, @Memoria, @Code000, @pokesjw and @RikshaDriver. |
||
|
|
a64c75eb34 |
qwen35_fp8: read the delta net's out-projection beside its decode recurrent update
At decode heights the recurrent update runs one workgroup per (sequence, head) and leaves the card's memory mostly idle. Each delta-net layer now reads its out-projection (the whole weight, 7.9 MB a rank in MXFP4) into the on-die cache there, on the second lane behind a join from lane 0, as prefetch_beside does beside the all-reduces. Up to four decode sequences and 32 rows; no read on a step that carries a prompt's rows, at one rank, or where the deployment turns weight prefetch off (RadBuildCtx::weight_prefetch_off: nothing is declared). Qwen3.8-27B MXFP4 + DFlash2 at tp 2 on 2x R9700, production flags, 1k context, hwgrid ms/step, median of five interleaved rounds, none -> whole projection: x1 19.40 -> 19.10 (-1.5 %), x2 20.93 -> 20.78 (-0.7 %), x4 24.26 -> 24.17 (-0.4 %), every round faster at each of the three; x8 25.22 -> 25.48 (+1.0 %, four rounds of five slower) -- hence the four-sequence ceiling; x16 (64 rows, no read) and 90k x4 unchanged. 4 MB reads as the whole. Against this main (one round): x1 19.40 -> 19.15, other cells within noise. Greedy output identical to the build without the read (300/300 tokens on two prompts, |dlogprob| 0). arch_test: qwen35_fp8_reads_the_delta_net_out_projection_beside_its_decode_update; the qwen35_fp8 step pins move (prg_pins.py). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
6645337f69 |
radiance 1.13.0
New models: - Tencent Hy-Memory (HYV3) from its BF16, FP8 and GGUF checkpoints, with its native tool calls - M2XFP4: metadata-augmented MXFP4 weights for Qwen3.8-27B and its DFlash2 drafter (top-1 89.1% -> 92.4% against plain MXFP4), its quantiser and recipe, and ParoQuant's M2XFP4 checkpoints - Gemma 4 E2B/E4B audio input; NVIDIA-Nemotron-3.5-Bolt-E4B in int8 and 4-bit, on two cards by default; Ornith-1.5-122B compose files Speed: - Weight reads beside the decode all-reduces (qwen35_fp8, gemma3; --weight-prefetch, on by default): the 27B MXFP4 with DFlash2 61.2 -> 67.9 tok/s at c1, TranslateGemma 27B +13% - Head-256 split-KV decode attention at 256 workgroups and without bank conflicts (27B: +3-5% a step at 25-41K context), and the prefill KV split for small launches (a short turn over a long context decodes the other sequences 27% faster in that step) - MXFP4 decode gate_up, activation and fp8 quantiser in one launch (27B, Gemma 3 up to 64 rows: TranslateGemma +2-5% at 2-8 streams) - ParoQuant int4/int5 tiled GEMMs 6-9% faster - Speculation: a step's tokens are sent before the drafter's passes end, no step waits behind one that ends its requests, and the MTP head's first draft no longer collapses after short chats in the prefix cache Features: - --kv-resident N: KV streaming for a context bigger than VRAM (qwen4exp_fp8, GLM-5.3) - MiniMax-H3: reference media and keyframe conditioning with the VAE encoders - Krea 2 rebalance presets balanced, detail and subtle - The dashboard's request history; a stall watch that reports a frozen step's thread and stack - rad-tune at the served configuration, collectives measured as the exchange; Gemma 4 E2B/E4B's per-layer embeddings read ahead off the step path - A GPTQ calibration tap and recipe for Gemma 4 31B's w4a8 container Fixes: - The two-rank all-reduce checks that a peer's push has landed before reducing it - z-lab's DFlash drafter on Gemma 4 31B keeps drafting after a prefix-cache hit - MiniMax-H3's modulation rows Changes: Plugin ABI 31: out-of-tree plugins must be rebuilt. RADIANCE_PREFETCH_BESIDE is --weight-prefetch now; RADIANCE_NO_HUGE_PAGES, RADIANCE_IDS_EARLY, RADIANCE_ATTN_BAND_SPLIT, R4D_PREFILL_SPLITS, RAD_PLE_TIMING and RAD_PLE_CACHE_ROWS are gone. |
||
|
|
e6fa74087a |
qwen35_fp8: the GDN a|b projection on the second lane at decode sizes
At decode and verify sizes (up to 64 rows) the delta net's a|b projection (gemm_nt, N = 48) is nearly all launch cost and reads only the norm's output, as the in-projection does: it runs on the second lane beside the in-projection and is joined back before the convolution reads `ab`. A prefill chunk keeps one lane: there the projection is real work and the lanes would split the bandwidth the in-projection uses. An opt-in (GdnFP8::ab_lane) set by qwen35_fp8 only, whose second lane carries no collectives: +1.1 % one stream without speculation (three rounds each). The same for k and v beside q|gate in the gated attention was measured and left out (-0.7 %: q|gate is a full-bandwidth GEMM and they compete). It costs memory: naming the two buffers concurrent gives the arena a second scratch region and the bring-up a third queue (Qwen3.8-27B at TP2: arena 534 -> 604 MiB, queues 67 -> 100 MiB a card, KV 752k -> 746k tokens). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
d39e0511e7 |
qwen35_fp8: a prefill step of one sequence in two pieces, block boundaries on the second lane
At two ranks a prefill step of at least 1024 rows is cut into two pieces of about half (pipe_rows: rounded up to 64, both in the whole step's band). Every block runs a piece at a time on lane 0; the work between two blocks runs a piece at a time on lane 1: the block's all-reduce at `overlap` 1 (the narrow lane rows), then the next block's plain norm, and after a feed-forward that keeps its add, the add, the DFlash2 taps and the final norm. The fused all-reduce + norm is not used there: it holds its blocks while waiting on the link and slowed the GEMM beside it by a third (measured: no gain at all with it). - GdnFP8, AttnGatedFP8: takes_pieces(); the dense attention gets a two-piece path (each piece its own rows, positions, slots and query bounds, seeing the cache up to its own end), and the delta net's piece path takes the caller's normed input (ArPieces::in_ready) and passes each piece its own context length (positions + r0), so a prompt's first chunk works. - MlpFP8: slice() split into body() and tail(), and an overlap all-reduce (issue_ar). - NormQuantFP8::step_plain(). - M-RoPE batches (the vision tower loaded) take it when no token's components differ: plane 0 of rope_pos is then every token's position. - RADIANCE_QWEN35_PIPE=0 turns it off; a wide prefill step that runs serially says why, once. Bit for bit the serial step: Qwen3.8-27B KL recordings (k6_v4, wht6) compare equal with the pipeline on and off, and greedy answers to three long requests (680-41k tokens, speculation 3 with the DFlash2 taps) are identical. 41k-token prefill on two R9700s: 9.00 -> 8.41 s with the TN crossover of the next commit (-6.6 %). arch_test: the two-rank pin moves; new tests pin the serial build under RADIANCE_QWEN35_PIPE=0 and the pieces, lanes and overlap of a wide step. Co-Authored-By: Claude Opus 5.5 (1M context) <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 |
||
|
|
5681da471c |
qwen35_fp8: serve rotated MXFP4 linears (LinearFP8 rotates its input first); paro recipe
A rotated weight reads the producer's bf16 plane, rotates and quantises it into its own planes (parts side by side) and runs the ordinary mxfp4a8 GEMM. Adds data/recipes/q38-27b-paro-mxfp4-df2.recipe and the GUIDE entry. |
||
|
|
45963012ee |
any world size: the attention world, uneven delta-net heads, nothing padded
A world the KV head count neither divides nor is a multiple of -- three ranks over Flash-Next's two -- was refused by geom_from, and 1.0.12 served it by padding the checkpoint offline (docs/TP3.md): zero heads appended so that 36 / 3 / 18 / 54 divide, a second 115 GiB container per model, 1/3 of the attention and 2 of 18 delta-net heads computing zeros. This serves the shipped container at any world size instead. The attention world. geom_from serves attention on the largest multiple of the KV head count under the world (split, or replicated as 1.0.7 does when that is still above the count) and the ranks past it are attention-zero: they declare the same heads and the same program as their peers -- the scheduler sees one program -- and read nothing for attn_qg, attn_k, attn_v and attn_output (rad_weight_shard_zero). Their attention computes zeros from zeros and their output projection adds exactly nothing to the reduce. Three ranks over two heads: attention on ranks 0 and 1 exactly as the two-rank serve declares it, 12 heads, one KV head, gqa 12, the same kernels; rank 2 zero. Five over two: attention on four, rank 4 zero. Under a smaller attention world the even shard over `world` is the wrong cut for every projection, so rad_block_attn_gated_fp8.h declares spans -- q|gate rows and output columns [attn_rank * n_head, +n_head) heads, k/v at kv_off -- the same call the KV replication already used. When the attention world is the world, every TP2 and TP4 deployment, nothing here is declared and the block declares as it always did. Uneven delta-net heads. The delta net has no KV-head constraint: its kernels are bound on head widths and take any head count. 16 K heads over three ranks are 6, 5 and 5, each rank's V heads the same multiple (48 / 16 = 3: 18, 15, 15), every rank real heads. qwen4exp computes the split and rad_block_gdn_fp8.h declares it as spans of the container's rows: per-part for [q|k|v|z] and the conv channels (the parts are not equal), one span for [a|b], A_log, dt_bias and the output columns. LinearFP8 owns the scale plane's units (1/128 of the weight's rows for block-fp8, the weight's own for int8 and bf16), so a block declares in the weight's rows and the scale plane follows. The even split, when the counts divide, is untouched. The log says what the geometry did: world_size = 3 over n_head_kv = 2: attention on 2 rank(s), rank(s) 2..2 carry zero attention weights and the delta net and experts of a full rank qwen4exp: rank 1 takes delta-net K heads [6, 11) of 16 and V heads [18, 33) of 48 |
||
|
|
ae74a8aebf | radiance 1.0.0 |