InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

Open yangtao-git opened this issue 1 year ago • 2 comments

/root/miniconda3/envs/internvl/lib/python3.9/site-packages/transformers/generation/configuration_utils.py:397: UserWarning: do_sample is set to False. However, top_p is set to None -- this flag is only used in sample-based generation modes. You should set do_sample=True or unset top_p. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed. warnings.warn( Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s] Traceback (most recent call last): File "/yangtao/programs/adv2/InternVL/main.py", line 87, in model = AutoModel.from_pretrained( File "/root/miniconda3/envs/internvl/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 561, in from_pretrained return model_class.from_pretrained( File "/root/miniconda3/envs/internvl/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3850, in from_pretrained ) = cls._load_pretrained_model( File "/root/miniconda3/envs/internvl/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4259, in _load_pretrained_model state_dict = load_state_dict(shard_file) File "/root/miniconda3/envs/internvl/lib/python3.9/site-packages/transformers/modeling_utils.py", line 506, in load_state_dict with safe_open(checkpoint_file, framework="pt") as f: safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

When I call the v1.5-4b model, there is no problem, but when I call the v2-4b model, I get an error, how to solve this problem?

yangtao-git avatar Jul 08 '24 07:07 yangtao-git

It is recommended to strictly follow the environment setup of version 2.0, especially the version of transformers. Additionally, please use the latest code.

ErfeiCui avatar Jul 24 '24 09:07 ErfeiCui

Can you provide your code and environment information so that we can reproduce this problem?

czczup avatar Jul 31 '24 07:07 czczup

This question has not been updated for more than two weeks. This question may be solved. So I close it temporarily. If necessary, please reopen it.

whai362 avatar Aug 18 '24 08:08 whai362