Archived
radiance 1.2.0
- MXFP4 weights: block-fp8 Qwen3.5/3.6/3.8 dense models serve OCP-MXFP4 linears (e2m1, an E8M0 exponent per 32) at 4-bit weights against E4M3 activations. New libr4d rows: the decode GEMM (M <= 128, split-K with a fused last-arriver reduction) and the prefill GEMM on a fragment-tiled activation. Qwen3.8-27B MXFP4 (AMD Quark AWQ) is in the model table. - Cards without peer-to-peer access serve: every collective has a host-memory twin; --p2p auto|on|off. - Stop strings apply to the answer, not to the reasoning block a reply starts in. - A prefix hit ends one drafter window before the prompt's end, so a windowed block drafter (DFlash2) drafts from the first token of a follow-up turn.
This commit is contained in:
1 parent
7001841e45
commit
e95d397288
47 files changed
+2611
-219
No files matched your search
+21
-2
@@ -1606,13 +1606,32 @@ std::string Detokenizer::push(int32_t token) {
|
||||
all_ += p;
|
||||
pending_ += p;
|
||||
|
||||
/* Inside the reasoning block no stop string applies (defer_stops_until). The closer is
|
||||
* searched for incrementally in all_, from (closer length - 1) bytes behind the previous end.
|
||||
* Once it has been generated, matching starts in the text AFTER it: the closer may still be in
|
||||
* pending_, and nothing before its end may count. */
|
||||
size_t from = 0;
|
||||
if (!armed_) {
|
||||
const size_t n = arm_after_.size();
|
||||
const size_t start = arm_scanned_ >= n ? arm_scanned_ - n + 1 : 0;
|
||||
const size_t m = all_.find(arm_after_, start);
|
||||
arm_scanned_ = all_.size();
|
||||
if (m == std::string::npos) {
|
||||
from = std::string::npos;
|
||||
} else {
|
||||
armed_ = true;
|
||||
const size_t pending_at = all_.size() - pending_.size();
|
||||
from = m + n > pending_at ? m + n - pending_at : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* A complete stop string inside pending_ ends the stream. Everything before it is emitted;
|
||||
* the stop string and anything after it never is. */
|
||||
if (!stops_.empty()) {
|
||||
if (!stops_.empty() && from != std::string::npos) {
|
||||
size_t best = std::string::npos;
|
||||
const std::string* which = nullptr;
|
||||
for (const std::string& s : stops_) {
|
||||
const size_t m = pending_.find(s);
|
||||
const size_t m = pending_.find(s, from);
|
||||
if (m != std::string::npos && m < best) { best = m; which = &s; }
|
||||
}
|
||||
if (which) {
|
||||
|
||||
Reference in new issue
Block a user