Archived
radiance 2.1.0
New models. Recursive Flint (39.8B, about 2.5B active) by everplays (#422): `arch/flint`, as an IQ8R container with rotated int8 experts or a four-bit one, with a sink-aware WMMA prefill attention and the fused attention prologue at `rotary_dim` 0. Meta Muse Glimmer 30B by launch80_assets (#423): bf16, an int4 trunk or IQ8R, its windowed vision tower, its DFlash drafter, the ATEM tool dialect and context extension. Ling-3.0-tiny by RikshaDriver (#441): served from its GGUF releases or as IQ8R on `bailing_hybrid`, with six more libr3d kernels. Block FP8, MXFP4 and NVFP4 conversions of the three are not served. IQ8R containers of all three (round to nearest, no calibration) are on Hugging Face under StillDeadcode: flint-iq8r, muse-glimmer-30b-iq8r-dflash and ling-3.0-tiny-iq8r. They were checked for sane answers on two R9700; nothing was benchmarked, and Muse Glimmer's pictures, video and tool calls were not tried. Speech. Breeze-TTS-2 clones a voice from a reference recording and its transcript, with an optional delivery direction, by farcryjohn (#436). The published Breeze container needs converting again with the updated recipe before it can. Tools. A model entry with `diagnose: DIR` runs a fixed workload on the engine instead of serving and writes a report: step times, tokens a step, draft acceptance, TTFT and prefill rates by category, concurrency and prompt length, and with `diagnose-baseline` a token-for-token comparison against an earlier report (docs/DIAGNOSE.md), by Code000 (#418). Scheduler. `mixed-step-target-ms` holds a mixed prefill and decode step to a service time, off by default, by tnhnyzc (#413). `scheduler.stuck-exit` (60s by default, 0 never) ends the process when the device has advanced nothing for that long, so a restart policy brings a hung server back (#409, #415, #428). Fixed. Draft trees with the int8 KV cache, which stopped Gemma 4 31B with DFlash2 on its first request (#454, diagnosed by aelfwyne). The expert loan held at zero by a few leftover cache blocks after long sessions (#455, diagnosed by thekk1). The mapped tier's pages kept in the page cache across a load and a restore, by C_Tamas (#421). Replayed tool calls with blank arguments, and arguments that are not JSON refused naming the call, by dschmitz (#444). The dashboard's card temperature reads the junction sensor, by dschmitz (#453). The VRAM shortfall report says what the KL mode needs, by baKon (#448). The out-of-tree plugin test builds its plugins in parallel and takes its toolchain from the tree. Plugin ABI 40: out-of-tree plugins need to be rebuilt. Thanks to @everplays, @launch80_assets, @RikshaDriver, @farcryjohn, @Code000, @tnhnyzc, @C_Tamas, @dschmitz, @baKon, @aelfwyne and @thekk1.
This commit is contained in:
1 parent
ddcb9c69bb
commit
2a2b756371
166 files changed
+20749
-327
No files matched your search
@@ -277,6 +277,27 @@ int r3d_shape_kv_store(const RadParam* p, int n_p, int operand, RadOpdDesc* out)
|
||||
|
||||
/* x[r] = wte[ids[r] - vocab_offset]. Ids are global, so the draw's bound is `vocab_offset + n_vocab`:
|
||||
* under a shard the draw crosses the slice boundary and exercises the zero-row path. */
|
||||
/* The KDA recurrence (r3d_kda_update.hip). The state cache's slot axis is the step's candidate
|
||||
* count plus one, and `state_idx` draws inside it, uniquely per sequence. */
|
||||
int r3d_shape_kda_update(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const char* form = gs(p, n_p, "state_form");
|
||||
if (form && !std::strcmp(form, "anchor")) return RAD_E_UNSUPPORTED;
|
||||
const int64_t M = gi(p, n_p, "M", 0), H = gi(p, n_p, "heads", 0);
|
||||
const int64_t K = gi(p, n_p, "head_k", 0), V = gi(p, n_p, "head_v", 0);
|
||||
const uint32_t D = act_dt(p, n_p);
|
||||
const char* mode = gs(p, n_p, "mode");
|
||||
const int64_t history = (mode && !std::strcmp(mode, "verify")) ? M : 1;
|
||||
const RadOpdDesc l[] = {
|
||||
opd(D, M, H, K), opd(D, M, H, K), opd(D, M, H, V), opd(D, M, H, K), opd(D, M, H),
|
||||
opd((uint32_t)RAD_F32, H), opd((uint32_t)RAD_F32, H * K),
|
||||
opd((uint32_t)RAD_F32, history + 1, H, V, K),
|
||||
opd_idx(1, history + 1, -1, RAD_OPD_F_IDX_UNIQUE, history),
|
||||
opd_idx(2, M, -1, RAD_OPD_F_IDX_CU),
|
||||
opd_idx(1, 0, 1), opd_idx(1, 0, 1), opd(D, M, H, V),
|
||||
};
|
||||
R3D_PICK(l);
|
||||
}
|
||||
|
||||
int r3d_shape_embed_lookup(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0);
|
||||
const int64_t ne = gi(p, n_p, "n_embd", 0);
|
||||
@@ -504,6 +525,15 @@ int r3d_shape_gemm_nt(const RadParam* p, int n_p, int operand, RadOpdDesc* out)
|
||||
const RadOpdDesc list[] = { opd(D, M, K), opd(D, N, K), opd(D, M, N) }; /* a, b, y */
|
||||
R3D_PICK(list);
|
||||
}
|
||||
/* y[M,N] = a[M,K] @ b[N,K]^T with an F32 weight and output: the router's logits and the index
|
||||
* gates, the row's own dtype. */
|
||||
int r3d_shape_gemm_nt_f32(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0), N = gi(p, n_p, "N", 0), K = gi(p, n_p, "K", 0);
|
||||
const RadOpdDesc list[] = { opd((uint32_t)RAD_BF16, M, K), opd((uint32_t)RAD_F32, N, K),
|
||||
opd((uint32_t)RAD_F32, M, N) }; /* a, b, y */
|
||||
R3D_PICK(list);
|
||||
}
|
||||
|
||||
|
||||
/* The vocabulary projection, transcribed from ref_logits_gemm_shape: x [M, n_embd] and the head
|
||||
* [n_vocab, n_embd] in the activation's dtype, logits in f32 because every sampler stage reads
|
||||
@@ -708,6 +738,42 @@ int r3d_shape_attn_paged(const RadParam* p, int n_p, int operand, RadOpdDesc* ou
|
||||
};
|
||||
R3D_PICK(list);
|
||||
}
|
||||
/* The absorbed MLA projection (r3d_mla_project.hip): a[M, heads, head_dim|latent] against the
|
||||
* shared [heads, 2*head_dim, latent] weight, absorb or expand. */
|
||||
int r3d_shape_mla_project(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0), h = gi(p, n_p, "heads", 0), d = gi(p, n_p, "head_dim", 0),
|
||||
l = gi(p, n_p, "latent_dim", 0);
|
||||
const char* mode = gs(p, n_p, "mode");
|
||||
const bool absorb = mode && !std::strcmp(mode, "absorb"),
|
||||
expand = mode && !std::strcmp(mode, "expand");
|
||||
if (!absorb && !expand) return RAD_E_UNSUPPORTED;
|
||||
const RadOpdDesc list[] = { opd((uint32_t)RAD_BF16, M, h, absorb ? d : l),
|
||||
opd((uint32_t)RAD_BF16, h * 2 * d, l),
|
||||
opd((uint32_t)RAD_BF16, M, h, absorb ? l : d) };
|
||||
R3D_PICK(list);
|
||||
}
|
||||
|
||||
/* The paged latent attention (r3d_mla_attn_paged.hip): the cache row is the latent then the
|
||||
* rotated key part; `block_table` draws its page indices, `seqused` the context so far, and
|
||||
* `cu_seqlens` the [0, M+1] cumulative form. */
|
||||
int r3d_shape_mla_attn_paged(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0), h = gi(p, n_p, "heads", 0), L = gi(p, n_p, "latent_dim", 0),
|
||||
R = gi(p, n_p, "rope_dim", 0), bs = gi(p, n_p, "block_size", 0);
|
||||
if (M <= 0 || h <= 0 || L <= 0 || R <= 0 || bs <= 0) return RAD_E_UNSUPPORTED;
|
||||
int64_t ctx = gi(p, n_p, "ctx", 0);
|
||||
if (ctx < M) ctx = M;
|
||||
const int64_t blocks = (ctx + bs - 1) / bs;
|
||||
const RadOpdDesc list[] = { opd((uint32_t)RAD_BF16, M, h, L),
|
||||
opd((uint32_t)RAD_BF16, M, h, R),
|
||||
opd((uint32_t)RAD_BF16, blocks, 1, bs, L + R),
|
||||
opd_idx(1, blocks, -1, 0, blocks),
|
||||
opd_idx(1, 0, ctx),
|
||||
opd_idx(2, M + 1, -1, (uint32_t)RAD_OPD_F_IDX_CU),
|
||||
opd_none(),
|
||||
opd((uint32_t)RAD_BF16, M, h, L) };
|
||||
R3D_PICK(list);
|
||||
}
|
||||
|
||||
|
||||
/* Exact per-row top-R. `pairs` packs an int32 id's bits in the first slot beside its value, in an
|
||||
* f32 plane. */
|
||||
@@ -721,6 +787,22 @@ int r3d_shape_row_topk(const RadParam* p, int n_p, int operand, RadOpdDesc* out)
|
||||
}; /* x, idx, val, pairs */
|
||||
R3D_PICK(list);
|
||||
}
|
||||
/* Group-limited sigmoid routing: the group form of router_sigmoid_topk. The geometry's bounds are
|
||||
* the shim's: `n_expert` 1..512, `n_group` 1..32 dividing the experts by at least two,
|
||||
* `topk_group` a group count, `top_k` inside the kept groups' experts. f32 operands, as the row's
|
||||
* constraints; `ids` is drawn over `n_expert`. (libr4d's r4d_shape_router_sigmoid_group_topk.) */
|
||||
int r3d_shape_router_sigmoid_group_topk(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0), ne = gi(p, n_p, "n_expert", 0), k = gi(p, n_p, "top_k", 0);
|
||||
const int64_t ng = gi(p, n_p, "n_group", 0), kg = gi(p, n_p, "topk_group", 0);
|
||||
if (ne <= 0 || ne > 512 || k <= 0 || ng <= 0 || ng > 32 || ne % ng || ne / ng < 2 || kg <= 0 ||
|
||||
kg > ng || k > kg * (ne / ng))
|
||||
return RAD_E_UNSUPPORTED;
|
||||
const uint32_t D = act_dt(p, n_p);
|
||||
const RadOpdDesc list[] = { opd(D, M, ne), opd((uint32_t)RAD_F32, ne),
|
||||
opd_idx(M, ne, -1, 0, k), opd(D, M, k) };
|
||||
R3D_PICK(list);
|
||||
}
|
||||
|
||||
|
||||
int r3d_shape_sample_argmax(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
int64_t M = 0, nv = 0;
|
||||
|
||||
Reference in new issue
Block a user