qwen: merge tensors on convert (#31028)

* qwen: merge tensors on convert

* convert: use generator functions

* qwen4exp: remove conts and pre-scale
This commit is contained in:
Aman Gupta authored and GitHub committed 2026-10-25 15:23:22 +02:00
1 parent 1a0b56cec7
commit 2280f0fd16
8 files changed
+172 -40

No files matched your search

+2 -1
View File
@@ -125,7 +125,8 @@ static tensor_category tensor_get_category(const std::string & tensor_name) {
if (tensor_name_match_token_embd(tensor_name.c_str())) {
return tensor_category::TOKEN_EMBD;
}
if (tensor_name.find("attn_qkv.weight") != std::string::npos) {
// attn_qkv_gate is [attn_qkv | attn_gate] in one weight, the qkv rows decide its type
if (tensor_name.find("attn_qkv.weight") != std::string::npos || tensor_name.find("attn_qkv_gate.weight") != std::string::npos) {
return tensor_category::ATTENTION_QKV;
}
if (tensor_name.find("attn_kv_b.weight") != std::string::npos) {