-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transformers 4.38.2不支持starcoder2的加载 #2762
Labels
solved
This problem has been already solved
Comments
pip install git+https://github.com/huggingface/transformers.git |
想问下题主问题解决了吗? |
同样问题 |
需要升级到 4.39.0.dev0 |
按照这个修改了么 huggingface/trl#1415 |
运行成功了 感谢! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reminder
Reproduction
torchrun --nnodes 1 --master_port 25000 --nproc_per_node 8 src/train_bash.py
--stage sft
--do_train
--model_name_or_path /home/starcoder2-7b/
--dataset alpaca_zh
--template default
--finetuning_type lora
--lora_target q_proj,v_proj
--output_dir out/starcoder2
--overwrite_cache
--per_device_train_batch_size 4
--gradient_accumulation_steps 4
--lr_scheduler_type cosine
--logging_steps 10
--save_steps 1000
--learning_rate 5e-5
--num_train_epochs 3.0
--plot_loss
--fp16
--ddp_find_unused_parameters False
--ddp_timeout 30000
--deepspeed /opt/third_party/LLaMA-Factory/scripts/zero2.json
Expected behavior
Traceback (most recent call last):
File "src/train_bash.py", line 14, in
main()
File "src/train_bash.py", line 5, in main
run_exp()
File "/opt/third_party/LLaMA-Factory/src/llmtuner/train/tuner.py", line 32, in run_exp
run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
File "/opt/third_party/LLaMA-Factory/src/llmtuner/train/sft/workflow.py", line 34, in run_sft
model = load_model(tokenizer, model_args, finetuning_args, training_args.do_train)
File "/opt/third_party/LLaMA-Factory/src/llmtuner/model/loader.py", line 63, in load_model
config = AutoConfig.from_pretrained(model_args.model_name_or_path, **init_kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/models/auto/configuration_auto.py", line 1130, in from_pretrained
raise ValueError(
ValueError: The checkpoint you are trying to load has model type
starcoder2
but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.System Info
No response
Others
No response
The text was updated successfully, but these errors were encountered: