Archived
radiance 1.0.6
- A text prompt to /v1/completions reads the model's control tokens as tokens, as vLLM and llama.cpp do. A client that renders its own chat template can send "<|im_start|>user ..." and the model sees the turn markers; they used to reach it as plain text. /tokenize and /v1/embeddings read a text prompt the same way, and a prompt that already opens with BOS gets no second one. - The VRAM budget counts the engine's own hardware queues, which the driver backs with about 33 MiB of VRAM each, and the KV tiers' copy staging. Both used to come out of --gpu-headroom-mib: Qwen3.8-Flash-Next ran with 9 MiB free under load against the 96 MiB it asked to keep, the room a kernel's first launch allocates from. The startup receipt has a "hardware queues" line. - Running the whole model on the CPU (RADIANCE_HOST_DOMAIN=1 with no GPU visible) no longer repeats words or answers differently at temperature 0. A decode step could read its input token before the copy that delivers it had landed. - The README says to clone the repository before installing.
This commit is contained in:
1 parent
6c11671bdd
commit
6df26315b9
25 files changed
+432
-82
No files matched your search
+18
-4
@@ -2157,14 +2157,28 @@ TEST(tokenize_takes_a_prompt_or_messages_and_never_both) {
|
||||
CHECK_EQ(f.post("/tokenize", "[1,2]").status, 400);
|
||||
}
|
||||
|
||||
TEST(tokenize_never_lets_the_caller_choose_parse_special) {
|
||||
TEST(a_raw_prompt_parses_control_tokens_on_every_endpoint_that_takes_one) {
|
||||
/* A client that renders its own chat template sends "<|im_start|>" meaning the token, as vLLM
|
||||
* and llama.cpp read it. /tokenize must count what /v1/completions will see. */
|
||||
Fixture f;
|
||||
/* A control token in `prompt` is raw text, or an /v1/completions built from these ids reaches
|
||||
* the system role. The chat form is the opposite and must parse them. */
|
||||
f.tok.last_parse_special = false;
|
||||
CHECK_EQ(f.post("/v1/completions", R"({"prompt":"<|im_start|>user","max_tokens":4})").status, 200);
|
||||
CHECK(f.tok.last_parse_special);
|
||||
f.tok.last_parse_special = false;
|
||||
CHECK_EQ(f.post("/v1/completions", R"({"prompt":["a","b"],"max_tokens":4})").status, 200);
|
||||
CHECK(f.tok.last_parse_special);
|
||||
f.tok.last_parse_special = false;
|
||||
f.post("/tokenize", R"({"prompt":"<|im_start|>"})");
|
||||
CHECK(!f.tok.last_parse_special);
|
||||
CHECK(f.tok.last_parse_special);
|
||||
f.tok.last_parse_special = false;
|
||||
f.post("/tokenize", R"({"messages":[{"role":"user","content":"hi"}]})");
|
||||
CHECK(f.tok.last_parse_special);
|
||||
for (const char* body : {R"({"input":"<|im_start|>"})", R"({"input":["a","b"]})"}) {
|
||||
OaiRequest r; ApiError e;
|
||||
f.tok.last_parse_special = false;
|
||||
CHECK_OK(parse_embeddings_request(body, f.odeps(), f.limits(), &r, &e));
|
||||
CHECK(f.tok.last_parse_special);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(detokenize_answers_under_the_key_vllm_uses) {
|
||||
|
||||
Reference in new issue
Block a user