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
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "sched/scheduler.h"
|
||||
#include "sched/derive.h"
|
||||
#include "server/sink.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
@@ -546,6 +547,19 @@ struct Fixture {
|
||||
return id;
|
||||
}
|
||||
|
||||
/* The same, with the server's sink attached, for what a request tells its client. */
|
||||
uint64_t submit_to(server::Sink* sink, int n_prompt, int max_tokens) {
|
||||
auto r = std::make_unique<Request>();
|
||||
r->id = next_id++;
|
||||
r->max_tokens = max_tokens;
|
||||
r->sink = sink;
|
||||
r->prompt.resize((size_t)n_prompt);
|
||||
for (int i = 0; i < n_prompt; ++i) r->prompt[(size_t)i] = 1000 + i;
|
||||
uint64_t id = r->id;
|
||||
if (sch.add(std::move(r)) < 0) return 0;
|
||||
return id;
|
||||
}
|
||||
|
||||
/* Commit a step in which every sequence produced one token and none ended. */
|
||||
void commit_plain(int32_t token = 7) {
|
||||
const StepPlan& p = sch.plan();
|
||||
@@ -2039,4 +2053,27 @@ TEST(shutdown_fails_what_is_queued_and_refuses_what_follows) {
|
||||
CHECK(f.sch.step() == nullptr);
|
||||
}
|
||||
|
||||
/* AND EACH OF THOSE REQUESTS SAYS WHAT STOPPED IT. The sink carries the status and the sentence
|
||||
* the server puts in the 500: without them a client read "the engine failed this request: ok"
|
||||
* after a step failed as unsupported. */
|
||||
TEST(shutdown_fails_each_sink_with_the_status_that_stopped_the_engine) {
|
||||
server::Sink running, waiting, late;
|
||||
Fixture f;
|
||||
f.build(/*blocks=*/20, /*states=*/64);
|
||||
CHECK_OK(f.start());
|
||||
|
||||
CHECK(f.submit_to(&running, 160, 64) != 0);
|
||||
CHECK(f.sch.step() != nullptr);
|
||||
CHECK(f.submit_to(&waiting, 160, 64) != 0);
|
||||
|
||||
f.sch.shutdown("the engine stopped", RAD_E_UNSUPPORTED);
|
||||
CHECK(f.submit_to(&late, 8, 8) == 0);
|
||||
for (server::Sink* s : { &running, &waiting, &late }) {
|
||||
CHECK(s->done());
|
||||
CHECK_EQ((int)s->finish_reason(), (int)server::Finish::Error);
|
||||
CHECK_EQ(s->status(), (int)RAD_E_UNSUPPORTED);
|
||||
CHECK_EQ(std::string(s->why() ? s->why() : ""), std::string("the engine stopped"));
|
||||
}
|
||||
}
|
||||
|
||||
RAD_TEST_MAIN()
|
||||
Reference in new issue
Block a user