Skip to content
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

请问目前是仅支持lora和qlora微调吗,全参数微调后续会开放吗? #257

Open
CUCldyyyyy opened this issue Apr 12, 2024 · 3 comments

Comments

@CUCldyyyyy
Copy link

谢谢各位作者优秀的工作!
请问各位author有没有做过实验评估全参数微调和peft后的模型性能各自怎么样呢?希望解惑~~

@CUCldyyyyy
Copy link
Author

CUCldyyyyy commented Apr 12, 2024

已经找到全参数微调的脚本了,运行时报错参数不匹配,请问是什么原因呢?
Traceback (most recent call last): File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 165, in <module> train() File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 142, in train run_sft( File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 51, in run_sft dataset = preprocess_dataset(dataset, tokenizer, data_args, training_args, "sft") TypeError: preprocess_dataset() takes 4 positional arguments but 5 were given

这是我的脚本设置:

deepspeed --num_gpus 8 dbgpt_hub/train/sft_train.py
--dataset example_text2sql_train
--model_name_or_path /cfs-3xKdVIAptM/base_model/CodeLlama-13b-Instruct-hf
--do_train
--finetuning_type full
--max_source_length 2048
--max_target_length 512
--template llama2
--output_dir dbgpt_hub/output/adapter/CodeLlama-13b-sql-full
--overwrite_cache
--overwrite_output_dir
--per_device_train_batch_size 4
--gradient_accumulation_steps 16
--lr_scheduler_type cosine_with_restarts
--logging_steps 50
--learning_rate 2e-5
--num_train_epochs 4
--plot_loss
--bf16 false
--deepspeed dbgpt_hub/configs/ds_config.json 2>&1 | tee ${train_log}

@Kudou-Chitose
Copy link

Kudou-Chitose commented May 21, 2024

已经找到全参数微调的脚本了,运行时报错参数不匹配,请问是什么原因呢? Traceback (most recent call last): File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 165, in <module> train() File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 142, in train run_sft( File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 51, in run_sft dataset = preprocess_dataset(dataset, tokenizer, data_args, training_args, "sft") TypeError: preprocess_dataset() takes 4 positional arguments but 5 were given

这是我的脚本设置:

deepspeed --num_gpus 8 dbgpt_hub/train/sft_train.py --dataset example_text2sql_train --model_name_or_path /cfs-3xKdVIAptM/base_model/CodeLlama-13b-Instruct-hf --do_train --finetuning_type full --max_source_length 2048 --max_target_length 512 --template llama2 --output_dir dbgpt_hub/output/adapter/CodeLlama-13b-sql-full --overwrite_cache --overwrite_output_dir --per_device_train_batch_size 4 --gradient_accumulation_steps 16 --lr_scheduler_type cosine_with_restarts --logging_steps 50 --learning_rate 2e-5 --num_train_epochs 4 --plot_loss --bf16 false --deepspeed dbgpt_hub/configs/ds_config.json 2>&1 | tee ${train_log}

今天碰到了同样的问题。检查后发现是前面跟着3.2 Quick Start执行了pip install dbgpt-hub命令,而pip版本里的preprocess_dataset()函数和现在的不一致。所以执行from dbgpt_hub.data_process.data_utils import xxx的时候实际上引用了旧的package。pip uninstall dbgpt-hub应该就可以了。

@CUCldyyyyy
Copy link
Author

已经找到全参数微调的脚本了,运行时报错参数不匹配,请问是什么原因呢? Traceback (most recent call last): File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 165, in <module> train() File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 142, in train run_sft( File "/cfs-3xKdVIAptM/LDY/DB-GPT-Hub/dbgpt_hub/train/sft_train.py", line 51, in run_sft dataset = preprocess_dataset(dataset, tokenizer, data_args, training_args, "sft") TypeError: preprocess_dataset() takes 4 positional arguments but 5 were given
这是我的脚本设置:
deepspeed --num_gpus 8 dbgpt_hub/train/sft_train.py --dataset example_text2sql_train --model_name_or_path /cfs-3xKdVIAptM/base_model/CodeLlama-13b-Instruct-hf --do_train --finetuning_type full --max_source_length 2048 --max_target_length 512 --template llama2 --output_dir dbgpt_hub/output/adapter/CodeLlama-13b-sql-full --overwrite_cache --overwrite_output_dir --per_device_train_batch_size 4 --gradient_accumulation_steps 16 --lr_scheduler_type cosine_with_restarts --logging_steps 50 --learning_rate 2e-5 --num_train_epochs 4 --plot_loss --bf16 false --deepspeed dbgpt_hub/configs/ds_config.json 2>&1 | tee ${train_log}

今天碰到了同样的问题。检查后发现是前面跟着3.2 Quick Start执行了pip install dbgpt-hub命令,而pip版本里的preprocess_dataset()函数和现在的不一致。所以执行from dbgpt_hub.data_process.data_utils import xxx的时候实际上引用了旧的package。pip uninstall dbgpt-hub应该就可以了。

谢谢🙏我当时把最后的sft参数注释掉了也work了:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants