Archived
ff4b7c9fb4dcd1e58151aa5e437569118bef71f6
17
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f713f449c2 |
glm5next: the width split is for all-MXFP4 experts
The layout rule chose the width split at four ranks and up before it knew the weights' format. MoeFP8 refuses to slice a plain bf16 expert, so a container of bf16 experts, or of MXFP4 with protected bf16 ones, that main serves at TP4 was refused unless --weights-disk-tier was set. Read the container's encodings first, on every rank alike, and take the width split only when every routed expert is MXFP4. The check declares no name map, so no pinned graph moves. |
||
|
|
8ef50a7708 |
glm5next: experts split by width at four ranks and up, whole for the file tier
Whole experts on their rank let the routed weights live on the drive, which a two-card host needs, but at four and eight ranks they leave the shapes the MXFP4 kernels are tuned for: glm_prefill wants 288 experts an op and finds 72. On 4 x R9700 that cost prefill two thirds and four-stream throughput 37%. Keep the width split at four ranks and up, as the kernels expect, and take whole experts at two ranks or when --weights-disk-tier needs them (ABI 37, RadBuildCtx::expert_file_tier). The file tier's graph at eight ranks keeps main's pin, and the route-count fix that came with expert parallelism stays. |
||
|
|
be623ba1dc |
glm indexer: a step that takes all its blocks does not split
A prefill chunk past the row threshold split the indexer over the ranks even when every row's history fit the selection, so it scored rows whose selection was already decided and gathered the result. Such a step now takes the unsplit take-all path on every rank: zeros into a plane of its own, [max_tok, topk + 1] (the score plane holds only a run of rows where a step may split), and a selection over the whole step, with no query side, scorer or gathers. Temp-0 replies byte-identical to the scoring path; 114/114 tests. |
||
|
|
c9e34d534c |
glm5next_test: the indexer's tests take both paths, scored and taking all
The fixtures' sixteen- and eight-column tables reach fewer blocks than the selection, so their steps now take all (DsaCache::takes_all). Where a test is about the scored path, its batch carries enough history to score; the steps that take all assert that no query side or scorer runs and that the selection reads the fill. The pinned graph adds the fill. |
||
|
|
d858aa722b |
glm5next: --kv-cache-dtype fp8 narrows the latent attention cache to E4M3
The plugin refused fp8. It now takes bf16 or fp8 and applies it to kv_latent alone: Geom::kv_dtype is the configured cache dtype, kv_latent is declared in it, and GlmMla's kv_store and kv_store_streamed name it, as does every mla_attn over the latent (head form, row form and the MTP layer's), which then resolves to the fp8kv rows. The store keeps kv_store's default descale of 1, which the attention reads, as vLLM's fp8 cache does. kv_index_tail, kv_dsa_index and the KDA groups keep their dtypes; the indexer reads only the latent group's tables. Host-tier, streamed and replicated sizing follow the group dtype already. Under bf16 the attention states no kv_dtype and the graph is the one declared before. At 4 x 262144 tokens the latent cache is 12 layers of 512 bytes a token instead of 1024. glm5next_test: fp8 declares the latent group E4M3 and the other four unchanged, every latent store and attention names fp8_e4m3, and bf16 (stated or default) leaves the attention without kv_dtype; the refusal test now refuses f16. |
||
|
|
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. |
||
|
|
9647b84ee0 |
glm5next: expert parallelism -- experts become file-direct
Main's glm5next width-shards the routed experts unconditionally (GlmTp::expert_width, ff_lo/ff_hi): an expert's stored form is a shard across ranks, so --weights-disk-tier refuses it and a 151 GiB expert set cannot leave VRAM at any pool size. The helper's expert-parallel declaration (expert_base windows, RAD_SHARD_NONE, no ff spans) already exists upstream -- qwen4exp uses it -- so this retargets glm5next onto it: each rank owns 288/world whole experts, the routed arm's buffers full-width (FE), the shared expert still width-sharded, world 1 unchanged, and a shape probe's rank >= world clamps to rank 0's window. Fixes the 24.78 GiB "no eligible tier" startup OOM on 2-card hosts; the world-8 graph pin is re-recorded from the test's own pin: printout. Assisted-by: GLM-5.3-Flash |
||
|
|
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. |
||
|
|
c2219fccb0 | models: qwen4exp_fp8 and GLM-5.3 stream their KV | ||
|
|
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). |
||
|
|
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> |
||
|
|
4f821ce0b9 |
glm5next: the latent and index caches are declared replicated -- the host tier holds each once a slot
Every rank computes the whole normed latent (kv_store over the replicated kv_a) and pools into the whole index cache, in the head form and the row form alike, so both cached groups carry rad_kv_group_replicated. At eight ranks a 4-token block costs 49.59 KiB a slot (kv_latent 48.00 KiB over its 12 layers, kv_dsa_index 1.59 KiB) rather than 396.75 KiB, 12.4 KiB a token rather than 99.2 KiB: --prefix-cache-mib 32768 holds 2.7M tokens rather than 338K. glm5next_test pins the two flags at 1, 2 and 8 ranks; the flag is outside the recording fake's graph hash, so the pinned graphs and steps stand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
2387a23e00 |
glm5next: pictures -- the tower last, its rows over the trunk's and the draft head's embeddings
With the container's tower and an encoder budget (--mm-max-patches), glm5next declares rad_block_glm_vision.h's tower after every text and draft op, its weight groups from 46, past the MTP layer's; an encoder pass issues only the tower. The encoder's rows overwrite the placeholders' embeddings before the vocab-sharded lookup's reduction (MediaRows), in the trunk and in the draft head's own lookup (GlmMtp::declare_inputs with `media`), which is what SGLang feeds its draft model: without them the drafts read the placeholder's embedding and acceptance falls on a prompt with a picture. The model has no rotary, so nothing else changes in a step. The probe states the tower's merged block (enc_merge 4). glm5next_test: the tower only with an encoder budget, at one and eight ranks, its maps, groups, rotary, unfold and clips; the refusals; an encoder pass issues the tower and nothing else over two pictures; a prefill with a picture scatters its rows before the all-reduce in the trunk and in the draft head's history pass, a text step none; a sizing declare with the tower is the real graph. The operand-count and container cases run on the container with the tower. The pinned text graph and steps are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
b86b25e406 |
arch/common: GLM KDA issues both low-rank down-projections before either up-projection -- one ordered point fewer a layer
A KDA layer projects its input seven times: qkv, beta, the two rank-128 down-projections into the forget and gate paths, their two up-projections, and the output. The block issued forget's down- and up-projection, then gate's: a recorded pass orders the input's four readers, then forget_b, then gate_a reading the input again, three ordered points where two would do. Both down-projections now issue before either up-projection, in declare as in step, because the buffer plan takes lifetimes from the declaration order and forget_low and gate_low must not share bytes while both are live. The same GEMMs over the same operands, so the bytes are the same; the pinned step hashes move with the order (world 1 0x906897570034f5f5 / 0x68ffc03d2b640d51, world 8 0x9f39f6f7a04dc4d3 / 0x3818eedb4ac10d1b), and the block's test holds the four readers first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
1ad675e10c |
glm5next: the DSA indexer scores and selects by query rows over the ranks -- the prefill op that grows with context runs a run of rows a rank, bit for bit
Every rank scored every query row of a step against every complete block of its sequence and selected its 512 blocks, the same work eight times: 58 ms of a 1029 ms step at a 4096-row chunk and 20k of context, about 185 ms at 64k, the largest op that grows with the context. From GlmTp::kSplitRows each rank now scores one run of the step's rows with dsa_score's row_part, selects for the rows of its run under the bounds the scorer rebased (cu_part), and two all_gathers lay the page tables and lengths end to end (8 MiB a layer at 4096 rows). The key side stays replicated. The run's queries are all a rank needs, so the query projection, its quantiser and the head gates run on the run's rows too, and the gates lose their column split and gather; the bf16 projection stays on the step's rows where a run would be 64 rows or fewer, the skinny band whose split count a tuned configuration may set. Each row's selection is the same kernels' answer to the same operands, so the joined table is bit-identical to the replicated one and MLA reads it unchanged. The rule for a run is GlmTp's, stated once: ceil(T / world) rows rounded up to whole 16-byte words of the gathered row, because an all_gather moves whole words; the indexer gathers one i32 length a row, so its runs are multiples of four (DsaCache::part_rows). A rank whose run lies wholly past a small step takes the first run and computes dead rows, so every plane it gathers is written (GlmTp::run_of). The selection planes hold world runs, which can reach past the step, and the score plane shrinks to one run, 256 MiB to 32 MiB at 64k of context and a 4096-row chunk. A decode step splits too once rows x live blocks reach 2^18 from 16 rows (GlmTp::kSplitWork): eight sequences verifying five drafts from about 22k of context, where scoring 48 rows over 8000 blocks (250 us on one R9700) outweighs the two eight-rank gathers (about 50 us); a single sequence's six rows never pay. The replicated issue passes cu_part absent as its tenth operand, because the engine counts operands against the schema and refused the nine-operand issue at a served engine's first long prompt. On eight R9700s (TP8, two ranks on Gen4 x8 that day) a 19887-token prompt prefills 3927 tok/s against 3748 on 1.9.0, 7881 tokens 3990 against 3655, 2k 3849 against 3663; greedy text with the adaptive draft window is identical. r4d_emu splits decode rows beside a prefill chunk at 2, 4 and 8 ranks and joins the runs as the gather does, byte for byte against the unsplit scorer; glm5next_test declares the split at 2 and 8 ranks with the lint, holds the row rule to the formula it replaced at every world, and pins the graph and steps (world 1 0xed3fc26c486ea1b5 / 0x33e5f136f0dbba15, world 8 0x712f01858dbe1047 / 0xf9e357b1333c638f). dsa_score_fp8's selftest passes 62 of 62 on eight cards, and --perfdsa times the indexer whole and as one rank's run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|
|
fa4a7a75a4 |
glm5next: the plugin over its blocks, one a file, and rad_glm_tp.h for the shards and the split threshold -- the same graph, read in order
The plugin carried the draft head's buffers, weights and ops in its declare and its draft pass
in its step, with the three ops that join the head to its layer declared inside the layer
function; each GLM block carried its core in a header of its own (rad_block_mla_latent.h,
rad_block_kda_state.h, rad_block_dsa_cache.h), the split threshold sat in rad_tp_split.h beside
the router's column split, and 64 / world, 8192 / world, 2048 / world were spelled across the
plugin and the blocks. tests/arch_test.cpp held the recording builder, the run-phase fakes, the
step lint, the batch kits and the fingerprints beside every architecture's cases, 9.5k lines in
one translation unit, GLM-5.3's among them.
Now one block a file in arch/common: rad_block_glm_{mhc,kda,mla,indexer,router,mtp}.h, the
cores joined to their blocks, and GlmMtp the draft head in three parts (inputs, join, head),
declared and stepped around the plugin's layer 45. rad_glm_tp.h (GlmTp) holds the widths a
rank's shard divides, the one threshold kSplitRows and the replicated all_reduce declared once;
SplitF32Proj moves over unchanged. The plugin reads as the stream's buffers, then each block's,
the KV groups, the layers, the head and the draft head.
tests/arch_fakes.h holds the fakes and the helpers every architecture test needs, included by
one translation unit a binary (neither binary links rad_core, as before); GLM-5.3's cases are
tests/glm5next_test.cpp, which includes only its plugin, with two cases new: every op the plugin
issues carries the operand count its schema declares (the kernel libraries' schemas under
$RADIANCE_HOME/kernels, counted as core/runtime/issue.cpp counts), and every declared weight
reads an entry the served container holds, at the dtype its stored encoding calls for (the
container's names and encodings as rad-info -v lists them).
Every declared name, declaration order and issue order is as it was: the pinned graph and step
hashes at one and eight ranks are the values arch_test pinned before the move (world 1
0xed3fc26c486ea1b5 / 0x98ba2952bb37b075, world 8 0x8204e073efdeee0c / 0x1279aecfe4e32d9a), and
arch_test's pins of the other architectures are unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|