No module named 'transformers_modules.sunzeyeah.pangu-2'
MRKINKI opened this issue · 4 comments
tokenizer = AutoTokenizer.from_pretrained("sunzeyeah/pangu-2.6B", trust_remote_code=True) 这样加载时会报错
你好,由于importlib
是根据.
来间隔module, 如果model_name_or_path
(即AutoTokenizer.from_pretrained()
的第一个入参)的取值中出现.
,就会报ModuleNotFoundError
。现已更新huggingface hub的地址为sunzeyeah/pangu-2_6B
,可使用如下命令进行加载:
tokenizer = AutoTokenizer.from_pretrained("sunzeyeah/pangu-2_6B", trust_remote_code=True)
你好,由于
importlib
是根据.
来间隔module, 如果model_name_or_path
(即AutoTokenizer.from_pretrained()
的第一个入参)的取值中出现.
,就会报ModuleNotFoundError
。现已更新huggingface hub的地址为sunzeyeah/pangu-2_6B
,可使用如下命令进行加载:tokenizer = AutoTokenizer.from_pretrained("sunzeyeah/pangu-2_6B", trust_remote_code=True)
谢谢!已经可以加载tokenizer和模型,但使用以下配置训练时 出现报错ValueError: Unexpected keyword arguments: hidden_states,layer_past,attention_mask,head_mask,custom_query
training_args = TrainingArguments(
save_total_limit=1,
output_dir=output_dir,
evaluation_strategy="steps",
eval_accumulation_steps=1,
learning_rate=learning_rate,
per_device_train_batch_size=train_batch_size,
per_device_eval_batch_size=eval_batch_size,
gradient_checkpointing=True,
half_precision_backend=True,
fp16=True,
adam_beta1=0.9,
adam_beta2=0.95,
gradient_accumulation_steps=gradient_accumulation_steps,
num_train_epochs=num_train_epochs,
warmup_steps=100,
eval_steps=eval_steps,
save_steps=save_steps,
load_best_model_at_end=True,
logging_steps=50,
deepspeed="./config.json",
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=dev_dataset,
compute_metrics=compute_metrics,
data_collator=default_data_collator,
preprocess_logits_for_metrics=preprocess_logits_for_metrics,
)
你好,由于
importlib
是根据.
来间隔module, 如果model_name_or_path
(即AutoTokenizer.from_pretrained()
的第一个入参)的取值中出现.
,就会报ModuleNotFoundError
。现已更新huggingface hub的地址为sunzeyeah/pangu-2_6B
,可使用如下命令进行加载:tokenizer = AutoTokenizer.from_pretrained("sunzeyeah/pangu-2_6B", trust_remote_code=True)谢谢!已经可以加载tokenizer和模型,但使用以下配置训练时 出现报错ValueError: Unexpected keyword arguments: hidden_states,layer_past,attention_mask,head_mask,custom_query
training_args = TrainingArguments( save_total_limit=1, output_dir=output_dir, evaluation_strategy="steps", eval_accumulation_steps=1, learning_rate=learning_rate, per_device_train_batch_size=train_batch_size, per_device_eval_batch_size=eval_batch_size, gradient_checkpointing=True, half_precision_backend=True, fp16=True, adam_beta1=0.9, adam_beta2=0.95, gradient_accumulation_steps=gradient_accumulation_steps, num_train_epochs=num_train_epochs, warmup_steps=100, eval_steps=eval_steps, save_steps=save_steps, load_best_model_at_end=True, logging_steps=50, deepspeed="./config.json", ) trainer = Trainer( model=model, args=training_args, train_dataset=train_dataset, eval_dataset=dev_dataset, compute_metrics=compute_metrics, data_collator=default_data_collator, preprocess_logits_for_metrics=preprocess_logits_for_metrics, )
你好,这个问题解决了吗,我也遇到了
你好,能否提供完整的报错日志以及启动脚本?