Archived
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:
1 parent
09fb41735b
commit
6c11671bdd
30 files changed
+541
-120
No files matched your search
@@ -165,6 +165,14 @@ public:
|
||||
* laid over the real ones. */
|
||||
void set_reference(const Program* ref) { ref_ = ref; }
|
||||
|
||||
/* WITHOUT INSTANCES: finish() selects every kernel and initialises none. For a caller that
|
||||
* launches nothing -- rad-convert plans a container's stored form, which is the kernels'
|
||||
* layouts and not their setup. A kernel's init is about the process it runs in (a ring, a
|
||||
* peer's buffers) and the conversion is often not that process: libavx's n-gram gather
|
||||
* refuses a process that may not make an io_uring ring, and a sandbox that forbids one still
|
||||
* has to be able to convert the model. */
|
||||
void set_instances(bool on) { instances_ = on; }
|
||||
|
||||
Program& program() { return prog_; }
|
||||
const Program& program() const { return prog_; }
|
||||
|
||||
@@ -195,6 +203,7 @@ private:
|
||||
Registry& reg_;
|
||||
Program prog_;
|
||||
const Program* ref_ = nullptr;
|
||||
bool instances_ = true;
|
||||
|
||||
std::vector<std::string> errors_;
|
||||
int status_ = RAD_OK;
|
||||
|
||||
@@ -1498,7 +1498,7 @@ int Builder::finish() {
|
||||
w.source.c_str(), rad_dtype_name(w.decl.dtype));
|
||||
}
|
||||
|
||||
finish_instances();
|
||||
if (instances_) finish_instances();
|
||||
finish_weight_uses();
|
||||
finish_layouts();
|
||||
finish_kv_groups();
|
||||
|
||||
@@ -319,7 +319,7 @@ std::vector<std::string> CheckpointSources::refused() const {
|
||||
|
||||
int rad_tools_declare(const LoadedPlugins& lp, const RadModelMeta& meta, const RadBuildCtx& ctx,
|
||||
Program* out, const std::function<int(RadBuilder*, int64_t)>& also,
|
||||
const Program* ref, const WeightSourceFn& sources) {
|
||||
const Program* ref, const WeightSourceFn& sources, bool instances) {
|
||||
if (!out) return RAD_E_INVAL;
|
||||
|
||||
Registry& r = rad_tools_registry();
|
||||
@@ -334,6 +334,7 @@ int rad_tools_declare(const LoadedPlugins& lp, const RadModelMeta& meta, const R
|
||||
Builder b(r, meta, ctx);
|
||||
if (ref) b.set_reference(ref);
|
||||
if (sources) b.set_sources(sources);
|
||||
b.set_instances(instances);
|
||||
|
||||
int s = ap->arch_declare(&b, &meta, &ctx);
|
||||
if (s < 0) {
|
||||
|
||||
@@ -88,10 +88,13 @@ const RadChatFormat* rad_tools_chat_format(const LoadedPlugins& plugins, const R
|
||||
* or initialised. The Program that comes back is for its buffers and nothing else. */
|
||||
/* `sources` answers rad_weight_encoding (Builder::set_sources): a container's entries, a
|
||||
* checkpoint's tensors, or a recipe. Empty, every weight is read as plain in its declared dtype. */
|
||||
/* `instances` false selects every kernel and initialises none (Builder::set_instances): for a
|
||||
* caller that launches nothing, such as rad-convert planning a container's stored form. */
|
||||
int rad_tools_declare(const LoadedPlugins& plugins, const RadModelMeta& meta,
|
||||
const RadBuildCtx& ctx, Program* out,
|
||||
const std::function<int(RadBuilder*, int64_t logits_width)>& also = {},
|
||||
const Program* ref = nullptr, const WeightSourceFn& sources = {});
|
||||
const Program* ref = nullptr, const WeightSourceFn& sources = {},
|
||||
bool instances = true);
|
||||
|
||||
/* A container's entries as the source of every declaration's encoding. `f` must outlive the
|
||||
* declare. */
|
||||
|
||||
Reference in new issue
Block a user