Archived
radiance 1.4.0
- Qwen3.8-Flash-Next on one card: the heat engine moves 64 experts a step (was 8), its copies and the prefill's expert staging run on the card's DMA engines instead of as copy kernels, and at decode the next layer's likeliest experts are copied onto the card ahead of its GEMMs. Against 1.3.0 at --tp 1: prefill +17-20% from 8K tokens up, throughput under load +16-20% - deploy/compose/flashnext-tp1.yaml: Qwen3.8-Flash-Next on one card and 64 GB of host RAM (4096-token prefill steps, 4 sequences, a 301K-token cache) - #61: --busy-prefill-chunk (default auto): a long prefill leaves the rest of the step to the requests decoding beside it and to new arrivals, instead of taking all of it (baKon) - LiquidAI's LFM2 and LFM2-VL, and d1's /v1/systemone (after zivius's PR #50) - a startup report: every option with its value and where it came from, the hardware, and what on it costs speed with the fix; /diagnostics serves it (behind the API key; without one, only to the same machine) - #69: a GPU memory fault names the buffer and kernel argument behind it and ends the server at once (exit status 70), instead of hanging or writing a core of tens of gigabytes - #64: a card without Resizable BAR is refused at startup, naming what to turn on, instead of crashing at the first launch - the image is built with ROCm 10.1 (the host's amdgpu driver must support it), with ROCm's libLLVM rebuilt so the same source compiles to the same kernels every time; a source build takes ROCm 10.1 or 7.2 - #71: the image ships curl, jq and a CA bundle, so --model <HF repo id> works in the container, and hfget.sh runs under its busybox (baKon) - --profile-ops shows how long each op's lane sat idle before it; cardclock.py skips an integrated GPU instead of stopping
This commit is contained in:
1 parent
d5b65cddc6
commit
dc339b4cd2
153 files changed
+12956
-1067
No files matched your search
@@ -23,6 +23,7 @@
|
||||
#include "llama/src/unicode.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
#include <thread>
|
||||
@@ -348,6 +349,58 @@ TEST(bpe_merges_as_worked_out_by_hand) {
|
||||
}
|
||||
}
|
||||
|
||||
/* `ignore_merges`: "abc" is a vocabulary entry the one merge cannot reach, so the flag is the only
|
||||
* way to get it. It applies to each pre-token after the declared chain (the Lowercase normalizer
|
||||
* and the whitespace split run first), and on both ByteLevel paths: the deferred one that merges
|
||||
* raw bytes, and the materialised one a later Split forces. */
|
||||
TEST(bpe_ignore_merges_takes_a_whole_pretoken) {
|
||||
const char* chains[] = {
|
||||
R"({"type":"WhitespaceSplit"})",
|
||||
R"({"type":"Sequence","pretokenizers":[{"type":"WhitespaceSplit"},)"
|
||||
R"({"type":"ByteLevel","add_prefix_space":false,"use_regex":false}]})",
|
||||
R"({"type":"Sequence","pretokenizers":[{"type":"WhitespaceSplit"},)"
|
||||
R"({"type":"ByteLevel","add_prefix_space":false,"use_regex":false},)"
|
||||
R"({"type":"Split","pattern":{"String":" "},"behavior":"Removed"}]})",
|
||||
};
|
||||
for (const char* chain : chains)
|
||||
for (const char* flag : { "", "\"ignore_merges\":false,", "\"ignore_merges\":true," }) {
|
||||
const bool ignore = std::strstr(flag, "true") != nullptr;
|
||||
const std::string js = std::string(R"({"normalizer":{"type":"Lowercase"},"pre_tokenizer":)") +
|
||||
chain + R"(,"model":{"type":"BPE",)" + flag +
|
||||
R"("vocab":{"a":0,"b":1,"c":2,"ab":3,"abc":4,"abc abc":5},"merges":["a b"]}})";
|
||||
auto v = from_json(js.c_str());
|
||||
REQUIRE(v != nullptr);
|
||||
CHECK_EQ(v->build().ignore_merges, ignore);
|
||||
Tokenizer t;
|
||||
CHECK_OK(t.init(v));
|
||||
const std::vector<int32_t> whole{ 4 }, merged{ 3, 2 };
|
||||
for (int repeat = 0; repeat < 2; ++repeat) { /* the second pass reads the caches */
|
||||
CHECK(encode_new(t, "ABC") == (ignore ? whole : merged));
|
||||
CHECK(encode_new(t, "ABCABC") == (std::vector<int32_t>{ 3, 2, 3, 2 }));
|
||||
CHECK(encode_new(t, "ABC ABC") == (ignore ? std::vector<int32_t>{ 4, 4 }
|
||||
: std::vector<int32_t>{ 3, 2, 3, 2 }));
|
||||
}
|
||||
CHECK(encode_ref(*v, "ABC ABC") == encode_new(t, "ABC ABC"));
|
||||
}
|
||||
}
|
||||
|
||||
/* A control token read as text stays text: the flag must not turn its spelling back into the
|
||||
* marker when the caller asked for specials not to be parsed. */
|
||||
TEST(bpe_ignore_merges_leaves_unparsed_control_tokens_as_text) {
|
||||
auto v = from_json(R"JSON({
|
||||
"added_tokens":[{"id":4,"content":"abc","special":true}],
|
||||
"pre_tokenizer":{"type":"WhitespaceSplit"},
|
||||
"model":{"type":"BPE","ignore_merges":true,
|
||||
"vocab":{"a":0,"b":1,"c":2,"ab":3},"merges":["a b"]}
|
||||
})JSON");
|
||||
REQUIRE(v != nullptr);
|
||||
Tokenizer t;
|
||||
CHECK_OK(t.init(v));
|
||||
CHECK(encode_new(t, "abc", true) == (std::vector<int32_t>{ 4 }));
|
||||
CHECK(encode_new(t, "abc", false) == (std::vector<int32_t>{ 3, 2 }));
|
||||
CHECK(encode_ref(*v, "abc", false) == (std::vector<int32_t>{ 3, 2 }));
|
||||
}
|
||||
|
||||
TEST(byte_fallback_and_unk_follow_the_declared_chain) {
|
||||
auto v = from_json(k_spm);
|
||||
REQUIRE(v != nullptr);
|
||||
|
||||
Reference in new issue
Block a user