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

url = MODEL_URLS[name] KeyError #378

Closed
Baggiorobertozoba opened this issue Feb 11, 2024 · 1 comment
Closed

url = MODEL_URLS[name] KeyError #378

Baggiorobertozoba opened this issue Feb 11, 2024 · 1 comment

Comments

@Baggiorobertozoba
Copy link

After running this command in Google Colab:

!python cli_demo_sat.py --from_pretrained /content/drive/MyDrive/MyProject/CogVLM/cogvlm-chat-v1.1/1/mp_rank_00_model_states.pt --fp16 --quant 4 --stream_chat

I receive the following error:

[2024-02-11 00:28:23,218] [INFO] [real_accelerator.py:191:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Please build and install Nvidia apex package with option '--cuda_ext' according to https://github.com/NVIDIA/apex#from-source .
Traceback (most recent call last):
File "/content/CogVLM/basic_demo/cli_demo_sat.py", line 161, in
main()
File "/content/CogVLM/basic_demo/cli_demo_sat.py", line 36, in main
model, model_args = AutoModel.from_pretrained(
File "/usr/local/lib/python3.10/dist-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 "/usr/local/lib/python3.10/dist-packages/sat/model/base_model.py", line 312, in from_pretrained_base
model_path = auto_create(name, path=home_path, url=url)
File "/usr/local/lib/python3.10/dist-packages/sat/resources/download.py", line 53, in auto_create
url = MODEL_URLS[name]
KeyError: '/content/drive/MyDrive/MyProject/CogVLM/cogvlm-chat-v1.1/1/mp_rank_00_model_states.pt'

The .pt file should be the sat version so I am not sure why its not working.

@1049451037
Copy link
Member

try this:

!python cli_demo_sat.py --from_pretrained /content/drive/MyDrive/MyProject/CogVLM/cogvlm-chat-v1.1 --fp16 --quant 4 --stream_chat

or

!SAT_HOME=/content/drive/MyDrive/MyProject/CogVLM python cli_demo_sat.py --from_pretrained cogvlm-chat-v1.1 --fp16 --quant 4 --stream_chat

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