Archived
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.
This commit is contained in:
commit
6645337f69
198 files changed
+20904
-3240
No files matched your search
+11
-35
@@ -688,28 +688,13 @@ __global__ __launch_bounds__(kThreads) void kv_store_fp8_kernel(
|
||||
}
|
||||
}
|
||||
|
||||
// The store of a streamed KV group: `kv_store_fp8` into the group's two copies.
|
||||
//
|
||||
// A streamed group's ring is `slots` blocks deep while its block-id space is `blocks`, so a block's
|
||||
// id is not an address. Its host mirror is:
|
||||
//
|
||||
// host[blocks, kv_heads, block_size, 2 * head_dim] one block a row, identity layout
|
||||
//
|
||||
// and this kernel writes a token's k and v into the mirror's block `slot / block_size` ALWAYS, and
|
||||
// into the ring at `res[block]` only when the map says the block is resident. Both planes have the
|
||||
// same row pitch, so one offset serves both and the two copies cannot disagree.
|
||||
//
|
||||
// The residency test is here, not in the resolve, because the block a decode step writes is
|
||||
// usually the one the previous step already made resident: a mirror-only writer would leave the
|
||||
// ring's copy of that block short of this step's tokens, and the resolve does not re-copy a
|
||||
// resident block. The caller orders store, then resolve, then attention, so a block that is NOT
|
||||
// resident yet gets this step's bytes through the mirror and is copied in whole by the resolve.
|
||||
//
|
||||
// STATE FAULTS. libref refuses a slot naming a block past the id space and a map entry outside
|
||||
// [-1, slots) before writing anything. A device launch cannot return a host status, so this kernel
|
||||
// guards: a token whose block is out of range stores nothing, and a map entry outside its domain
|
||||
// reads as not resident (the mirror is still written, and the resolve refuses the step). A legal
|
||||
// call never takes either path and is bit-identical to the reference.
|
||||
// The store of a streamed KV group (docs/OPS.md "kv_store_streamed"): kv_store into the group's
|
||||
// two copies. A token's k and v go to its block's row of the host mirror always, and to the ring at
|
||||
// `res[block]` only when that block is resident; both planes have the same row pitch, so one offset
|
||||
// serves both. libref refuses a slot past the id space or a map entry outside [-1, slots); a kernel
|
||||
// cannot return a status, so here such a token stores nothing and such an entry reads as absent
|
||||
// (the mirror is still written and the resolve refuses the step). A legal call is bit-identical to
|
||||
// the reference.
|
||||
template <int BF16>
|
||||
__global__ __launch_bounds__(kThreads) void kv_store_streamed_kernel(
|
||||
const uint16_t* __restrict__ k, const uint16_t* __restrict__ v,
|
||||
@@ -2308,19 +2293,10 @@ static int kv_store_q4(const RadArgs* a, RadStream stream, int k6) {
|
||||
extern "C" int r4d_rad_kv_store_fp8v4(const RadArgs* a, RadStream stream) { return kv_store_q4(a, stream, 0); }
|
||||
extern "C" int r4d_rad_kv_store_k6v4(const RadArgs* a, RadStream stream) { return kv_store_q4(a, stream, 1); }
|
||||
|
||||
/* The store of a streamed group: `kv_store`'s geometry and E4M3 conversion, plus the group's
|
||||
* residency map (`res`) and its host mirror (`host`). The mirror is the truth and is written for
|
||||
* every token with a slot; the ring is written only when `res[block] >= 0`. Both are one block a
|
||||
* row of the same byte pitch, so the row arithmetic is the cache's, unchanged.
|
||||
*
|
||||
* `res` is read, never written: residency is the resolve's decision, and this op must not move the
|
||||
* map under a selection the indexer already resolved. A block id past the mirror's extent or a map
|
||||
* entry outside [-1, slots) is a state fault that libref refuses; the kernel guards instead (see
|
||||
* kv_store_streamed_kernel), since a device launch cannot return a host status.
|
||||
*
|
||||
* The cache is E4M3 or bf16. Streaming is dtype-agnostic beyond the two writers: the mirror and the
|
||||
* ring are byte planes of one paged layout whose pitch is `block_bytes`, so a bf16 group doubles
|
||||
* every offset and stores the values kv_store_bf16 stores. */
|
||||
/* The store of a streamed group: kv_store's geometry and conversion (E4M3, or bf16 with no
|
||||
* descales), plus the residency map `res` (read, never written: residency is the resolve's) and the
|
||||
* host mirror `host`. Both are one block a row of the same byte pitch. State faults are guarded,
|
||||
* not refused (see kv_store_streamed_kernel). */
|
||||
extern "C" int r4d_rad_kv_store_streamed(const RadArgs* a, RadStream stream) {
|
||||
KvStoreGeom g{};
|
||||
const int rc = kv_store_geom(a, &g);
|
||||
|
||||
Reference in new issue
Block a user