radiance 1.0.5

- Answers no longer stop partway through. A request without max_tokens got 512 tokens, and a
  reasoning model can think for thousands before it answers, so the reply ended inside the
  reasoning with finish_reason "length", which chat clients do not show. It now gets whatever
  the context leaves after the prompt, as in vLLM. --default-max-tokens N sets a number, and
  --max-tokens-cap bounds every request.
- Qwen3.8-Flash-Next in Docker without --security-opt seccomp=unconfined is refused at startup,
  in about a second, with a message naming that option. It used to load the whole model and then
  fail every request as "unsupported", and a restart policy reloaded it over and over. The
  n-gram table is read through io_uring, which Docker's default seccomp profile refuses.
- A request the engine fails says what failed, in the 500 or the stream's error event. It read
  "the engine failed this request: ok".
- Flash-Next no longer crashes at startup about one start in seven (a race between the
  parallel declares that size the activation arena).
- rad-convert no longer needs io_uring, so it converts in a sandbox that forbids it.
This commit is contained in:
Deadcode committed 2026-10-04 18:44:29 +02:00
1 parent 09fb41735b
commit 6c11671bdd
30 files changed
+541 -120

No files matched your search

+28 -19
View File
@@ -100,40 +100,46 @@ class Geometry {
public:
Geometry() = default;
/* The cached RadParam view holds char* into THIS object's own strings. An implicit copy would
* carry those pointers into the copy along with dirty_ = false, so the copy would hand a
* kernel pointers that dangle the moment the source dies -- and every Resolved holds a
* Geometry while every Band holds two, so this type is copied constantly. A copy therefore
* takes the storage and NOT the view, and rebuilds on first use.
/* THE RadParam VIEW IS KEPT CURRENT BY EVERY WRITE, never built on first read. It holds char*
* into this object's own strings, and a view rebuilt lazily from a const reader is a write
* that two readers can make at once: the sizing declares of one rank all read the real
* program's geometries side by side (Engine::probe_arena_levels), and one clearing the view
* while another filled it is the heap corruption that crashed startup. So params() writes
* nothing, and a Geometry nobody is writing can be read from any number of threads.
*
* The move is the same rule for a different reason: a moved-from vector's buffer may be
* stolen, so the view's pointers stop meaning anything even though nothing was destroyed. */
* A copy takes the storage and builds its own view, because the source's points into the
* source. A move takes the view along with the storage: the vectors hand over their arrays,
* so every string stays where it was and every pointer stays good. The moved-from object is
* emptied, view included, so it is a valid empty geometry rather than one whose view names
* strings it no longer owns. */
Geometry(const Geometry& o)
: keys_(o.keys_), svals_(o.svals_), ivals_(o.ivals_), dvals_(o.dvals_), kinds_(o.kinds_) {}
: keys_(o.keys_), svals_(o.svals_), ivals_(o.ivals_), dvals_(o.dvals_), kinds_(o.kinds_) {
rebuild();
}
Geometry& operator=(const Geometry& o) {
if (this != &o) {
keys_ = o.keys_; svals_ = o.svals_; ivals_ = o.ivals_; dvals_ = o.dvals_;
kinds_ = o.kinds_;
view_.clear(); dirty_ = true;
rebuild();
}
return *this;
}
Geometry(Geometry&& o) noexcept
: keys_(std::move(o.keys_)), svals_(std::move(o.svals_)),
ivals_(std::move(o.ivals_)), dvals_(std::move(o.dvals_)),
kinds_(std::move(o.kinds_)) {
o.view_.clear(); o.dirty_ = true;
view_(std::move(o.view_)), ivals_(std::move(o.ivals_)),
dvals_(std::move(o.dvals_)), kinds_(std::move(o.kinds_)) {
o.clear();
}
Geometry& operator=(Geometry&& o) noexcept {
if (this != &o) {
keys_ = std::move(o.keys_); svals_ = std::move(o.svals_);
view_ = std::move(o.view_);
ivals_ = std::move(o.ivals_); dvals_ = std::move(o.dvals_);
kinds_ = std::move(o.kinds_);
view_.clear(); dirty_ = true;
o.view_.clear(); o.dirty_ = true;
o.clear();
}
return *this;
}
@@ -149,17 +155,20 @@ public:
const char* get_s(std::string_view k) const;
bool has(std::string_view k) const;
/* A view suitable for RadArgs.p. Valid while this object lives. */
const RadParam* params() const;
int n_params() const;
/* A view suitable for RadArgs.p. Valid while this object lives and is not written. */
const RadParam* params() const { return view_.data(); }
int n_params() const { return (int)view_.size(); }
std::string str() const; /* "M=64 N=8192 K=5120 dtype=w4a8", for diagnostics */
private:
std::vector<std::string> keys_, svals_;
std::vector<RadParam> view_;
mutable bool dirty_ = true;
void rebuild() const;
void rebuild();
void clear() noexcept {
keys_.clear(); svals_.clear(); view_.clear(); ivals_.clear(); dvals_.clear();
kinds_.clear();
}
std::vector<long long> ivals_;
std::vector<double> dvals_;
std::vector<int> kinds_;