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

+90 -39
View File
@@ -7,6 +7,16 @@ patch was REWRITTEN into core/ under our own name instead, so this directory sta
The bottom half of this file is the list of things that went the other way, and why -- that list
is as much a part of the record as the lifts are.
One exception, taken deliberately: the chat lift (common/chat*, the auto-parser, jinja/ and
json-schema-to-grammar) is maintained directly in place. Its former patch series (0002-0021)
was verified applied -- the whole stack reverses cleanly on a copy of the tree it was removed
from, and on the directly edited tree only context lines of 0012 and 0015 have moved -- and the
patch files were then removed: the code itself is the change, the PATCH SERIES notes at the
bottom keep the rationale for each former patch by its old name, and the diffs are in git
history at 008eed4f, the last commit that has vendor/patches/0002-0021. Later changes -- the
render-path work that cut a chat request from three template renders to two and made the
Jinja string machinery move instead of copy -- are likewise direct edits. A refresh of those files is therefore a manual port, not a re-copy and re-apply.
The mechanical half of the promise is vendor/SHA256SUMS: every file under this directory -- lifts,
patch series, this record -- hashed, recomputed by tests/vendor_sums.sh (ctest: vendor_sums). A
file that differs, or arrived unrecorded, fails the suite: an unrecorded change to a lifted
@@ -23,10 +33,11 @@ UPSTREAM
("tests : add support for qwen3 SSM archs (#24031)")
MIT.
To refresh: check out the new upstream commit, re-copy the files listed below to the same paths,
re-apply patches/*.patch with `patch -p1` from vendor/llama/, and update the commit above. Paths
under vendor/llama/ mirror the upstream tree exactly so a patch generated with `git diff` in
llama.cpp applies here unchanged.
To refresh the lifts still under the rule: check out the new upstream commit, re-copy the files
listed below to the same paths, re-apply patches/*.patch with `patch -p1` from vendor/llama/,
and update the commit above. Paths under vendor/llama/ mirror the upstream tree exactly so a
patch generated with `git diff` in llama.cpp applies here unchanged. The chat lift is the
exception above: do not re-copy it; port by hand.
LIFTED FILES
@@ -68,11 +79,20 @@ vendor/llama/common/jinja/ <- llama.cpp common/jinja/
utils.h README.md
The Jinja engine and the template capability probe (spec §12: 5.0k + 0.5k lines). It depends
on nlohmann/json and common/unicode.h and on nothing else in llama.cpp -- no ggml, no
llama.h, no common.h -- which is why it lifts cleanly and chat.cpp did not.
on the tree's JSON DOM (core/util/json.h; nlohmann/json when lifted) and common/unicode.h
and on nothing else in llama.cpp -- no ggml, no llama.h, no common.h -- which is why it
lifts cleanly and chat.cpp did not.
LOCAL CHANGES: patches/0015-jinja-print-a-list-or-a-dict-as-its-repr.patch
patches/0021-jinja-a-dotted-integer-is-an-index.patch
LOCAL CHANGES: maintained directly (see the chat exception at the top of this file). The
former patches 0006 (min/max over a sequence), 0015 (print a list or dict
as its repr) and 0021 (a dotted integer is an index), `unique` over a sequence
with jinja2's semantics (upstream's is a stub that throws, which the capability
probe reports as a template without tool support: GLM-5.3-Flash's), the probe's
first exception under tools kept (caps::probe_error,
common_chat_templates_get_probe_error), then the string/render
hot paths: parts are moved instead of copied through the gather, appends no
longer return a copy, the parts join is one compaction pass, the flat render
is gathered without a parts list, and loop/member lookups stop rehashing.
vendor/llama/common/chat.{h,cpp}
vendor/llama/common/chat-auto-parser.h
@@ -97,23 +117,17 @@ vendor/llama/common/regex-partial.{h,cpp} <- llama.cpp common/*
files in core/ that include any of these, which keeps a vendor refresh from rippling into the
server.
LOCAL CHANGES: patches/0002-chat-unclosed-reasoning-must-not-swallow-a-tool-call.patch
patches/0003-json-schema-pattern-must-not-hang-or-index-empty.patch
patches/0004-json-schema-refuse-what-it-cannot-enforce.patch
patches/0005-chat-an-xml-argument-value-owns-its-indentation.patch
patches/0006-jinja-min-and-max-over-a-sequence.patch
patches/0007-autoparser-split-the-per-argument-suffix-from-the-call-close.patch
patches/0008-autoparser-tagged-calls-separate-on-space-and-named-args-in-any-order.patch
patches/0009-chat-a-cdata-section-is-punctuation-not-content.patch
patches/0011-chat-add_bos-must-come-from-the-inputs.patch
patches/0012-json-schema-a-schema-no-value-satisfies.patch
patches/0013-json-schema-a-count-past-int-is-no-bound.patch
patches/0014-json-schema-a-not-of-every-type-is-never.patch
patches/0016-chat-analyse-a-template-once.patch
patches/0017-json-schema-a-pattern-without-anchors-searches.patch
patches/0018-json-schema-shorthand-classes-are-written-out.patch
patches/0019-json-schema-identity-escapes-of-punctuation.patch
patches/0020-json-schema-control-escapes-and-unloadable-class-escapes.patch
LOCAL CHANGES: maintained directly (see the chat exception at the top of this file). The
former patches 0002-0005 and 0007-0020 (listed with their rationale under
PATCH SERIES below), then in place: the generation-prompt render reuse and
the dropped message_spans computation. The
whole lift's JSON type is now the tree's own DOM (core/util/json.h,
rad::Json) where upstream spells nlohmann::ordered_json (and
nlohmann::json in peg-parser's to_json/save, whose text now keeps
insertion order instead of sorting keys), and
json-partial.cpp's error locator is a small structural scanner where
upstream drives nlohmann's SAX interface; a refresh re-applies both by
renaming the type and keeping the scanner.
On 0003: a `pattern` in a `response_format` reaches _visit_pattern() as client data, and three
of its paths do not survive that. `front()`/`back()` run on an empty string; `seq.back()` runs
@@ -142,24 +156,19 @@ vendor/llama/common/regex-partial.{h,cpp} <- llama.cpp common/*
serves every structured-output request was the unhardened one. The fork is deleted and its
refusals are here, which is where they were needed all along.
vendor/nlohmann/json.hpp
vendor/nlohmann/json_fwd.hpp <- llama.cpp vendor/nlohmann/nlohmann/*
vendor/nlohmann/LICENSE.MIT <- nlohmann/json LICENSE.MIT at v3.12.0, the release
json.hpp names; llama.cpp does not carry it
vendor/cpp-httplib/httplib.h
vendor/cpp-httplib/httplib.cpp
vendor/cpp-httplib/LICENSE <- llama.cpp vendor/cpp-httplib/cpp-httplib/*
Header-only JSON, byte for byte as lifted, and the HTTP library at cpp-httplib v0.64.0 SPLIT from
upstream's single ~24,300-line header into a .h/.cpp pair, so one translation unit pays for it.
Apart from the split the httplib pair matches upstream exactly when it was lifted; the split itself
drops two decorative `// ----` separator comment lines, moves `inline` from definitions to
declarations, and adds the .cpp's `#include "httplib.h"` and namespace brace. The only difference
from upstream for both is the PATH: llama.cpp nests them one directory deeper
(vendor/nlohmann/nlohmann/) and puts the outer directory on the include path. Flattening lets
`<nlohmann/json.hpp>` and `<cpp-httplib/httplib.h>` resolve with vendor/ alone on the path, which
is the one include directory core/CMakeLists.txt already adds.
The HTTP library at cpp-httplib v0.64.0 SPLIT from upstream's single ~24,300-line header
into a .h/.cpp pair, so one translation unit pays for it. Apart from the split the pair
matches upstream exactly when it was lifted; the split itself drops two decorative
`// ----` separator comment lines, moves `inline` from definitions to declarations, and
adds the .cpp's `#include "httplib.h"` and namespace brace. The only other difference
from upstream is the PATH: llama.cpp nests it one directory deeper and puts the outer
directory on the include path. Flattening lets `<cpp-httplib/httplib.h>` resolve with
vendor/ alone on the path, which is the one include directory core/CMakeLists.txt
already adds.
cpp-httplib's own CMakeLists.txt is NOT carried. vendor/CMakeLists.txt builds httplib.cpp
itself, because upstream's version reaches for llama.cpp's license and compile-flag helpers
@@ -187,6 +196,44 @@ vendor/cpp-httplib/LICENSE <- llama.cpp vendor/cpp-httplib/cpp
one byte per gap paces a worker for that full timeout after the response was already sent.
0022 caps the drain's total budget at 5 s (or the connection timeout, whichever is smaller).
vendor/yyjson/yyjson.h
vendor/yyjson/yyjson.c
vendor/yyjson/LICENSE <- ibireme/yyjson src/* and LICENSE at tag 0.13.0
(commit 138b4a7e757426bbbaa11ca37f257ce8d8489007)
The reader inside the tree's JSON DOM. Parsing a large agent-turn body with the DOM
library this replaced cost ~340 MB/s -- the largest single host item on the serving path
once rendering was optimised -- and almost all of it was the lexer, not the tree. The
DOM now lives in core/util/json.{h,cpp} (rad::Json, ours): yyjson reads under a
byte-budgeted allocator and a converter rebuilds the value tree, enforcing the value
budget and depth cap the request path's bounded parse promises. That displaced the old
DOM everywhere -- server, chat templates, the vendored lift above, config and
checkpoint files, tests -- and vendor/nlohmann is gone with it. The behavioural
contract carried over (typing, refusals, boundaries, dump bytes bar a float's digits
where the old ones were not the shortest that read back) is recorded in
tests/json_test.cpp. MIT.
Upstream tracked: yyjson tag 0.13.0. To refresh: re-copy src/yyjson.{h,c} and LICENSE from
the new tag, keep the include spelled <yyjson/yyjson.h>, and re-run the parse contract
cases (tests/json_test.cpp, tests/wire_test.cpp) -- the converter and the budget
arithmetic in core/util/json.cpp assume yyjson's reader allocates an input copy plus
one value buffer and nothing else, which a refresh must re-confirm.
LOCAL CHANGES: none.
vendor/rapidyaml/ryml.hpp <- rapidyaml v0.16.0 release asset
rapidyaml.v0.16.0.singlehdr.hpp (biojppm/rapidyaml),
renamed; byte-identical
vendor/rapidyaml/LICENSE.txt <- rapidyaml LICENSE.txt at tag v0.16.0
vendor/shim/ryml_impl.cpp ours: defines RYML_SINGLE_HDR_DEFINE_NOW and includes
the header, the one TU holding the implementation
The YAML configuration reader (core/fleet/config.cpp) is the only user. The amalgamated header
carries c4core and fast_float inside it, so nothing else is fetched. MIT.
LOCAL CHANGES: none.
REWRITTEN INTO core/ INSTEAD
----------------------------
@@ -232,6 +279,10 @@ core/ under our own name, with a comment at the top naming what it was read from
PATCH SERIES
------------
Only 0001 and 0022 still live in patches/. The entries for 0002-0021 keep the rationale for
changes that are now maintained directly in the chat lift (see the top of this file); their
headings name the removed patch files, whose diffs are in git history.
patches/0001-unicode-reject-codepoints-above-U-10FFFF.patch
unicode_cpt_from_utf8() accepts a 4-byte sequence with a 0xF5..0xF7 lead and returns a