You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A clear and concise description of what the bug is.
报错:AttributeError: 'Linear' object has no attribute 'in_channels'
Hardware Environment(Ascend/GPU/CPU) / 硬件环境:
Ascend
/device ascend/GPU/CPU/kirin/等其他芯片
device ascend
Software Environment / 软件环境 (Mandatory / 必填):
mindnlp0.4
-- MindSpore version (e.g., 1.7.0.Bxxx) :
mindspore2.3.1
-- Python version (e.g., Python 3.7.5) :
3.9.10
-- OS platform and distribution (e.g., Linux Ubuntu 16.04):
EluerOS
-- GCC/Compiler version (if compiled from source):
To Reproduce / 重现步骤 (Mandatory / 必填)
简单示例如下,调用的facebook/bart-base模型
import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
from mindnlp.transformers import AutoModelForSeq2SeqLM
model_name_or_path = "facebook/bart-base"
from mindnlp.peft import AdaLoraConfig, TaskType, get_peft_model
model = AutoModelForSeq2SeqLM.from_pretrained(model_name_or_path)
peft_config = AdaLoraConfig(
init_r=12,
target_r=8,
beta1=0.85,
beta2=0.85,
tinit=200,
tfinal=1000,
deltaT=10,
lora_alpha=32,
lora_dropout=0.1,
task_type=TaskType.SEQ_2_SEQ_LM,
inference_mode=False,
)
model = get_peft_model(model, peft_config)
The text was updated successfully, but these errors were encountered:
liuyifan123123
changed the title
AttributeError: 'Linear' object has no attribute 'in_channels'
跑train_adalora_seq2seq模型微调时出现错误AttributeError: 'Linear' object has no attribute 'in_channels'
Sep 27, 2024
Describe the bug/ 问题描述 (Mandatory / 必填)
A clear and concise description of what the bug is.
报错:AttributeError: 'Linear' object has no attribute 'in_channels'
Ascend
/GPU
/CPU
) / 硬件环境:-- MindSpore version (e.g., 1.7.0.Bxxx) :
mindspore2.3.1
-- Python version (e.g., Python 3.7.5) :
3.9.10
-- OS platform and distribution (e.g., Linux Ubuntu 16.04):
EluerOS
-- GCC/Compiler version (if compiled from source):
To Reproduce / 重现步骤 (Mandatory / 必填)
简单示例如下,调用的facebook/bart-base模型
import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
from mindnlp.transformers import AutoModelForSeq2SeqLM
model_name_or_path = "facebook/bart-base"
from mindnlp.peft import AdaLoraConfig, TaskType, get_peft_model
model = AutoModelForSeq2SeqLM.from_pretrained(model_name_or_path)
peft_config = AdaLoraConfig(
init_r=12,
target_r=8,
beta1=0.85,
beta2=0.85,
tinit=200,
tfinal=1000,
deltaT=10,
lora_alpha=32,
lora_dropout=0.1,
task_type=TaskType.SEQ_2_SEQ_LM,
inference_mode=False,
)
model = get_peft_model(model, peft_config)
The text was updated successfully, but these errors were encountered: