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
+54
-1
@@ -71,7 +71,8 @@ struct RecMap {
|
||||
std::vector<std::string> src;
|
||||
int concat_dim = 0;
|
||||
};
|
||||
struct RecKV { std::string name; RadKVGroupDecl d{}; bool zero = false; bool replicated = false; };
|
||||
struct RecKV { std::string name; RadKVGroupDecl d{}; bool zero = false; bool replicated = false;
|
||||
bool dense = false; };
|
||||
struct RecIssue {
|
||||
rad_op op = 0;
|
||||
std::vector<RadOperand> opd;
|
||||
@@ -147,6 +148,11 @@ struct RadBuilder {
|
||||
const RecOp* op_of(rad_op h) const { return h ? &ops[h - 1] : nullptr; }
|
||||
};
|
||||
|
||||
struct StageRec {
|
||||
size_t issue = 0; /* the issue count when the stage copy was issued */
|
||||
int layer = -1;
|
||||
};
|
||||
|
||||
struct RadCtx {
|
||||
RadBuilder* b = nullptr;
|
||||
const RadBatch* batch = nullptr;
|
||||
@@ -160,6 +166,13 @@ struct RadCtx {
|
||||
/* Device copies into a buffer (rad_memcpy_async to a rad_buf_ptr address): the buffer and the
|
||||
* issue number the copy came before. The step lint counts each as a write there. */
|
||||
std::vector<std::pair<size_t, rad_buf>> copies;
|
||||
/* The prefill-stage test: a stage call is recorded at the current issue index so the test can
|
||||
* assert it sits between the layer's store and its attention. */
|
||||
bool stage_on = false;
|
||||
int stage_last = -1;
|
||||
std::vector<StageRec> stages;
|
||||
/* kv_stage_next: after which issue index the next layer's copy was handed over. */
|
||||
std::vector<StageRec> stages_next;
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------------- the declare-side ABI */
|
||||
@@ -237,6 +250,14 @@ extern "C" rad_kvgroup rad_decl_kv_group(RadBuilder* b, const char* name,
|
||||
|
||||
extern "C" int64_t rad_kv_block_size(RadBuilder* b, rad_kvgroup g) { (void)g; return b->kv_block; }
|
||||
|
||||
extern "C" int64_t rad_kv_layer_bytes(RadBuilder* b, rad_kvgroup g) {
|
||||
if (!b || !g || g > b->kv_groups.size()) return 0;
|
||||
const RadKVGroupDecl& d = b->kv_groups[g - 1].d;
|
||||
if (d.kind != RAD_KV_FULL && d.kind != RAD_KV_WINDOW) return 0;
|
||||
const int64_t nh = d.n_head_kv > 0 ? d.n_head_kv : 1;
|
||||
return rad_dtype_bytes(d.dtype, 2 * b->kv_block * nh * d.head_dim);
|
||||
}
|
||||
|
||||
extern "C" int rad_bind_layer_kv(RadBuilder* b, int layer, rad_kvgroup g) {
|
||||
b->binds.push_back({layer, g});
|
||||
return RAD_OK;
|
||||
@@ -346,6 +367,15 @@ extern "C" int rad_kv_group_zero(RadBuilder* b, rad_kvgroup g) {
|
||||
b->kv_groups[g - 1].zero = true;
|
||||
return RAD_OK;
|
||||
}
|
||||
/* Recorded like zero, and like the real builder refused on a non-full group. Not part of
|
||||
* graph_hash(): the flag changes how much of the group the carve funds, not the graph, so the
|
||||
* pinned graphs stand. */
|
||||
extern "C" int rad_kv_group_dense_read(RadBuilder* b, rad_kvgroup g) {
|
||||
if (!b || g == 0 || g > b->kv_groups.size()) return RAD_E_INVAL;
|
||||
if (b->kv_groups[g - 1].d.kind != RAD_KV_FULL) return RAD_E_INVAL;
|
||||
b->kv_groups[g - 1].dense = true;
|
||||
return RAD_OK;
|
||||
}
|
||||
/* Recorded like zero, and like the real builder refused on a zero or unpaged group. Not part of
|
||||
* graph_hash(): the flag changes what a host tier slot holds, not the graph, so the pinned
|
||||
* graphs stand. */
|
||||
@@ -435,6 +465,29 @@ extern "C" int rad_lane_join(RadCtx* c, int from, int to) {
|
||||
c->joins.push_back({ c->issues.size(), from, to });
|
||||
return RAD_OK;
|
||||
}
|
||||
/* No pool binding here, so a layer is at the index it names: the arch test uses layer 0 where it
|
||||
* checks the mirror offset. */
|
||||
extern "C" int rad_kv_layer_index(RadCtx* c, rad_kvgroup g, int layer) {
|
||||
(void)c; (void)g;
|
||||
return layer;
|
||||
}
|
||||
/* The prefill stage: no device here, so record the first call for a layer at its place in the
|
||||
* issue stream, which is before the layer's store. Off unless a test selects the stage view. */
|
||||
extern "C" int rad_kv_stage_layer(RadCtx* c, rad_kvgroup g, const RadKVGroupBatch* kvb, int layer) {
|
||||
(void)g;
|
||||
if (!c || !kvb || !kvb->stream || !c->stage_on) return 0;
|
||||
if (layer == c->stage_last) return 1;
|
||||
c->stage_last = layer;
|
||||
c->stages.push_back(StageRec{ c->issues.size(), layer });
|
||||
return 1;
|
||||
}
|
||||
/* The next layer's copy is handed to the DMA engine after this layer's attention. */
|
||||
extern "C" int rad_kv_stage_next(RadCtx* c, rad_kvgroup g, int layer) {
|
||||
(void)g;
|
||||
if (!c || !c->stage_on) return 0;
|
||||
c->stages_next.push_back(StageRec{ c->issues.size(), layer });
|
||||
return 0;
|
||||
}
|
||||
/* A block that refuses the batch records the reason for the tests. */
|
||||
extern "C" int rad_step_fail(RadCtx* c, const char* what) {
|
||||
c->step_fail = what ? what : "";
|
||||
|
||||
Reference in new issue
Block a user