You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
使用以下命令运行模型:
CUDA_VISIBLE_DEVICES=0 python -m fastchat.serve.cli --model-path /home/xx/ydd/Medical_LLM/MING-7B --max-new-token 512 --beam-size 3 --temperature 1.2
报错如下:
Loading checkpoint shards: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 535, in load_state_dict
return torch.load(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/torch/serialization.py", line 1258, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args) ValueError: could not convert string to float: 'ound. Redirecting to https://cdn-lfs.huggingface.co/repos/9a/8b/9a8b0806855567bc42061011ed21fcfa01efc1f28452196caf2714c0469ddbc1/3a76dc8f5351fef1c98664c09992f4d4236c649411455c1a9046cf1aff47116c?respon'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 544, in load_state_dict if f.read(7) == "version":
File "/data/miniconda3/envs/ming-main/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 1240: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/miniconda3/envs/ming-main/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/apps/ming-main/MING-main/fastchat/serve/cli.py", line 133, in
main(args)
File "/data/apps/ming-main/MING-main/fastchat/serve/cli.py", line 108, in main
chat_loop(args.model_path, args.device, args.num_gpus, args.max_gpu_memory,
File "/data/apps/ming-main/MING-main/fastchat/serve/inference.py", line 153, in chat_loop
model, tokenizer = load_model(model_path, device,
File "/data/apps/ming-main/MING-main/fastchat/serve/inference.py", line 83, in load_model
model = AutoModelForCausalLM.from_pretrained(model_path,
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 563, in from_pretrained
return model_class.from_pretrained(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3680, in from_pretrained
) = cls._load_pretrained_model(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4087, in _load_pretrained_model
state_dict = load_state_dict(shard_file, is_quantized=is_quantized)
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 556, in load_state_dict
raise OSError( OSError: Unable to load weights from pytorch checkpoint file for '/home/Medical_LLM/MING-7B/pytorch_model-00001-of-00004.bin' at '/home/Medical_LLM/MING-7B/pytorch_model-00001-of-00004.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
有没有大佬遇到这种问题,有无解决方法?谢谢!!
The text was updated successfully, but these errors were encountered:
使用以下命令运行模型:
CUDA_VISIBLE_DEVICES=0 python -m fastchat.serve.cli --model-path /home/xx/ydd/Medical_LLM/MING-7B --max-new-token 512 --beam-size 3 --temperature 1.2
报错如下:
Loading checkpoint shards: 0%| | 0/4 [00:00<?, ?it/s]Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 535, in load_state_dict
return torch.load(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/torch/serialization.py", line 1258, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
ValueError: could not convert string to float: 'ound. Redirecting to https://cdn-lfs.huggingface.co/repos/9a/8b/9a8b0806855567bc42061011ed21fcfa01efc1f28452196caf2714c0469ddbc1/3a76dc8f5351fef1c98664c09992f4d4236c649411455c1a9046cf1aff47116c?respon'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 544, in load_state_dict
if f.read(7) == "version":
File "/data/miniconda3/envs/ming-main/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 1240: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/miniconda3/envs/ming-main/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/miniconda3/envs/ming-main/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/apps/ming-main/MING-main/fastchat/serve/cli.py", line 133, in
main(args)
File "/data/apps/ming-main/MING-main/fastchat/serve/cli.py", line 108, in main
chat_loop(args.model_path, args.device, args.num_gpus, args.max_gpu_memory,
File "/data/apps/ming-main/MING-main/fastchat/serve/inference.py", line 153, in chat_loop
model, tokenizer = load_model(model_path, device,
File "/data/apps/ming-main/MING-main/fastchat/serve/inference.py", line 83, in load_model
model = AutoModelForCausalLM.from_pretrained(model_path,
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 563, in from_pretrained
return model_class.from_pretrained(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3680, in from_pretrained
) = cls._load_pretrained_model(
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 4087, in _load_pretrained_model
state_dict = load_state_dict(shard_file, is_quantized=is_quantized)
File "/data/miniconda3/envs/ming-main/lib/python3.9/site-packages/transformers/modeling_utils.py", line 556, in load_state_dict
raise OSError(
OSError: Unable to load weights from pytorch checkpoint file for '/home/Medical_LLM/MING-7B/pytorch_model-00001-of-00004.bin' at '/home/Medical_LLM/MING-7B/pytorch_model-00001-of-00004.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
有没有大佬遇到这种问题,有无解决方法?谢谢!!
The text was updated successfully, but these errors were encountered: