ariG23498 HF Staff commited on
Commit
ec1cf49
·
verified ·
1 Parent(s): 58186a2

Upload ServiceNow-AI_Apriel-1.6-15b-Thinker_2.txt with huggingface_hub

Browse files
ServiceNow-AI_Apriel-1.6-15b-Thinker_2.txt ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Load model directly
3
+ from transformers import AutoProcessor, AutoModelForVision2Seq
4
+
5
+ processor = AutoProcessor.from_pretrained("ServiceNow-AI/Apriel-1.6-15b-Thinker")
6
+ model = AutoModelForVision2Seq.from_pretrained("ServiceNow-AI/Apriel-1.6-15b-Thinker")
7
+ messages = [
8
+ {
9
+ "role": "user",
10
+ "content": [
11
+ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
12
+ {"type": "text", "text": "What animal is on the candy?"}
13
+ ]
14
+ },
15
+ ]
16
+ inputs = processor.apply_chat_template(
17
+ messages,
18
+ add_generation_prompt=True,
19
+ tokenize=True,
20
+ return_dict=True,
21
+ return_tensors="pt",
22
+ ).to(model.device)
23
+
24
+ outputs = model.generate(**inputs, max_new_tokens=40)
25
+ print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
26
+ ```
27
+
28
+ ERROR:
29
+ Traceback (most recent call last):
30
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 402, in hf_raise_for_status
31
+ response.raise_for_status()
32
+ ~~~~~~~~~~~~~~~~~~~~~~~~~^^
33
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
34
+ raise HTTPError(http_error_msg, response=self)
35
+ requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker/resolve/main/config.json
36
+
37
+ The above exception was the direct cause of the following exception:
38
+
39
+ Traceback (most recent call last):
40
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/utils/hub.py", line 479, in cached_files
41
+ hf_hub_download(
42
+ ~~~~~~~~~~~~~~~^
43
+ path_or_repo_id,
44
+ ^^^^^^^^^^^^^^^^
45
+ ...<10 lines>...
46
+ local_files_only=local_files_only,
47
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
+ )
49
+ ^
50
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
51
+ return fn(*args, **kwargs)
52
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1007, in hf_hub_download
53
+ return _hf_hub_download_to_cache_dir(
54
+ # Destination
55
+ ...<14 lines>...
56
+ force_download=force_download,
57
+ )
58
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1114, in _hf_hub_download_to_cache_dir
59
+ _raise_on_head_call_error(head_call_error, force_download, local_files_only)
60
+ ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1655, in _raise_on_head_call_error
62
+ raise head_call_error
63
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1543, in _get_metadata_or_catch_error
64
+ metadata = get_hf_file_metadata(
65
+ url=url, proxies=proxies, timeout=etag_timeout, headers=headers, token=token, endpoint=endpoint
66
+ )
67
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
68
+ return fn(*args, **kwargs)
69
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1460, in get_hf_file_metadata
70
+ r = _request_wrapper(
71
+ method="HEAD",
72
+ ...<5 lines>...
73
+ timeout=timeout,
74
+ )
75
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 283, in _request_wrapper
76
+ response = _request_wrapper(
77
+ method=method,
78
+ ...<2 lines>...
79
+ **params,
80
+ )
81
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 307, in _request_wrapper
82
+ hf_raise_for_status(response)
83
+ ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
84
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 419, in hf_raise_for_status
85
+ raise _format(GatedRepoError, message, response) from e
86
+ huggingface_hub.errors.GatedRepoError: 403 Client Error. (Request ID: Root=1-69367b45-46447d2646b8d7a22e239115;863aa342-3d51-4e2a-b103-ccb23c9e8932)
87
+
88
+ Cannot access gated repo for url https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker/resolve/main/config.json.
89
+ Access to model ServiceNow-AI/Apriel-1.6-15b-Thinker is restricted and you are not in the authorized list. Visit https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker to ask for access.
90
+
91
+ The above exception was the direct cause of the following exception:
92
+
93
+ Traceback (most recent call last):
94
+ File "/tmp/ServiceNow-AI_Apriel-1.6-15b-Thinker_2JvjQmc.py", line 26, in <module>
95
+ processor = AutoProcessor.from_pretrained("ServiceNow-AI/Apriel-1.6-15b-Thinker")
96
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/models/auto/processing_auto.py", line 363, in from_pretrained
97
+ config = AutoConfig.from_pretrained(
98
+ pretrained_model_name_or_path, trust_remote_code=trust_remote_code, **kwargs
99
+ )
100
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/models/auto/configuration_auto.py", line 1332, in from_pretrained
101
+ config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
102
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/configuration_utils.py", line 662, in get_config_dict
104
+ config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
105
+ ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/configuration_utils.py", line 721, in _get_config_dict
107
+ resolved_config_file = cached_file(
108
+ pretrained_model_name_or_path,
109
+ ...<10 lines>...
110
+ _commit_hash=commit_hash,
111
+ )
112
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/utils/hub.py", line 322, in cached_file
113
+ file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
114
+ File "/tmp/.cache/uv/environments-v2/59a0ac8d7c89dba9/lib/python3.13/site-packages/transformers/utils/hub.py", line 543, in cached_files
115
+ raise OSError(
116
+ ...<2 lines>...
117
+ ) from e
118
+ OSError: You are trying to access a gated repo.
119
+ Make sure to have access to it at https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker.
120
+ 403 Client Error. (Request ID: Root=1-69367b45-46447d2646b8d7a22e239115;863aa342-3d51-4e2a-b103-ccb23c9e8932)
121
+
122
+ Cannot access gated repo for url https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker/resolve/main/config.json.
123
+ Access to model ServiceNow-AI/Apriel-1.6-15b-Thinker is restricted and you are not in the authorized list. Visit https://huggingface.co/ServiceNow-AI/Apriel-1.6-15b-Thinker to ask for access.