Archived
radiance 1.2.1
- A checkpoint restore that found its snapshot slot given back stopped the engine (#33): a snapshot handed to an admission is now kept until its step has run, a lost one re-prefills that request instead, and a failed restore names the check and the rank. - The headroom warning had no fixed point (#32): it now checks the room left for a kernel's first launch and names the --gpu-headroom-mib value that clears it. - reasoning_effort (#31): the levels the chat template takes are probed at startup and published in /server_info; a level outside them is a 400 on `reasoning_effort` with `supported`; --reasoning-effort-map rewrites a client's level. - rad-convert reads published quantised releases (#29): AMD Quark MXFP4 byte for byte, and AutoRound (auto_round:auto_gptq) / GPTQ int4 and int8, with Flash-Next checkpoints that ship their experts one by one. - tool_choice "required" and a named function are served by a call grammar for the whole reply.
This commit is contained in:
1 parent
e95d397288
commit
d23c3e0d17
37 files changed
+1595
-147
No files matched your search
@@ -506,6 +506,31 @@ inline int MoeFP8::format_of(const RadEncoding& e) {
|
||||
return RAD_E_DTYPE;
|
||||
}
|
||||
|
||||
/* WHETHER A CHECKPOINT SHIPS ONE LAYER'S EXPERTS STACKED OR ONE BY ONE, as the Src it fills.
|
||||
* Recent releases stack them -- `<prefix>.gate_up_proj` and `<prefix>.down_proj` -- and a
|
||||
* quantised export (AutoRound's) writes each expert on its own, `<prefix>.<e>.{gate,up,down}_proj`.
|
||||
* Each form is asked of the checkpoint through a probe name mapped to its first expert, which the
|
||||
* checkpoint answers or does not. Stacked is the answer when neither is found: a container is
|
||||
* read by declared name, the same under both maps, so it asks nothing here. `tag` keeps one
|
||||
* caller's probe name apart from another's for the same layer. */
|
||||
inline int moe_expert_sources(RadBuilder* b, Names& nm, const char* tag, const char* prefix,
|
||||
MoeFP8::Src* src) {
|
||||
const char* gu = nm.ckpt("%s.gate_up_proj", prefix);
|
||||
const char* probe = nm.f("probe.%s.%s.0", tag, prefix);
|
||||
RadEncoding e{};
|
||||
RAD_ARCH_TRY(map_concat(b, probe, { nm.ckpt("%s.0.gate_proj.weight", prefix),
|
||||
nm.ckpt("%s.0.up_proj.weight", prefix) }));
|
||||
if (weight_enc(b, probe, &e)) {
|
||||
src->experts = nm.ckpt("%s", prefix);
|
||||
src->experts_gate_up = src->experts_down = nullptr;
|
||||
} else {
|
||||
src->experts = nullptr;
|
||||
src->experts_gate_up = gu;
|
||||
src->experts_down = nm.ckpt("%s.down_proj", prefix);
|
||||
}
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
/* The gate_up and down name maps of one expert: a dim-0 slice of the stacked tensors, or the
|
||||
* checkpoint's per-expert gate and up joined along rows. `gate_up` false maps down alone. */
|
||||
inline int moe_map_expert(RadBuilder* b, Names& nm, const MoeFP8::Src& src, const char* guw,
|
||||
|
||||
Reference in new issue
Block a user