qwen35_w8a8: qwen35_fp8.cpp built for a rotated int8 trunk

A third build of the qwen35 source, as qwen35moe_fp8 is, claiming (qwen35, w8a8_fwht128).
Behind QWEN35_W8A8: check_format's method and fmt, a probe of the first delta-net input
projection that learns the trunk is rotated int8 before the activations are declared (and refuses
one that is not, plain int8 included: the descriptor names the rotation), and the plugin
identity; the four trunk activations then carry int8 code pairs.

It declines imported checkpoints (RAD_ARCH_SERVES_IMPORTS(0)): as the family's second quantised
plugin it would make every imported Qwen3.8 release (Quark, ParoQuant, GPTQ, NVFP4) refuse, so
those stay with qwen35_fp8.

arch_test: every trunk linear an i8a8h GEMM behind its own quantiser at one and two ranks, the
refusals (no int8 trunk, a plain one, another format, no fmt), lint clean with the MTP head and
with DFlash2, and two ArchCases (pinned graphs; libref's vocabulary serves it at one rank).
shipped_plugins_test lists the new key and holds each shipped family to at most one plugin that
takes imports. ARCHITECTURES.md and GUIDE.md list the plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
eddie168168andClaude Opus 5.5 authored and StillDeadcode committed 2026-10-19 10:42:13 +02:00
1 parent 2ac0d966b3
commit 5d11c7c200
7 files changed
+298 -7

No files matched your search

+31 -1
View File
@@ -12,6 +12,7 @@
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace rad;
@@ -90,7 +91,8 @@ TEST(the_shipped_architectures_load_with_distinct_selection_keys) {
{ "breeze", "" }, { "embeddinggemma2", "" }, { "gemma4", "" },
{ "gemma4", "compressed-tensors" }, { "lfm2", "" }, { "llama", "" }, { "llama", "fp8_e4m3" },
{ "qwen35", "" },
{ "qwen35", "fp8_e4m3" }, { "qwen35moe", "fp8_e4m3" }, { "qwen3asr", "" },
{ "qwen35", "fp8_e4m3" }, { "qwen35", "w8a8_fwht128" }, { "qwen35moe", "fp8_e4m3" },
{ "qwen3asr", "" },
{ "minimaxh3", "" }, { "minimaxmusic3", "" }, { "qwen4exp", "" }, { "qwenimage21", "" } };
std::set<std::pair<std::string, std::string>> got;
for (const auto& [k, name] : keys) got.insert(k);
@@ -101,4 +103,32 @@ TEST(the_shipped_architectures_load_with_distinct_selection_keys) {
CHECK(got == want);
}
/* A checkpoint whose quantisation was imported weight by weight (Quark, ParoQuant, GPTQ, NVFP4)
* names a tool no plugin claims, so the family's one quantised plugin serves it, and two are
* refused (startup.h). So each family has at most one quantised plugin that takes imports:
* qwen35_w8a8 declines them (rad_arch_serves_imports), leaving Qwen3.8 imports to qwen35_fp8. */
TEST(every_shipped_family_has_at_most_one_plugin_for_an_imported_checkpoint) {
Registry r;
const int st = r.load_dir(dir_of("architectures"), {});
if (st == RAD_E_IO && r.plugins().empty())
ARTIFACT_MISSING("the architecture plugins under " + dir_of("architectures"));
CHECK_OK(st);
std::map<std::string, std::vector<std::string>> takers;
for (const Plugin& p : r.plugins())
if (p.kind == RAD_PLUGIN_ARCH && !p.arch_quant.empty() && p.arch_serves_imports)
takers[p.arch_id].push_back(p.name);
for (const auto& [id, names] : takers) {
if (names.size() > 1)
for (const auto& n : names)
fprintf(stderr, " '%s' would take an imported %s checkpoint\n", n.c_str(),
id.c_str());
CHECK_EQ(names.size(), 1u);
}
REQUIRE(takers.count("qwen35"));
CHECK_EQ(takers["qwen35"][0], std::string("qwen35_fp8"));
const Plugin* w8 = r.plugin("qwen35_w8a8");
REQUIRE(w8 != nullptr);
CHECK(!w8->arch_serves_imports);
}
RAD_TEST_MAIN()