ChatGLM-Efficient-Tuning
ChatGLM-Efficient-Tuning copied to clipboard
加载chatgml2-int4版本出错
使用的是 sh alter_cog_chatglm2.sh
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5 python ../src/train_sft.py
--model_name_or_path "THUDM/chatglm2-6b-int4"
--use_v2
--do_train
--dataset electric
--dataset_dir ../data
--finetuning_type lora
--output_dir simple_one_path_to_sft_checkpoint
--overwrite_cache
--per_device_train_batch_size 1
--gradient_accumulation_steps 2
--lr_scheduler_type cosine
--logging_steps 10
--max_source_length 11080
--max_target_length 11080
--save_steps 1000
--warmup_steps 0
--learning_rate 0.0002
--num_train_epochs 1200.0
--fp16
使用以上的参数进行多个GPU量化训练,目的是使得我的文本长度增长。不清楚这样设置有没有问题。
不过设置完事之后就报错了:信息如下:
Traceback (most recent call last):
File "/home/lizhangming/lizhangmingwork/projects/bigmodel/Ling-ChatGLM-Efficient-Tuning-main/examples/../src/train_sft.py", line 105, in
不能直接加载 int4 模型,需要使用原版 fp16 模型和量化参数
不能直接加载 int4 模型,需要使用原版 fp16 模型和量化参数
是这样写吗? --quantization_bit=4 此外 --fp16这个要不要写上呢?
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5 python ../src/train_sft.py
--model_name_or_path "THUDM/chatglm2-6b"
--use_v2
--quantization_bit=4
--do_train
--dataset electric
--dataset_dir ../data
--finetuning_type lora
--output_dir simple_one_path_to_sft_checkpoint
--overwrite_cache
--per_device_train_batch_size 1
--gradient_accumulation_steps 2
--lr_scheduler_type cosine
--logging_steps 10
--max_source_length 11080
--max_target_length 11080
--save_steps 1000
--warmup_steps 0
--learning_rate 0.0002
--num_train_epochs 1200.0
--fp16
--quantization_bit=4 和 --fp16 都要加