radiance 2.0.0

Radiance becomes a multi-model engine: one process serves several models behind one port, loads
each when a request names it, parks it in host memory or restores it from its container, and
shares the cards between them (docs/MULTIMODEL.md). The configuration is one YAML file; the
command line flags are gone (`radiance --config FILE`, hot reload on SIGHUP).

Formats. IQ8R (rotated int8) and IQR-V4 replace FP8 and MXFP4 as whole-model formats, with an
int8 KV cache (`kv-cache-dtype: i8`) in place of the fp8 one. Containers whose weights are block
FP8, MXFP4, M2XFP4, NVFP4 or ParoQuant are refused at startup by the name of the first such
weight. Not served until they have int8 containers: GLM-5.3-Flash, Ornith-1.5, Sage-A1.5,
Nemotron-3.5-Bolt-74B, Ling-3.0-flash, drama-3 and Anima's FP8 container; Nemotron-3.5-Bolt-E4B,
the Gemma 4 31B DFlash containers and MiniCPM5-2B bf16 serve without their drafter. 1.17.0
serves all of them.

Speed. Chained launches for Qwen3.8-27B, Gemma 4, Gemma 3 and the small bf16 models, a new
Qwen3.8-Flash-Next container (IQR-V4 experts, int8 trunk) with its decode step and prefill
reworked, and a reworked adaptive draft window.

Deployment. deploy/compose has two fleet files, tp1.yaml and tp2.yaml, each with its
configuration beside it, in place of the per-model files. `host-pool-mib` is a model's host pool
in all, split among its ranks. The dashboard is rebuilt: an hour of history kept by the server,
each accelerator's memory by model, model states over time.

Merged since 1.17.0: Nemotron-3.5-Bolt-74B-A9B by keptn42 (#339); GLM-5.3-Flash on four cards by
AnimusNull (#397); chained launches for Flash-Next's decode step (#396) and preempted requests
keeping their prefix and place (#405) by mici81; --prefill-interleave auto by Code000 (#410);
eight more libr3d kernels and the w4a4 reference by RikshaDriver (#403, #407, #408); libr3d
large-BAR and E4M3 decode fixes by neuromanMD (#438, #439); int4/int5 decode tiles by Kezi
(#426); attention for Nanbeige 4.3 33B by everplays (#417); expert_stats_report.py by baKon
(#431). Fixed: #398, #402, #419, #437 (dschmitz's patch); added the metrics of #392, and
multi-model serving as asked for in #367 and #109.

Plugin ABI 39: out-of-tree plugins need to be rebuilt.

Thanks to @keptn42, @AnimusNull, @mici81, @Code000, @RikshaDriver, @neuromanMD, @Kezi, @everplays, @baKon and @dschmitz.
This commit is contained in:
Deadcode committed 2026-11-14 22:32:28 +01:00
1 parent b4c04b6042
commit ddcb9c69bb
696 files changed
+120770 -56596

No files matched your search

+42 -3
View File
@@ -79,7 +79,23 @@ static int resolve(Config& cfg, const std::vector<VramFacts>& per_rank, VramBudg
/* --gpu-memory-mib is the inverse of --gpu-headroom-mib: N + headroom = the card, in MiB.
* Convert once the smallest rank capacity is known. A device that reports no capacity has
* nothing to claim, so the flag does not apply. */
if (b.capacity > 0 && cfg.gpu_memory_mib > 0) {
/* A model in a fleet of several (docs/MULTIMODEL.md §6.3) is granted its part of each card by
* the fleet, which keeps the headroom and knows what the other models hold. The grant is the
* card as far as this split is concerned: nothing in it is already held, and no headroom comes
* out of it. It must be free now; the fleet made room before granting it. */
const bool claimed = b.capacity > 0 && cfg.vram_claim > 0;
if (claimed) {
if (cfg.vram_claim > freeb) {
b.report = fmt("the fleet granted %s of the card, but only %s is free",
humanb(cfg.vram_claim).c_str(), humanb(freeb).c_str());
if (log) RAD_ERR("%s", b.report.c_str());
if (out) *out = b;
return RAD_E_NOMEM;
}
b.capacity = cfg.vram_claim;
freeb = cfg.vram_claim;
}
if (!claimed && b.capacity > 0 && cfg.gpu_memory_mib > 0) {
const int64_t cap_mib = b.capacity / kMiB;
if (cfg.gpu_memory_mib > cap_mib) {
b.report = fmt("--gpu-memory-mib %lld is above this card's %lld MiB",
@@ -91,10 +107,10 @@ static int resolve(Config& cfg, const std::vector<VramFacts>& per_rank, VramBudg
cfg.gpu_headroom_mib = cap_mib - cfg.gpu_memory_mib;
cfg.given["--gpu-headroom-mib"] = "derived from --gpu-memory-mib";
}
b.headroom = std::max<int64_t>(cfg.gpu_headroom_mib, 0) * kMiB;
b.headroom = claimed ? 0 : std::max<int64_t>(cfg.gpu_headroom_mib, 0) * kMiB;
int64_t host_reserve = 0;
for (const VramFacts& f : per_rank) host_reserve = std::max(host_reserve, f.host_reserve);
const bool shared = host_reserve > b.headroom;
const bool shared = !claimed && host_reserve > b.headroom;
if (shared) b.headroom = host_reserve;
/* A device that reports no capacity has nothing to split, and inventing one is the inference
@@ -427,4 +443,27 @@ RankSplit vram_budget_rank_split(int64_t common_weights_mib, int64_t common_kv_m
return s;
}
/* What a fleet grants against (docs/MULTIMODEL.md §6.3): the same fixed terms resolve() charges,
* plus the floor or the ceiling of the two elastic shares. */
void vram_budget_need(const std::vector<VramFacts>& per_rank, int64_t* need, int64_t* want) {
int64_t arena = 0, staging = 0, prefetch = 0, queues = 0, statics = 0, floor = 0, kv_one = 0,
experts = 0, kv_ceiling = 0, host_pinned = 0;
for (const VramFacts& f : per_rank) {
arena = std::max(arena, f.arena);
staging = std::max(staging, f.staging);
prefetch = std::max(prefetch, f.prefetch);
queues = std::max(queues, (int64_t)f.n_queues * f.queue_bytes);
statics = std::max(statics, f.statics);
floor = std::max(floor, f.expert_floor);
kv_one = std::max(kv_one, f.kv_one);
experts = std::max(experts, f.experts);
kv_ceiling = std::max(kv_ceiling, f.kv_ceiling);
if (f.unified) host_pinned = std::max(host_pinned, f.host_pinned);
}
const int64_t fixed = kDriverDrift + arena + staging + prefetch + queues + host_pinned + statics;
/* MiB of rounding on each pool, as resolve() rounds them up out of the claim. */
*need = fixed + std::min(floor, experts) + kv_one + 2 * kMiB;
*want = fixed + experts + std::max(kv_ceiling, kv_one) + 2 * kMiB;
}
} /* namespace rad */