THUDM / CogVLM

a state-of-the-art-level open visual language model | 多模态预训练模型
Apache License 2.0
6.14k stars 420 forks source link

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

Open wolfcx5 opened 5 months ago

wolfcx5 commented 5 months ago

请问 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 commented 5 months ago

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