ariG23498 HF Staff commited on
Commit
a0fc024
·
verified ·
1 Parent(s): 44ca4bf

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

Browse files
Files changed (1) hide show
  1. tencent_Youtu-VL-4B-Instruct_1.txt +27 -0
tencent_Youtu-VL-4B-Instruct_1.txt ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Load model directly
3
+ from transformers import AutoModelForCausalLM
4
+ model = AutoModelForCausalLM.from_pretrained("tencent/Youtu-VL-4B-Instruct", trust_remote_code=True, dtype="auto")
5
+ ```
6
+
7
+ ERROR:
8
+ Traceback (most recent call last):
9
+ File "/tmp/tencent_Youtu-VL-4B-Instruct_1U3OsCc.py", line 25, in <module>
10
+ model = AutoModelForCausalLM.from_pretrained("tencent/Youtu-VL-4B-Instruct", trust_remote_code=True, dtype="auto")
11
+ File "/tmp/.cache/uv/environments-v2/33281116f25cd2ab/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 354, in from_pretrained
12
+ model_class = get_class_from_dynamic_module(
13
+ class_ref, pretrained_model_name_or_path, code_revision=code_revision, **hub_kwargs, **kwargs
14
+ )
15
+ File "/tmp/.cache/uv/environments-v2/33281116f25cd2ab/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 572, in get_class_from_dynamic_module
16
+ final_module = get_cached_module_file(
17
+ repo_id,
18
+ ...<7 lines>...
19
+ repo_type=repo_type,
20
+ )
21
+ File "/tmp/.cache/uv/environments-v2/33281116f25cd2ab/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 410, in get_cached_module_file
22
+ modules_needed = check_imports(resolved_module_file)
23
+ File "/tmp/.cache/uv/environments-v2/33281116f25cd2ab/lib/python3.13/site-packages/transformers/dynamic_module_utils.py", line 258, in check_imports
24
+ raise ImportError(
25
+ ...<2 lines>...
26
+ )
27
+ ImportError: This modeling file requires the following packages that were not found in your environment: cv2, pydensecrf. Run `pip install cv2 pydensecrf`