Commit 4d821524 authored by zhuwenwen's avatar zhuwenwen
Browse files

update fp16 model layout conversion conditions

parent bb5f9b5b
......@@ -413,7 +413,7 @@ class BaiChuanBaseForCausalLM(nn.Module, SupportsLoRA):
default_weight_loader)
weight_loader(param, loaded_weight)
if self.use_llama_nn:
if self.use_llama_nn and self.quant_method is None :
lay_key_words = [
"self_attn.W_pack.weight",
"self_attn.o_proj.weight",
......
......@@ -411,7 +411,7 @@ class ChatGLMForCausalLM(nn.Module, SupportsLoRA):
default_weight_loader)
weight_loader(param, loaded_weight)
if self.use_llama_nn:
if self.use_llama_nn and self.quant_method is None:
lay_key_words = [
"self_attention.query_key_value.weight",
"self_attention.dense.weight",
......
......@@ -531,7 +531,7 @@ class LlamaForCausalLM(nn.Module, SupportsLoRA):
default_weight_loader)
weight_loader(param, loaded_weight)
if self.use_llama_nn:
if self.use_llama_nn and self.quant_method is None :
lay_key_words = [
"self_attn.qkv_proj.weight",
"self_attn.o_proj.weight",
......
......@@ -355,7 +355,7 @@ class QWenLMHeadModel(nn.Module):
weight_loader = getattr(param, "weight_loader",
default_weight_loader)
weight_loader(param, loaded_weight)
if self.use_llama_nn:
if self.use_llama_nn and self.quant_method is None :
lay_key_words = [
"attn.c_attn.weight",
"attn.c_proj.weight",
......
......@@ -448,7 +448,7 @@ class Qwen2ForCausalLM(nn.Module, SupportsLoRA):
default_weight_loader)
weight_loader(param, loaded_weight)
if self.use_llama_nn:
if self.use_llama_nn and self.quant_method is None:
lay_key_words = [
"self_attn.qkv_proj.weight",
"self_attn.o_proj.weight",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment