Archived
radiance 1.14.0
New models and formats: - libr3d: a kernel library for RDNA3 (gfx11) cards - nomic-embed-text-v2-moe (the nomicbert plugin) - Gemma 4 E2B with its per-layer MLP width, and Google's unmodified E2B/E4B directories in bf16 - DeepSeek-V4.1-Flash converted straight from its release: the Engram tables, the fused imatrix and rad-convert --chat-template for a release that ships no template - GGUF Q8_0, Q4_K and Q6_K tensors import as their planes; rad-convert writes them without a recipe - Qwen3.8-Flash-Next-FP8 converts and serves through qwen4exp_fp8 Speed: - hc_read's decode kernels as one grid (34.7 -> 25.2 us at 4 rows) and its tiled up-mix pipelined - gemm_fp8a8: the narrow form's scales staged through LDS (Flash-Next int8 at 32 rows 83.6 -> 68.3 us), the gated three-tile form at 8 waves (gate_up at 48 rows 272.9 -> 180.6 us) - Qwen3.8-27B: the delta net's out-projection read beside its decode recurrent update (x1 19.40 -> 19.10 ms a step), and the verify's split-KV attention sized by context depth (x3 at 180K 42.4 -> 40.3 ms a step) - Hy-Memory (HYV3) decode: fused QK norm, RoPE and KV store, residual adds folded into the norms, coalesced one-token expert GEMMs - spechub: the coupled verify walks the live candidates only (151 -> 31 us a launch) Speculation: - DFlash2: lossless coupled acceptance at T > 0 (--draft-coupling on) - A block drafter's proposals verified as a tree, on by default for the Gemma 4 31B's DFlash2, with a block-16 tree that runs its short block under load Features: - Decode-hot residency: --draft-expert-placement host, --expert-profile, --expert-pin-top, and --expert-stats FILE for the routed experts each layer selects - --ngram-placement ram=DIR: one n-gram table shared by engines on separate cards - Prefix cache: --prefix-resume exact (default) resumes a hit on the cold run's own chunk grid, so it answers bit-identically; snapshots at a head other prompts share, from 528-token prompts, and for tip-only one drafter window below the tip; hits on models whose KV groups have different block sizes; the snapshot store keeps a floor of 8 ahead of --host-headroom-mib - Typed tool-call argument tags; rad-chatparse --request renders and reads back one request as the server does - MiniMax-H3: keyframes ride a latent upscale - Gemma 3's fused all-reduce junction on the lossy wire Fixes: - A speculative step shorter than its band (an MTP step of 4 rows at gqa 8) no longer stops the engine with a scratch refusal at issue (#293) - --p2p off: prefill back to 1.12.0's rate; 1.13.0's push check read a host-memory slot over the link twice (#323) - A chat template that cannot render a conversation is refused at load, not mid-request - imatrix entries found under llama.cpp's spelling; the W4A8 prefill's tail scale read; the GDN conv kernels on an f32 weight; dense integer rows at the group they compute (a Q8_0 weight at group 32) - --expert-profile refuses a profile recorded on another model - hc_read's one-grid wait traps past its deadline instead of reading a stale value Changes: Plugin ABI 31, unchanged. RADIANCE_DRAFT_TREE, DFLASH2_TREE_NODES, DFLASH2_TREE_TEMP and DFLASH_Q_TEMP are gone (trees run where the probe says they pay; temperatures 1.25 / 0.6).
This commit is contained in:
1 parent
481fcd5df0
commit
4a61d7296b
160 files changed
+8790
-6819
No files matched your search
+44
-4
@@ -261,6 +261,16 @@ typedef struct RadBuildCtx {
|
||||
*
|
||||
* Trailing and zero-defaulted, so a plugin built against the older struct is unchanged. */
|
||||
int weight_prefetch_off;
|
||||
|
||||
/* ---- appended in ABI 31 (tree verification) */
|
||||
/* Nonzero: grow the block drafter's proposals into a tree (rad_drafter_tree) where the plugin
|
||||
* can. The engine sets it where the plugin's probe said trees pay (RadArchProbe::tree_pays)
|
||||
* and the drafter decodes speculatively; 0 keeps the chain. A plugin that grows no trees
|
||||
* ignores it. 64-bit so it starts past the older
|
||||
* struct's tail padding, where a plugin built against it would read nothing.
|
||||
*
|
||||
* Trailing and zero-defaulted, so a plugin built against the older struct is unchanged. */
|
||||
int64_t draft_tree;
|
||||
} RadBuildCtx;
|
||||
|
||||
/* ================================================================== control vectors */
|
||||
@@ -759,6 +769,25 @@ int rad_declare_drafter(RadBuilder* b, const RadDrafterDecl* d);
|
||||
* checkpoint was trained with is the plugin's to know. */
|
||||
int rad_drafter_shared_kv(RadBuilder* b, int pos_offset);
|
||||
|
||||
/* A block drafter whose one pass proposes a tree rather than a chain. Called once, after
|
||||
* rad_declare_drafter. `parents` is an i32 buffer at the proposal's pitch: row i's j-th entry is
|
||||
* the parent of the proposal's j-th token as a node index, 0 for the token the verify starts from
|
||||
* (the bonus token) and j' + 1 for the proposal's j'-th token, with every parent before its child.
|
||||
* Additive export; RAD_ABI_VERSION does not move.
|
||||
*
|
||||
* Each verify then runs the proposal as a tree in the same rows: node j at row j, rotated at the
|
||||
* committed end + its depth, its K and V stored at the committed end + j, and every trunk step
|
||||
* carries RadBatch::spec_parent, which the plugin hands its attention so a row sees, inside its
|
||||
* own block, only its ancestors. The acceptance follows the deepest root path the target agrees
|
||||
* with; the core then moves that path's K and V into place in every paged group. A proposal from
|
||||
* prompt lookup is verified as the chain-shaped tree.
|
||||
*
|
||||
* Requirements on the plugin: the trunk's attention honours spec_parent on every decode row; the
|
||||
* drafter's context pass stores K and V through the slot mapping only (it is staged per node, the
|
||||
* rejected ones at slot -1); and the step is issued ahead, behind which the block driver queues
|
||||
* the drafter's passes (the KL mode drafts nothing, so trees do not apply there). */
|
||||
int rad_drafter_tree(RadBuilder* b, rad_buf parents);
|
||||
|
||||
/* Whether this engine's launches chain (RadKernelChainFn, abi/rad_abi.h): the core's decision, on
|
||||
* the AQL backend only, which keeps a completion counter per queue, where the model's plugin
|
||||
* measured a gain with its speculative drafter (RadArchProbe::chain_pays) and that drafter decodes
|
||||
@@ -770,11 +799,14 @@ int rad_chain_on(void);
|
||||
/* A block drafter that also serves a shorter block: the plugin declared its query pass at `block`
|
||||
* rows a sequence as well as at RadDrafterDecl::block, with the same anchor convention, so the
|
||||
* core may stage a step's block at either. The short block proposes
|
||||
* `block - (RadDrafterDecl::block - depth)` tokens. Called once, after rad_declare_drafter.
|
||||
* `block - (RadDrafterDecl::block - depth)` tokens; a tree drafter's (rad_drafter_tree, declared
|
||||
* first) a tree of its own over the shorter pass, at most `block - 1` nodes, which needs only that
|
||||
* the short block be 2 rows or more. Called once, after rad_declare_drafter.
|
||||
*
|
||||
* The block is proposed whole, so its length is paid for by every drafting sequence whatever each
|
||||
* verifies: at one sequence a long block's extra drafts pay, at many its rows and its weaker first
|
||||
* positions cost more than they bring. The core picks per step (--draft-short-from). */
|
||||
* positions cost more than they bring. The core picks per step (--draft-short-from; by default
|
||||
* a tree's from two decoding sequences on, a chain's never). */
|
||||
/* ---- appended in ABI 27 (a block drafter's short block) */
|
||||
int rad_drafter_short_block(RadBuilder* b, int64_t block);
|
||||
|
||||
@@ -1254,8 +1286,8 @@ int rad_declare_audio_generator(RadBuilder* b, const RadAudioGenDecl* d);
|
||||
*
|
||||
* `enc_kind` (RAD_ENC_*, rad_runtime.h) and `enc_slot`, the media's 1-based number within its kind,
|
||||
* say where the latents go. A latent-upscaled request's keyframes, pinned on the grid its steps
|
||||
* run on, are encoded at W' x H' before the prompt pass and again at W x H, into the same slots,
|
||||
* after the VUPSCALE pass and before the first evaluation at W x H; references, in their own grid,
|
||||
* run on, are encoded at W' x H' before the prompt pass, then again at W x H into the same slots
|
||||
* after the VUPSCALE pass and before the first evaluation at W x H. References, on their own grid,
|
||||
* are encoded once. The media's shape is the plugin's to accept: rad_arch_encode_geom
|
||||
* (below) refuses what the encoders cannot take, and the step's packed sequence with the encoded
|
||||
* media in it is the plugin's rad_arch_video_pack.
|
||||
@@ -1518,6 +1550,14 @@ typedef struct RadArchProbe {
|
||||
* and its kernels read that width. --state-cache-dtype f16 is refused at startup with the
|
||||
* plugin named when this is 0. */
|
||||
int32_t state_f16_ok;
|
||||
|
||||
/* ---- appended in ABI 31 (tree verification) */
|
||||
/* Nonzero when this plugin can grow its block drafter's proposals into a tree
|
||||
* (rad_drafter_tree) and measured its speculative step faster with one. The core then asks for
|
||||
* a tree (RadBuildCtx::draft_tree) wherever that drafter decodes speculatively. Zero keeps the
|
||||
* chain: a plugin that never measured trees asks for none. 64-bit so it starts past the older
|
||||
* struct's tail padding, which a plugin built against it may copy over. */
|
||||
int64_t tree_pays;
|
||||
} RadArchProbe;
|
||||
|
||||
int rad_arch_probe(const RadModelMeta* meta, RadArchProbe* out);
|
||||
|
||||
Reference in new issue
Block a user