Traceback (most recent call last):
File "/root/aaa/ChatGPTBook/PromptProj/train.py", line 261, in
main()
File "/root/aaa/ChatGPTBook/PromptProj/train.py", line 257, in main
train(model, device, train_data, test_data, args, tokenizer)
File "/root/aaa/ChatGPTBook/PromptProj/train.py", line 140, in train
model_to_save.save_pretrained(output_dir)
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2376, in save_pretrained
safe_save_file(shard, os.path.join(save_directory, shard_file), metadata={"format": "pt"})
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/safetensors/torch.py", line 281, in save_file
serialize_file(_flatten(tensors), filename, metadata=metadata)
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/safetensors/torch.py", line 460, in _flatten
shared_pointers = _find_shared_tensors(tensors)
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/safetensors/torch.py", line 72, in _find_shared_tensors
if v.device != torch.device("meta") and storage_ptr(v) != 0 and storage_size(v) != 0:
RuntimeError: Expected one of cpu, cuda, xpu, mkldnn, opengl, opencl, ideep, hip, msnpu, xla, vulkan device type at start of device string: meta