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:
Deadcode committed 2026-10-16 18:25:18 +02:00
1 parent b068190326
commit 1e968f6e1d
739 files changed
+128447 -84632

No files matched your search

+36 -28
View File
@@ -1,25 +1,20 @@
/* iface.cpp -- the CLI plumbing every tool agrees about. Each tool parses its own flags: five
* hand-rolled loops is less machinery than one options library, and each usage text is then
* written for its own tool.
/* iface.cpp -- CLI plumbing shared by the tools.
*
* The plugin loader and the declare phase are not here: they live in core/build/startup.h, because
* they ARE the engine's startup -- rad-convert, rad-kbench and rad-tune are that startup with a
* different last step. One copy only; two would eventually disagree about hierarchy order, which
* is what decides the layout baked into a container.
* The plugin loader and declare phase stay in core/build/startup.h, shared with the engine: a
* second copy could disagree on hierarchy order, which decides the layout baked into a container.
*/
#include "iface.h"
#include "util/kernel_list.h"
#include <cerrno>
#include <cstdio>
#include <cstdlib>
namespace rad {
/* THE SAME DEFAULT THE ENGINE USES, spelled with the same macro.
*
* RAD_DEFAULT_HOME is the one definition of the fallback home, shared with core/config.cpp. It
* must not be respelled here in terms of the install prefix: the engine's home is a directory
* below that prefix, so a second spelling puts the tools and the engine one directory apart and
* they find different plugin trees. The divergence is invisible while every run passes --home or
* $RADIANCE_HOME explicitly, and appears the moment an installed prefix becomes a working home. */
/* Same fallback as the engine (core/config.cpp): RAD_DEFAULT_HOME. Do not derive it from the
* install prefix; the home is a directory below it, so the tools would find a different plugin
* tree. */
std::string rad_home() {
if (const char* e = std::getenv("RADIANCE_HOME")) if (*e) return e;
#ifdef RAD_DEFAULT_HOME
@@ -29,26 +24,39 @@ std::string rad_home() {
#endif
}
std::vector<std::string> rad_split_list(const std::string& s) {
std::vector<std::string> out;
std::string cur;
for (char c : s) {
if (c == ':' || c == ',') { if (!cur.empty()) out.push_back(cur); cur.clear(); }
else cur.push_back(c);
}
if (!cur.empty()) out.push_back(cur);
return out;
}
std::vector<std::string> rad_split_list(const std::string& s) { return rad_split_kernel_list(s); }
std::vector<std::string> rad_hierarchy_from_env() {
const char* e = std::getenv("RADIANCE_KERNELS");
return (e && *e) ? rad_split_list(e) : std::vector<std::string>{};
}
std::string rad_humanb_w(int64_t bytes, int w) {
std::string s = humanb(bytes);
if ((int)s.size() >= w) return s;
return std::string((size_t)(w - s.size()), ' ') + s;
bool rad_parse_int(const char* text, int64_t lo, int64_t hi, int64_t* out, std::string* why) {
char* end = nullptr;
errno = 0;
const long long n = text ? std::strtoll(text, &end, 10) : 0;
if (!text || !*text || !end || *end || errno == ERANGE) {
if (why) *why = fmt("takes a whole number, not '%s'", text ? text : "");
return false;
}
if (n < lo || n > hi) {
if (why) *why = hi == INT64_MAX ? fmt("must be >= %lld, not %lld", (long long)lo, n)
: fmt("must be in [%lld, %lld], not %lld", (long long)lo,
(long long)hi, n);
return false;
}
*out = n;
return true;
}
int64_t rad_flag_int(const char* tool, const char* flag, const char* text, int64_t lo, int64_t hi) {
int64_t v = 0;
std::string why;
if (!rad_parse_int(text, lo, hi, &v, &why)) {
std::fprintf(stderr, "%s: %s %s\n", tool, flag, why.c_str());
std::exit(2);
}
return v;
}
} /* namespace rad */