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:
Deadcode committed 2026-10-06 21:36:24 +02:00
1 parent 7001841e45
commit e95d397288
47 files changed
+2611 -219

No files matched your search

+31
View File
@@ -396,6 +396,37 @@ TEST(detokenize_stop_string_straddle) {
CHECK_EQ(d.flush(), std::string());
}
/* A reply that starts inside its reasoning block: a stop string written while thinking is text,
* not a stop, and the first one after the closer cuts as usual. */
TEST(detokenize_stops_wait_for_the_reasoning_closer) {
if (!need_vocab("detokenize_stops_wait_for_the_reasoning_closer")) return;
Tokenizer t;
CHECK_OK(t.init(qwen_vocab()));
const std::string think = "restating it, Q: what is two and two</think>";
std::vector<int32_t> ids;
CHECK_OK(t.encode(think + "The answer is 4. Q: next", ids, false, true));
Detokenizer d(qwen_vocab(), { "Q:" });
d.defer_stops_until("</think>");
std::string s;
for (int32_t id : ids) {
s += d.push(id);
if (d.stopped()) break;
}
CHECK(d.stopped());
CHECK_EQ(d.stop_hit(), std::string("Q:"));
CHECK_EQ(s, think + "The answer is 4. ");
/* Without the deferral the same text stops inside the reasoning. */
Detokenizer plain(qwen_vocab(), { "Q:" });
std::string p;
for (int32_t id : ids) {
p += plain.push(id);
if (plain.stopped()) break;
}
CHECK_EQ(p, std::string("restating it, "));
}
/* A stop string that never completes must be released at flush() rather than swallowed. */
TEST(detokenize_incomplete_stop_is_flushed) {
if (!need_vocab("detokenize_incomplete_stop_is_flushed")) return;