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

demo load ck error #2

Open
changquanyou opened this issue May 19, 2024 · 1 comment
Open

demo load ck error #2

changquanyou opened this issue May 19, 2024 · 1 comment

Comments

@changquanyou
Copy link

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from PIL import Image
checkpoint = "qihoo360/360VL-8B"
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype=torch.float16, device_map='cuda', trust_remote_code=True).eval()
/home/users/xiongxinlei/.conda/envs/qwen/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File "", line 1, in
File "/home/users/xiongxinlei/.conda/envs/qwen/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 556, in from_pretrained
return model_class.from_pretrained(
File "/home/users/xiongxinlei/.conda/envs/qwen/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3375, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 631, in init
self.model = QH360_VL_LlamaModel(config)
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 622, in init
super(QH360_VL_LlamaModel, self).init(config)
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 448, in init
self.mm_projector_ctt = build_vision_projector(config)
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 422, in build_vision_projector
abstractor = build_honeybee_projector(honeybee_config,projector_type,num_tokens,lm_hidden_size)
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 399, in build_honeybee_projector
abstractor = {
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 284, in init
self.build_net()
File "/home/users/xiongxinlei/.cache/huggingface/modules/transformers_modules/360VL-8B/modeling_360vl.py", line 334, in build_net
depth = self.config.depth
File "/home/users/xiongxinlei/.conda/envs/qwen/lib/python3.10/site-packages/transformers/configuration_utils.py", line 265, in getattribute
return super().getattribute(key)
AttributeError: 'HoneybeeVisualProjectorConfig' object has no attribute 'depth'

@changquanyou
Copy link
Author

  1. 新增配置文件:visual_projector_config.json(config.json中的visual_projector_config内容)
  2. config.json 中更改配置: "mm_projector_config": "qihoo360/360VL-8B/visual_projector_config.json"

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