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

QLora微调Chatglm3-6b-chat时报错:TypeError: ChatGLMPreTrainedModel._set_gradient_checkpointing() got an unexpected keyword argument 'enable' #3316

Closed
1 task done
Shuming-Cheng opened this issue Apr 17, 2024 · 1 comment
Labels
solved This problem has been already solved

Comments

@Shuming-Cheng
Copy link

Reminder

  • I have read the README and searched the existing issues.

Reproduction

CUDA_VISIBLE_DEVICES=0 python src/train_bash.py
--stage sft
--do_train True
--model_name_or_path /home/csm/Csm_Workspace/Chatglm3-6b_finetuning/model
--finetuning_type lora
--quantization_bit 4
--template chatglm3
--dataset_dir data
--dataset alpaca_zh
--cutoff_len 1024
--learning_rate 5e-05
--num_train_epochs 5.0
--max_samples 100000
--per_device_train_batch_size 2
--gradient_accumulation_steps 8
--lr_scheduler_type cosine
--max_grad_norm 1.0
--logging_steps 5
--save_steps 100
--warmup_steps 0
--optim adamw_torch
--report_to none
--output_dir saves/ChatGLM3-6B-Chat/lora/train_2024-04-17-00-33-31
--fp16 True
--lora_rank 8
--lora_alpha 16
--lora_dropout 0.1
--lora_target query_key_value
--plot_loss True

Expected behavior

在web网页下微调Chatglm3-6b时报错,报错信息为:TypeError: ChatGLMPreTrainedModel._set_gradient_checkpointing() got an unexpected keyword argument 'enable'。已经按照上一个issue的回复重新在modelscope平台下载了最新的v1.0.0版本的chatglm3进行尝试,也试过v1.0.2版本的,报错信息还是一样。

System Info

transformers version: 4.37.2
Platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.31
Python version: 3.11.7
Huggingface_hub version: 0.22.2
Safetensors version: 0.4.2
Accelerate version: 0.28.0
Accelerate config: not found
PyTorch version (GPU?): 2.1.2+cu121 (True)
Tensorflow version (GPU?): not installed (NA)
Flax version (CPU?/GPU?/TPU?): not installed (NA)
Jax version: not installed
JaxLib version: not installed
Using GPU in script?:
Using distributed or parallel set-up in script?:

Others

No response

@hiyouga
Copy link
Owner

hiyouga commented Apr 17, 2024

已修复

@hiyouga hiyouga added the solved This problem has been already solved label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants