Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoModel.from_pretrained()里面不能加载hf版本的权重吗 #169

Open
AlenjandroWang opened this issue Feb 4, 2024 · 1 comment
Open

Comments

@AlenjandroWang
Copy link

File "demo.py", line 44, in
model, model_args =AutoModel.from_pretrained('/code/CogVLM-main/vicuna-7b-v1.5', args=argparse.Namespace(
File "/opt/conda/lib/python3.8/site-packages/sat/model/base_model.py", line 337, in from_pretrained
return cls.from_pretrained_base(name, args=args, home_path=home_path, url=url, prefix=prefix, build_only=build_only, overwrite_args=overwrite_args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/sat/model/base_model.py", line 318, in from_pretrained_base
args = update_args_with_file(args, path=os.path.join(model_path, 'model_config.json'))
File "/opt/conda/lib/python3.8/site-packages/sat/arguments.py", line 454, in update_args_with_file
with open(path, 'r', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/code/CogVLM-main/vicuna-7b-v1.5/model_config.json'

@1049451037
Copy link
Member

不能,如果想加载可以先转换成sat格式:https://github.com/THUDM/SwissArmyTransformer/tree/main/examples/llama

transform_param.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants