hiyouga / ChatGLM-Efficient-Tuning

Fine-tuning ChatGLM-6B with PEFT | 基于 PEFT 的高效 ChatGLM 微调
Apache License 2.0
3.67k stars 473 forks source link

p-tuning之后加载模型进行推理一直显示报错The device_map provided does not give any device for the following parameters: transformer.prefix_encoder.embedding.weight #318

Closed DRZJ1 closed 1 year ago

DRZJ1 commented 1 year ago

ubuntu@ip-172-31-72-127:~$ python3 /home/ubuntu/ChatGLM-Efficient-Tuning/src/cli_demo.py \

--checkpoint_dir /home/ubuntu/p-t-chatglm2v3_\
--model_name_or_path /home/ubuntu/chatglm2_v3\
--use_v2 \
--tokenizer_name /home/ubuntu/p-t-chatglm2v3_\
--finetuning_type p_tuning

===================================BUG REPORT=================================== Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues

CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 8.6 CUDA SETUP: Detected CUDA version 118 CUDA SETUP: Loading binary /home/ubuntu/.local/lib/python3.8/site-packages/bitsandbytes/libbitsandbytes_cuda118.so... 2023-07-19 02:43:26.106989: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-07-19 02:43:26.821407: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:07<00:00, 1.90it/s] Some weights of the model checkpoint at /home/ubuntu/chatglm2_v3 were not used when initializing ChatGLMForConditionalGeneration: ['lm_head.weight']

hiyouga commented 1 year ago

已修复,请更新代码后重试