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
@@ -1,16 +1,14 @@
|
||||
/* r4d_expert_scale_bf16.hip -- expert_scale: each routing weight times its expert's own scale, in place.
|
||||
*
|
||||
* Gemma 4's router renormalises its top-k and then multiplies each weight by per_expert_scale of
|
||||
* the expert it chose. Said in the conventional vocabulary that is two launches a MoE layer -- an
|
||||
* `embed_lookup` of the [n_expert, 1] scale table by the expert ids, then a `mul` into the weights
|
||||
* -- each a few dozen elements behind a full dispatch at decode. This is the pair as one:
|
||||
* Gemma 4's router renormalises its top-k, then multiplies each weight by its expert's
|
||||
* per_expert_scale. Unfused that is two launches per MoE layer (`embed_lookup` of the [n_expert, 1]
|
||||
* scale table by expert id, then `mul`), each a few dozen elements at decode. Fused:
|
||||
*
|
||||
* ew[t, k] = bf16( ew[t, k] * scale[ids[t, k]] )
|
||||
*
|
||||
* THE CHAIN'S VALUE, BIT FOR BIT: the lookup copies a bf16 scale and the multiply is one f32
|
||||
* product rounded once to nearest even, which is all this does. An id outside the table reads a
|
||||
* zero scale, as embed_lookup writes a zero row for an id it does not hold, and the product's sign
|
||||
* survives it the same way. One thread an element; a decode step is a handful of rows.
|
||||
* Bit-identical to the pair: one f32 product of two bf16 values, rounded once to nearest even. An
|
||||
* id outside the table reads a zero scale, as embed_lookup writes a zero row, so the product's
|
||||
* sign matches too. One thread per element.
|
||||
*/
|
||||
#include <hip/hip_runtime.h>
|
||||
|
||||
|
||||
Reference in new issue
Block a user