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:
Deadcode committed 2026-10-04 20:07:08 +02:00
1 parent 6c11671bdd
commit 6df26315b9
25 files changed
+432 -82

No files matched your search

+10 -3
View File
@@ -1444,10 +1444,15 @@ int parse_completion_request(const std::string& body, const OaiDeps& d, const Oa
return RAD_E_INVAL;
}
/* A raw prompt is the client's whole input: no template wraps it and no role is the server's
* to protect, so its control tokens are parsed, as vLLM and llama.cpp parse them. A client
* that renders its own chat template sends "<|im_start|>" meaning the token; read as text it
* reaches the model as six pieces of punctuation. Token ids could name any control token
* already. */
auto push_text = [&](const std::string& s) {
PromptInput p;
p.text = s;
p.tokens = d.tok->encode(s, true, /*parse_special=*/false);
p.tokens = d.tok->encode(s, true, /*parse_special=*/true);
out->prompts.push_back(std::move(p));
};
auto push_ids = [&](const json& arr, ApiError* e) -> bool {
@@ -1565,10 +1570,12 @@ int parse_embeddings_request(const std::string& body, const OaiDeps& d, const Oa
return true;
};
/* Parsed like a /v1/completions prompt, and for the same reason: the input is the client's
* own text with no template around it. */
if (it->is_string()) {
PromptInput p;
p.text = it->get<std::string>();
p.tokens = d.tok->encode(p.text, true, /*parse_special=*/false);
p.tokens = d.tok->encode(p.text, true, /*parse_special=*/true);
out->prompts.push_back(std::move(p));
} else if (it->is_array()) {
if (it->empty()) { *err = err_bad("input", "must not be empty"); return RAD_E_INVAL; }
@@ -1577,7 +1584,7 @@ int parse_embeddings_request(const std::string& body, const OaiDeps& d, const Oa
if (!s.is_string()) { *err = err_bad("input", "expected all strings"); return RAD_E_INVAL; }
PromptInput p;
p.text = s.get<std::string>();
p.tokens = d.tok->encode(p.text, true, /*parse_special=*/false);
p.tokens = d.tok->encode(p.text, true, /*parse_special=*/true);
out->prompts.push_back(std::move(p));
}
} else if (it->front().is_number_integer()) {