Chinese-Vicuna icon indicating copy to clipboard operation
Chinese-Vicuna copied to clipboard

NotImplementedError: Cannot copy out of meta tensor; no data!

Open greatewei opened this issue 1 year ago • 0 comments

想要在原来的lora基础上进行数据增量训练,data.json有3000条左右数据 运行命令:

python finetune.py \
--data_path /data/chat/Chinese-Vicuna/data/data.json \
--output_path /data/chat/models/llama_lora/llama-7b-yy-lora \
--model_path /data/chat/models/llama_base/llama-7b-hf  \
--eval_steps 200 \
--save_steps 200 \
--test_size 1 \
--resume_from_checkpoint /data/chat/models/llama_lora/Chinese-Vicuna-lora-7b-belle-and-guanaco \
--ignore_data_skip True

错误内容:

File "/data/chat/Chinese-Vicuna/finetune.py", line 235, in trainer = transformers.Trainer( File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/transformers/trainer.py", line 498, in init self._move_model_to_device(model, args.device) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/transformers/trainer.py", line 740, in _move_model_to_device model = model.to(device) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1145, in to return self._apply(convert) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) [Previous line repeated 5 more times] File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 820, in _apply param_applied = fn(param) File "/root/anaconda3/envs/python3.9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1143, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) NotImplementedError: Cannot copy out of meta tensor; no data!

求大佬帮忙看看

greatewei avatar Apr 17 '23 15:04 greatewei