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

openai_api.py调用的模型类型 #500

Open
wolfcx5 opened this issue Jun 20, 2024 · 1 comment
Open

openai_api.py调用的模型类型 #500

wolfcx5 opened this issue Jun 20, 2024 · 1 comment

Comments

@wolfcx5
Copy link

wolfcx5 commented Jun 20, 2024

请问 openai_api.py加载hf的模型cogvlm-grounding-generalist-v1.1失败,
再就是自己微调的sat模型可以用不?

Traceback (most recent call last):
File "/data/liuchx/CogVLM-main/openai_demo/openai_api.py", line 382, in
model = AutoModelForCausalLM.from_pretrained(
File "/home/ubuntu/anaconda3/envs/cx_cogvlm/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 550, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/home/ubuntu/anaconda3/envs/cx_cogvlm/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 501, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module)
File "/home/ubuntu/anaconda3/envs/cx_cogvlm/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 201, in get_class_in_module
module = importlib.machinery.SourceFileLoader(name, module_path).load_module()
File "", line 548, in _check_name_wrapper
File "", line 1063, in load_module
File "", line 888, in load_module
File "", line 290, in _load_module_shim
File "", line 719, in _load
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/.cache/huggingface/modules/transformers_modules/cogvlm-grounding-generalist-v1.1hf/modeling_cogvlm.py", line 19, in
from .visual import EVA2CLIPModel
ModuleNotFoundError: No module named 'transformers_modules.cogvlm-grounding-generalist-v1'

@wolfcx5
Copy link
Author

wolfcx5 commented Jun 21, 2024

hf的模型是因为我把文件夹的名改了,改回cogvlm-grounding-generalist-hf就好了,但是微调的模型怎么用啊

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

1 participant