ariG23498 HF Staff commited on
Commit
675a7ea
·
verified ·
1 Parent(s): 1d5d2d2

Upload tencent_Youtu-VL-4B-Instruct_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. tencent_Youtu-VL-4B-Instruct_0.txt +58 -0
tencent_Youtu-VL-4B-Instruct_0.txt ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Use a pipeline as a high-level helper
3
+ from transformers import pipeline
4
+
5
+ pipe = pipeline("image-text-to-text", model="tencent/Youtu-VL-4B-Instruct", trust_remote_code=True)
6
+ messages = [
7
+ {
8
+ "role": "user",
9
+ "content": [
10
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
11
+ {"type": "text", "text": "What animal is on the candy?"}
12
+ ]
13
+ },
14
+ ]
15
+ pipe(text=messages)
16
+ ```
17
+
18
+ ERROR:
19
+ Traceback (most recent call last):
20
+ File "/tmp/tencent_Youtu-VL-4B-Instruct_04o0wIC.py", line 26, in <module>
21
+ pipe = pipeline("image-text-to-text", model="tencent/Youtu-VL-4B-Instruct", trust_remote_code=True)
22
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 836, in pipeline
23
+ model = load_model(
24
+ adapter_path if adapter_path is not None else model,
25
+ ...<4 lines>...
26
+ **model_kwargs,
27
+ )
28
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/pipelines/base.py", line 268, in load_model
29
+ raise ValueError(
30
+ f"Could not load model {model} with any of the following classes: {class_tuple}. See the original errors:\n\n{error}\n"
31
+ )
32
+ ValueError: Could not load model tencent/Youtu-VL-4B-Instruct with any of the following classes: (<class 'transformers.models.auto.modeling_auto.AutoModelForImageTextToText'>,). See the original errors:
33
+
34
+ while loading with AutoModelForImageTextToText, an error is thrown:
35
+ Traceback (most recent call last):
36
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/pipelines/base.py", line 232, in load_model
37
+ model = model_class.from_pretrained(model, **kwargs)
38
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 375, in from_pretrained
39
+ raise ValueError(
40
+ ...<2 lines>...
41
+ )
42
+ ValueError: Unrecognized configuration class <class 'transformers_modules.tencent.Youtu_hyphen_VL_hyphen_4B_hyphen_Instruct.f0cd60da8a235a408b268400acc0ab5954ca19a0.configuration_youtu_vl.YoutuVLConfig'> for this kind of AutoModel: AutoModelForImageTextToText.
43
+ Model type should be one of AriaConfig, AyaVisionConfig, BlipConfig, Blip2Config, ChameleonConfig, Cohere2VisionConfig, DeepseekVLConfig, DeepseekVLHybridConfig, Emu3Config, Ernie4_5_VL_MoeConfig, EvollaConfig, FastVlmConfig, Florence2Config, FuyuConfig, Gemma3Config, Gemma3nConfig, GitConfig, Glm46VConfig, Glm4vConfig, Glm4vMoeConfig, GotOcr2Config, IdeficsConfig, Idefics2Config, Idefics3Config, InstructBlipConfig, InstructBlipVideoConfig, InternVLConfig, JanusConfig, Kosmos2Config, Kosmos2_5Config, Lfm2VlConfig, LightOnOcrConfig, Llama4Config, LlavaConfig, LlavaNextConfig, LlavaNextVideoConfig, LlavaOnevisionConfig, Mistral3Config, MllamaConfig, Ovis2Config, PaddleOCRVLConfig, PaliGemmaConfig, PerceptionLMConfig, Pix2StructConfig, PixtralVisionConfig, Qwen2_5_VLConfig, Qwen2VLConfig, Qwen3VLConfig, Qwen3VLMoeConfig, ShieldGemma2Config, SmolVLMConfig, T5Gemma2Config, UdopConfig, VideoLlama3Config, VideoLlavaConfig, VipLlavaConfig, VisionEncoderDecoderConfig.
44
+
45
+ During handling of the above exception, another exception occurred:
46
+
47
+ Traceback (most recent call last):
48
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/pipelines/base.py", line 248, in load_model
49
+ model = model_class.from_pretrained(model, **fp32_kwargs)
50
+ File "/tmp/.cache/uv/environments-v2/6b4e7abd035cf45f/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 375, in from_pretrained
51
+ raise ValueError(
52
+ ...<2 lines>...
53
+ )
54
+ ValueError: Unrecognized configuration class <class 'transformers_modules.tencent.Youtu_hyphen_VL_hyphen_4B_hyphen_Instruct.f0cd60da8a235a408b268400acc0ab5954ca19a0.configuration_youtu_vl.YoutuVLConfig'> for this kind of AutoModel: AutoModelForImageTextToText.
55
+ Model type should be one of AriaConfig, AyaVisionConfig, BlipConfig, Blip2Config, ChameleonConfig, Cohere2VisionConfig, DeepseekVLConfig, DeepseekVLHybridConfig, Emu3Config, Ernie4_5_VL_MoeConfig, EvollaConfig, FastVlmConfig, Florence2Config, FuyuConfig, Gemma3Config, Gemma3nConfig, GitConfig, Glm46VConfig, Glm4vConfig, Glm4vMoeConfig, GotOcr2Config, IdeficsConfig, Idefics2Config, Idefics3Config, InstructBlipConfig, InstructBlipVideoConfig, InternVLConfig, JanusConfig, Kosmos2Config, Kosmos2_5Config, Lfm2VlConfig, LightOnOcrConfig, Llama4Config, LlavaConfig, LlavaNextConfig, LlavaNextVideoConfig, LlavaOnevisionConfig, Mistral3Config, MllamaConfig, Ovis2Config, PaddleOCRVLConfig, PaliGemmaConfig, PerceptionLMConfig, Pix2StructConfig, PixtralVisionConfig, Qwen2_5_VLConfig, Qwen2VLConfig, Qwen3VLConfig, Qwen3VLMoeConfig, ShieldGemma2Config, SmolVLMConfig, T5Gemma2Config, UdopConfig, VideoLlama3Config, VideoLlavaConfig, VipLlavaConfig, VisionEncoderDecoderConfig.
56
+
57
+
58
+