Archived
radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves every shipped container - Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime - /v1/messages works with Claude Code as it ships (gearwave00001) - a long agent conversation keeps its cached history when the client rewrites its last turn (manueloverride) - a stream's first event goes out with the first token, so llama-benchy measures prefill right - opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42) - four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b) - NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA adapters (baKon) - many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool arguments and the CPU's vision and audio encoders - plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
This commit is contained in:
1 parent
b068190326
commit
1e968f6e1d
739 files changed
+128447
-84632
No files matched your search
+10
-12
@@ -2,10 +2,9 @@
|
||||
*
|
||||
* rmsnorm -> gate_up gemm -> silu_mul -> down gemm -> [all_reduce] -> residual add
|
||||
*
|
||||
* gate and up are one weight and one GEMM. That is a convert-time fusion the plugin owns (spec
|
||||
* §2.4): the container ships ffn_gate.weight and ffn_up.weight, the map concatenates them along
|
||||
* dim 0, and silu_mul splits [M, 2n] back into gate times up. It buys one GEMM launch instead of
|
||||
* two and one movement unit instead of two.
|
||||
* gate and up are fused into one weight at convert time (spec §2.4): the map concatenates the
|
||||
* checkpoint's gate and up along dim 0 and silu_mul splits [M, 2n] back into gate * up. One GEMM
|
||||
* launch and one movement unit instead of two.
|
||||
*/
|
||||
#ifndef RAD_BLOCK_MLP_H
|
||||
#define RAD_BLOCK_MLP_H
|
||||
@@ -23,9 +22,9 @@ struct MlpBF16 {
|
||||
rad_buf ffn = 0; /* [max_tok, n_ff] */
|
||||
};
|
||||
|
||||
/* Checkpoint-side names for one layer. The plugin owns the spelling because it is the only
|
||||
* component that knows both sides of the map (spec §2.4), and one architecture arrives as
|
||||
* `model.language_model.layers.N.mlp.*` and another as `blk.N.ffn_*`. */
|
||||
/* Checkpoint-side names for one layer. The plugin supplies them because only it knows both
|
||||
* sides of the map (spec §2.4); spellings differ per checkpoint (`...layers.N.mlp.*`,
|
||||
* `blk.N.ffn_*`). */
|
||||
struct Src {
|
||||
const char* norm = nullptr; /* post_attention_layernorm.weight */
|
||||
const char* gate = nullptr;
|
||||
@@ -84,8 +83,8 @@ inline int MlpBF16::declare(RadBuilder* b, Names& nm, const Geom& geom, int l, c
|
||||
RAD_WEIGHTS(w_down)),
|
||||
{w.ffn}, {w.h});
|
||||
|
||||
/* Column-sharded down projection: every rank holds a partial sum. Emitted here, by the
|
||||
* plugin, so the graph dump shows it here (spec §9). */
|
||||
/* Column-sharded down projection leaves a partial sum on every rank. The plugin emits the
|
||||
* reduction so the graph dump shows it (spec §9). */
|
||||
if (g.world > 1)
|
||||
op_ar = rw(b, RAD_OP(b, "all_reduce",
|
||||
RAD_PARAMS(RAD_INT("world_size", g.world),
|
||||
@@ -105,9 +104,8 @@ inline int MlpBF16::declare(RadBuilder* b, Names& nm, const Geom& geom, int l, c
|
||||
}
|
||||
|
||||
inline void MlpBF16::step(RadCtx* c, const RadBatch* batch) const {
|
||||
/* Every operand carries the STEP's row count and not the buffer's: a kernel reads its extents
|
||||
* off the operands, because a ranged parameter has been collapsed to a band by the time issue
|
||||
* runs (arch/common/rad_arch.h, libref/ref_ops.h). */
|
||||
/* Operands carry the step's row count, not the buffer's: kernels read extents from the
|
||||
* operands because a ranged parameter is collapsed to a band before issue (rad_arch.h). */
|
||||
const int64_t T = batch->n_tok;
|
||||
RAD_ISSUE(c, op_norm, brows(w.x, T), RAD_W(w_norm), brows(w.h, T));
|
||||
RAD_ISSUE(c, op_gate_up, brows(w.h, T), RAD_W(w_gate_up), brows(w.gate_up, T));
|
||||
|
||||
Reference in new issue
Block a user