-
Notifications
You must be signed in to change notification settings - Fork 27
Description
File "/model-pvc/chenzhpeng01/inference/auto_fp8_q.py", line 22, in
model.save_quantized(quantized_model_dir)
File "/model-pvc/chenzhpeng01/inference/AutoFP8/auto_fp8/modeling.py", line 133, in save_quantized
save_quantized_model(
File "/model-pvc/chenzhpeng01/inference/AutoFP8/auto_fp8/quantize.py", line 341, in save_quantized_model
model.save_pretrained(save_dir)
File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py", line 2980, in save_pretrained
safe_save_file(shard, os.path.join(save_directory, shard_file), metadata={"format": "pt"})
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 286, in save_file
serialize_file(_flatten(tensors), filename, metadata=metadata)
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 496, in _flatten
return {
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 500, in
"data": _tobytes(v, k),
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 422, in _tobytes
tensor = tensor.to("cpu")
NotImplementedError: Cannot copy out of meta tensor; no data!
这个异常怎么解决?