Archived
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).
This commit is contained in:
commit
9eaf10da6e
210 files changed
+14363
-2138
No files matched your search
+58
-3
@@ -288,7 +288,7 @@ static const RadOperandSpec oGemmQGated[] = { OPD("a"), OPD("a_scale"), WGT("b"
|
||||
static const RadParamSpec pAttnPaged[] = {
|
||||
P_INT("q_len"), P_INT("head_dim"), P_INT("gqa"), P_INTD("block_size"), P_INT("causal"),
|
||||
P_INT("window"), P_STR("q_dtype"), P_STR("kv_dtype"), P_F64O("scale"), P_INTO("max_ctx"),
|
||||
P_INTO("n_head"), P_INTO("max_seqs")
|
||||
P_INTO("n_head"), P_INTO("max_seqs"), P_INTO("prefill_fp8")
|
||||
};
|
||||
static const RadOperandSpec oAttnPaged[] = {
|
||||
OPD("q"), OPD("kv_cache"), OPD("block_table"), OPD("seqused"),
|
||||
@@ -311,6 +311,14 @@ static const RadParamSpec pAttnNa3d[] = { P_INT("M"), P_INT("head_dim"), P_INT("
|
||||
P_INT("kw"), P_STR("dtype"), P_F64O("scale") };
|
||||
static const RadOperandSpec oAttnNa3d[] = { OPD("q"), OPD("k"), OPD("v"), OPD("geom"), OUT("out") };
|
||||
|
||||
/* The SAM tower's attention: windowed tiles with a decomposed relative-position term, the two tables
|
||||
* weights of [2*L-1, head_dim] (see libref/ref_registry.cpp and docs/OPS.md). */
|
||||
static const RadParamSpec pSamAttn[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head"),
|
||||
P_INT("grid_h"), P_INT("grid_w"), P_INT("window"),
|
||||
P_F64("scale"), P_STR("dtype") };
|
||||
static const RadOperandSpec oSamAttn[] = { OPD("q"), OPD("k"), OPD("v"), OPD("cu_seqlens"),
|
||||
OUT("out"), WGT("rel_pos_h"), WGT("rel_pos_w") };
|
||||
|
||||
static const RadParamSpec pKvStore[] = { P_INT("M"), P_INT("head_dim"), P_INT("n_head_kv"),
|
||||
P_INT("block_size"), P_STR("kv_dtype"),
|
||||
P_F64O("k_scale"), P_F64O("v_scale") };
|
||||
@@ -393,6 +401,26 @@ static const RadParamSpec pScatter[] = { P_INT("M"), P_INT("n_expert"), P_INT(
|
||||
static const RadOperandSpec oScatter[] = { OPD("expert_ids"), OUT("sorted_tok"),
|
||||
OUT("expert_offset"), OUT("expert_count") };
|
||||
|
||||
/* The pair as one op, and the router GEMM in front of it: libref's schemas for the same two rows,
|
||||
* where the operand lists are unions and `expert_ids`/`logits` are named once as outputs. */
|
||||
static const RadParamSpec pRouterTopkScatter[] = { P_INT("M"), P_INT("n_expert"),
|
||||
P_INTO("n_local"), P_INT("top_k"),
|
||||
P_INT("norm"), P_STR("dtype"),
|
||||
P_INTO("expert_base"),
|
||||
P_STRO("protect") };
|
||||
static const RadOperandSpec oRouterTopkScatter[] = { OPD("logits"), OUT("expert_ids"),
|
||||
OUT("expert_w"), OUT("sorted_tok"),
|
||||
OUT("expert_offset"),
|
||||
OUT("expert_count") };
|
||||
static const RadParamSpec pRouterGemmTopkScatter[] = { P_INT("M"), P_INT("K"),
|
||||
P_INT("n_expert"), P_INTO("n_local"),
|
||||
P_INT("top_k"), P_INT("norm"),
|
||||
P_STR("dtype"), P_INTO("expert_base"),
|
||||
P_STRO("protect") };
|
||||
static const RadOperandSpec oRouterGemmTopkScatter[] = {
|
||||
OPD("a"), WGT("b"), WGT_O("gate_b"), OUT("logits"), OUT("expert_ids"), OUT("expert_w"),
|
||||
OUT("sorted_tok"), OUT("expert_offset"), OUT("expert_count"), OUT_O("gate") };
|
||||
|
||||
static const RadParamSpec pMoeGemm[] = { P_INT("M"), P_INT("N"), P_INT("K"), P_INT("n_expert"),
|
||||
P_INT("top_k"), P_STR("a_order"), P_STR("dtype") };
|
||||
static const RadOperandSpec oMoeGemm[] = { OPD("a"), WTAB("w"), OPD("sorted_tok"),
|
||||
@@ -774,6 +802,10 @@ static const RadParamSpec pPenal[] = { P_INT("M"), P_INT("n_vocab"), P_INTO("vo
|
||||
static const RadOperandSpec oPenalties[] = { INOUT("logits"), OPD("params"), OPD("history") };
|
||||
static const RadOperandSpec oDry[] = { INOUT("logits"), OPD("params"), OPD("history"),
|
||||
OPD_O("breakers") };
|
||||
/* `whitelist` is optional, libref's: a bitmask plane a row, a SET bit exempting a token from
|
||||
* the ban. Absent, nothing is exempt. */
|
||||
static const RadOperandSpec oNgramBan[] = { INOUT("logits"), OPD("params"), OPD("history"),
|
||||
OPD("ngram"), OPD_O("whitelist") };
|
||||
static const RadOperandSpec oTemp[] = { INOUT("logits"), OPD("params") };
|
||||
static const RadOperandSpec oMask[] = { INOUT("logits"), OPD("params"), OPD("bitmask") };
|
||||
static const RadParamSpec pTopk[] = { P_INT("M"), P_INT("n_vocab"), P_INTO("vocab_off") };
|
||||
@@ -976,6 +1008,11 @@ static const RadOpSchema kSchemas[] = {
|
||||
"start." },
|
||||
{ "attn_na3d", ARR(pAttnNa3d), ARR(oAttnNa3d),
|
||||
"3-D neighborhood attention over a volume, libref's window and arithmetic." },
|
||||
{ "sam_attn", ARR(pSamAttn), ARR(oSamAttn),
|
||||
"SAM tower attention: per cu segment of grid_h*grid_w rows, pad to multiples of `window` with "
|
||||
"zero rows, tile into window x window windows (window 0 is one tile over the segment) and attend "
|
||||
"each tile to all of its rows. logits = scale*q.k + q.Rh[i_h,j_h] + q.Rw[i_w,j_w] over the head's "
|
||||
"whole head_dim, softmax in f32 with the max subtracted, out = sum p*v, pad rows dropped." },
|
||||
{ "kv_store", ARR(pKvStore), ARR(oKvStore), "scatter k and v into the paged cache." },
|
||||
{ "rope_table", ARR(pRopeTable), ARR(oRopeTable), "cos/sin at each position's own row." },
|
||||
{ "qsa_block_key", ARR(pQsaBlockKey), ARR(oQsaBlockKey),
|
||||
@@ -1004,6 +1041,10 @@ static const RadOpSchema kSchemas[] = {
|
||||
{ "router_sigmoid_topk", ARR(pRouterSigmoid), ARR(oRouterSigmoid),
|
||||
"Single-group sigmoid routing; correction bias selects experts, original scores weight them." },
|
||||
{ "router_topk", ARR(pRouter), ARR(oRouter), "softmax then exact top-k routing." },
|
||||
{ "router_topk_scatter", ARR(pRouterTopkScatter), ARR(oRouterTopkScatter),
|
||||
"the selection and the sort in one op, run as exactly the pair." },
|
||||
{ "router_gemm_topk_scatter", ARR(pRouterGemmTopkScatter), ARR(oRouterGemmTopkScatter),
|
||||
"the router GEMM, the shared expert's gate GEMM and the pair, run as exactly the launches." },
|
||||
{ "moe_scatter", ARR(pScatter), ARR(oScatter),
|
||||
"stable counting sort of routing slots by expert." },
|
||||
{ "moe_gemm", ARR(pMoeGemm), ARR(oMoeGemm), "grouped GEMM over the expert-sorted rows." },
|
||||
@@ -1159,7 +1200,6 @@ static const RadOpSchema kSchemas[] = {
|
||||
{ "s2d3d", ARR(pS2d3d), ARR(oS2d3d),
|
||||
"space to depth over voxel rows, a copy or the mean of each group, libref's." },
|
||||
{ "pix_patch", ARR(pPixPatch), ARR(oPixPatch), "an image to patch rows, libref's copy." },
|
||||
{ "patch_pix8", ARR(pPixPatch), ARR(oPixPatch), "patch rows to RGB bytes, libref's rule." },
|
||||
{ "vol_index", ARR(pVolIndex), ARR(oVolIndex), "a volume's voxel coordinates, libref's." },
|
||||
{ "tile_grid", ARR(pTileGrid), ARR(oTileGrid), "a tiled decode's boxes, libref's cut." },
|
||||
{ "tile_crop", ARR(pTileCrop), ARR(oTileCrop), "a tile out of a volume, libref's copy." },
|
||||
@@ -1220,6 +1260,11 @@ static const RadOpSchema kSchemas[] = {
|
||||
{ "sample_penalties", ARR(pPenal), ARR(oPenalties),
|
||||
"repetition, frequency and presence penalties." },
|
||||
{ "sample_dry", ARR(pPenal), ARR(oDry), "DRY repetition-suffix penalty, once per token." },
|
||||
{ "sample_ngram_ban", ARR(pPenal), ARR(oNgramBan),
|
||||
"the windowed no-repeat-ngram ban: every token completing an n-gram the last `window` tokens of "
|
||||
"the row's history contain is set to -infinity. `ngram` is an i32 {n, window} pair a row; n 0 "
|
||||
"is off. The optional `whitelist` bitmask exempts a token whose column bit is set; absent, "
|
||||
"nothing is exempt." },
|
||||
{ "sample_temp", ARR(pMVocab), ARR(oTemp), "per-request temperature." },
|
||||
{ "sample_topk", ARR(pTopk), ARR(oTopk), "exact top-k candidate set, descending, ties to the "
|
||||
"lower id." },
|
||||
@@ -1532,6 +1577,9 @@ SIMPLE("avx_attn_cross", "attn_cross", "attn",
|
||||
L(attn_cross)),
|
||||
SIMPLE("avx_attn_na3d", "attn_na3d", "attn", "3-D neighborhood attention over a volume", DT_FLOAT,
|
||||
L(attn_na3d)),
|
||||
SIMPLE("avx_sam_attn", "sam_attn", "attn",
|
||||
"SAM tower attention: windowed tiles with decomposed relative position", DT_FLOAT,
|
||||
L(sam_attn)),
|
||||
ROW("avx_kv_store", "kv_store", "attn", "scatter k and v into the paged cache", DT_ANY,
|
||||
cPagedBlock, (int)(sizeof(cPagedBlock) / sizeof(cPagedBlock[0])), L(kv_store)),
|
||||
SIMPLE("avx_rope", "rope", "attn", "rotary embedding in place", DT_FLOAT, L(rope)),
|
||||
@@ -1557,6 +1605,12 @@ SIMPLE("avx_router_topk", "router_topk", "moe", "softmax then exact top-k routin
|
||||
L(router_topk)),
|
||||
SIMPLE("avx_router_sigmoid_topk", "router_sigmoid_topk", "moe", "sigmoid correction-bias routing", DT_FLOAT,
|
||||
L(router_sigmoid_topk)),
|
||||
SIMPLE("avx_router_topk_scatter", "router_topk_scatter", "moe",
|
||||
"the selection and the sort in one op, run as exactly the pair", DT_FLOAT,
|
||||
L(router_topk_scatter)),
|
||||
SIMPLE("avx_router_gemm_topk_scatter", "router_gemm_topk_scatter", "moe",
|
||||
"the router GEMM, the shared expert's gate GEMM and the pair, run as exactly the launches",
|
||||
DT_FLOAT, L(router_gemm_topk_scatter)),
|
||||
SIMPLE("avx_moe_scatter", "moe_scatter", "moe", "stable counting sort of routing slots by expert",
|
||||
"i32 indices", L(moe_scatter)),
|
||||
SIMPLE("avx_moe_gemm", "moe_gemm", "moe", "grouped GEMM over the expert-sorted rows", DT_FLOAT,
|
||||
@@ -1700,7 +1754,6 @@ SIMPLE("avx_pixel_norm", "pixel_norm", "norm", "an RMS norm as bf16 tensors comp
|
||||
SIMPLE("avx_d2s3d", "d2s3d", "elem", "depth to space over voxel rows", DT_FLOAT, L(d2s3d)),
|
||||
SIMPLE("avx_s2d3d", "s2d3d", "elem", "space to depth over voxel rows", DT_FLOAT, L(s2d3d)),
|
||||
SIMPLE("avx_pix_patch", "pix_patch", "elem", "an image to patch rows", DT_FLOAT, L(pix_patch)),
|
||||
SIMPLE("avx_patch_pix8", "patch_pix8", "elem", "patch rows to RGB bytes", DT_FLOAT, L(patch_pix8)),
|
||||
SIMPLE("avx_vol_index", "vol_index", "elem", "a volume's voxel coordinates", DT_ANY, L(vol_index)),
|
||||
SIMPLE("avx_tile_grid", "tile_grid", "elem", "a tiled decode's boxes", DT_ANY, L(tile_grid)),
|
||||
SIMPLE("avx_tile_crop", "tile_crop", "elem", "a tile out of a volume", DT_FLOAT, L(tile_crop)),
|
||||
@@ -1768,6 +1821,8 @@ SIMPLE("avx_sample_penalties", "sample_penalties", "sample",
|
||||
"repetition, frequency and presence penalties", DT_FLOAT, L(sample_penalties)),
|
||||
SIMPLE("avx_sample_dry", "sample_dry", "sample", "DRY repetition-suffix penalty", DT_FLOAT,
|
||||
L(sample_dry)),
|
||||
SIMPLE("avx_sample_ngram_ban", "sample_ngram_ban", "sample", "windowed no-repeat-ngram ban",
|
||||
DT_FLOAT, L(sample_ngram_ban)),
|
||||
SIMPLE("avx_sample_temp", "sample_temp", "sample", "per-request temperature", DT_FLOAT,
|
||||
L(sample_temp)),
|
||||
SIMPLE("avx_sample_topk", "sample_topk", "sample", "exact top-k candidate set", DT_FLOAT,
|
||||
|
||||
Reference in new issue
Block a user