THUDM / ChatGLM-6B

ChatGLM-6B: An Open Bilingual Dialogue Language Model | 开源双语对话语言模型
Apache License 2.0
39.96k stars 5.15k forks source link

[BUG/Help] <ChatGLM-6B做P-tuning-v2时无法保留权重参数pytorch_model.bin> #1447

Open SKURA502 opened 5 months ago

SKURA502 commented 5 months ago

Is there an existing issue for this?

Current Behavior

日志中显示成功保存参数pytorch_model.bin: image 但文档中找不到模型权重参数: image 运行inference.py时报错: 1facb0bc1fe16b2ede94c6de44f2e30

Expected Behavior

No response

Steps To Reproduce

train.sh: PRE_SEQ_LEN=128 LR=2e-2 NUM_GPUS=1

CUDA_VISIBLE_DEVICES=1 python main.py \ --do_train \ --train_file /home/ns/chatbot/ChatGLM2-6B/ptuning/Chinese-medical-dialogue-data-master/train.json \ --validation_file /home/ns/chatbot/ChatGLM2-6B/ptuning/Chinese-medical-dialogue-data-master/dev.json \ --preprocessing_num_workers 10 \ --prompt_column context \ --response_column target \ --overwrite_cache \ --model_name_or_path /home/ns/chatbot/ChatGLM2-6B/chatglm2-6b \ --output_dir output/adgen-chatglm2-6b-pt-$PRE_SEQ_LEN-$LR \ --overwrite_output_dir \ --max_source_length 64 \ --max_target_length 128 \ --per_device_train_batch_size 1 \ --per_device_eval_batch_size 1 \ --gradient_accumulation_steps 16 \ --predict_with_generate \ --max_steps 3000 \ --logging_steps 10 \ --save_steps 10 \ --learning_rate $LR \ --pre_seq_len $PRE_SEQ_LEN \ --quantization_bit 4

Environment

- OS:win11
- Python:Python 3.8.16
- Transformers:4.36.2
- PyTorch:2.1.2
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) : True

Anything else?

No response

annpion commented 5 months ago

transformers==4.30.2