model : Add support for Metis-1.6 models (#31134)

Assisted-by: Claude
This commit is contained in:
Giulianno authored and GitHub committed 2026-11-03 16:24:45 +01:00
1 parent d1044bc827
commit 9309bf1bcf
20 files changed
+1112 -2

No files matched your search

+10
View File
@@ -361,6 +361,16 @@ static bool tensor_allows_quantization(const llama_model_quantize_params * param
quantize &= name.find("indexer.k_proj.weight") == std::string::npos;
quantize &= name.find("indexer.q_proj.weight") == std::string::npos;
// metis16: small control tensors that steer every layer; the stream and hc_ tables (ne[0] = 4) would fall back to F16
if (arch == LLM_ARCH_METIS16) {
quantize &= name.rfind("depth_mem_", 0) == std::string::npos;
quantize &= name.rfind("cont_", 0) == std::string::npos;
quantize &= name.find("stream_embd") == std::string::npos;
quantize &= name.find("attn_pass_lora") == std::string::npos;
quantize &= name.find("ffn_exp_embd") == std::string::npos;
quantize &= name.find("hc_") == std::string::npos;
}
// glm5-next
if (arch == LLM_ARCH_GLM5_NEXT) {
quantize &= name.find("hc_") == std::string::npos;