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
@@ -515,6 +515,32 @@ TEST(the_encoder_matches_the_reference_on_trained_vocabularies) {
|
||||
}
|
||||
}
|
||||
|
||||
/* A TEXT THAT OPENS WITH BOS GETS NO SECOND ONE. A client rendering its own chat template writes
|
||||
* the BOS into the prompt; one the text spells anywhere else, or a second one at the start, is
|
||||
* the client's and stays. */
|
||||
TEST(a_text_that_opens_with_bos_gets_no_second_one) {
|
||||
VocabBuild vb;
|
||||
REQUIRE(parse_tokenizer_json_buf(k_tiny, "test.json", vb) >= 0);
|
||||
vb.bos = 12;
|
||||
vb.add_bos = true;
|
||||
auto v = load(std::move(vb));
|
||||
REQUIRE(v != nullptr);
|
||||
Tokenizer t;
|
||||
CHECK_OK(t.init(v));
|
||||
auto enc = [&](const char* s, bool add_special, bool parse_special) {
|
||||
std::vector<int32_t> ids;
|
||||
t.encode(s, ids, add_special, parse_special);
|
||||
return ids;
|
||||
};
|
||||
CHECK(enc("ab", true, true) == (std::vector<int32_t>{ 12, 4 }));
|
||||
CHECK(enc("<|end|>ab", true, true) == (std::vector<int32_t>{ 12, 4 }));
|
||||
CHECK(enc("<|end|><|end|>ab", true, true) == (std::vector<int32_t>{ 12, 12, 4 }));
|
||||
CHECK(enc("ab<|end|>", true, true) == (std::vector<int32_t>{ 12, 4, 12 }));
|
||||
CHECK(enc("<|end|>ab", false, true) == (std::vector<int32_t>{ 12, 4 }));
|
||||
/* Not parsed, the spelling is not the token, so the BOS is still owed. */
|
||||
CHECK(enc("<|end|>x", true, false) == (std::vector<int32_t>{ 12, 11 }));
|
||||
}
|
||||
|
||||
/* SPECIAL TOKENS ARE CLAIMED LONGEST FIRST, not leftmost: "bcde" wins over "ab" in "abcde" even
|
||||
* though "ab" starts earlier, and "<|im_start|>" is never cut by its prefix "<|im". */
|
||||
TEST(special_tokens_are_claimed_by_priority) {
|
||||
|
||||
Reference in new issue
Block a user