Chinese-LLaMA-Alpaca icon indicating copy to clipboard operation
Chinese-LLaMA-Alpaca copied to clipboard

合并13B模型时报错

Open jayecho51 opened this issue 3 years ago • 5 comments

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

CUDA SETUP: CUDA runtime path found: /home/sd/miniconda3/envs/textgen1/lib/libcudart.so CUDA SETUP: Highest compute capability among GPUs detected: 7.5 CUDA SETUP: Detected CUDA version 117 CUDA SETUP: Loading binary /home/sd/miniconda3/envs/textgen1/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda117.so... Loading checkpoint shards: 100%|██████████████████████████████████████████| 3/3 [03:19<00:00, 66.39s/it] Traceback (most recent call last): File "/home/sd/cctext2023/chinese-LLaMA/Chinese-LLaMA-Alpaca/scripts/merge_llama_with_chinese_lora.py", line 41, in base_model = LlamaForCausalLM.from_pretrained( File "/home/sd/miniconda3/envs/textgen1/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2787, in from_pretrained dispatch_model(model, device_map=device_map, offload_dir=offload_folder, offload_index=offload_index) TypeError: dispatch_model() got an unexpected keyword argument 'offload_index' 指定了offload_dir,猜测是不是机器内存不够导致的,机器内存32g

jayecho51 avatar Apr 11 '23 06:04 jayecho51

从你的log中看似是把GPU也用上了。 转13B模型(使用offload)的话RAM需要26-27G(也就是模型本身大小)。 我们的colab notebook转换是没出现这个问题的,不知道是不是你的机器可用内存不够导致的。

ymcui avatar Apr 11 '23 06:04 ymcui

32g机器按理说够了啊- -

jayecho51 avatar Apr 11 '23 07:04 jayecho51

如果内存够,可以试试不指定offload_dir; 此外,请升级accelerate版本再试试

airaria avatar Apr 11 '23 07:04 airaria

我这边有offload大概29G,没有38G

Sped0n0ld avatar Apr 11 '23 11:04 Sped0n0ld

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.

github-actions[bot] avatar Apr 20 '23 00:04 github-actions[bot]

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.

github-actions[bot] avatar May 14 '23 22:05 github-actions[bot]

我也遇到这个问题,通过 pip install accelerate==0.18.0 解决了

iamhere1 avatar May 30 '23 11:05 iamhere1