[ERROR] safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer

#3
by luckychao - opened

Hi there :)

[root] Loading local model /mnt/petrelfs/share_data/quxiaoye/models/QVQ-72B-Preview
`Qwen2VLRotaryEmbedding` can now be fully parameterized by passing the model config through the `config` argument. All other arguments will be removed in v4.46

Loading checkpoint shards:   0%|          | 0/38 [00:00<?, ?it/s]
Loading checkpoint shards:   3%|β–Ž         | 1/38 [00:04<02:37,  4.26s/it]
Loading checkpoint shards:   3%|β–Ž         | 1/38 [00:04<02:37,  4.26s/it]
Traceback (most recent call last):
...
  File "generate_response.py", line 57, in main
    model = qwen.Qwen_Model(args.model_path, temperature=args.temperature, max_tokens=args.max_tokens)
  File "qwen.py", line 58, in __init__
    self.model = Qwen2VLForConditionalGeneration.from_pretrained(self.model_path, torch_dtype=torch.bfloat16,
  File "/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4225, in from_pretrained
    ) = cls._load_pretrained_model(
  File "lib/python3.9/site-packages/transformers/modeling_utils.py", line 4706, in _load_pretrained_model
    state_dict = load_state_dict(
  File "lib/python3.9/site-packages/transformers/modeling_utils.py", line 555, in load_state_dict
    with safe_open(checkpoint_file, framework="pt") as f:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer

When using Transformers to load the QVQ-72B model, the error occurred. There is no problem with my code and environment loading the qwen2-vl-72b model.

Environment:

python 3.9
torch 2.4.0+cu118
transformers 4.46.1

Thanks for the reply!

Sign up or log in to comment