[Fix] Fix AttributeError in Qwen2.5 LoRA: 'Qwen2ForCausalLM' object has no attribute 'get_hidden_dim' (#1536)
Co-authored-by: Ying Sheng <sqy1415@gmail.com>
This commit is contained in:
co-authored by
Ying Sheng
parent
4ae0969c0a
commit
e6852b0dd2
@@ -319,6 +319,7 @@ class LlamaForCausalLM(nn.Module):
|
||||
)
|
||||
|
||||
def get_hidden_dim(self, module_name):
|
||||
# return input_dim, output_dim
|
||||
if module_name in ["q_proj", "o_proj", "qkv_proj"]:
|
||||
return self.config.hidden_size, self.config.hidden_size
|
||||
elif module_name in ["kv_proj"]:
|
||||
|
||||
Reference in New Issue
Block a user