ariG23498 HF Staff commited on
Commit
40caeaf
·
verified ·
1 Parent(s): 4b2854b

Upload p-e-w_gemma-3-12b-it-heretic_1.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. p-e-w_gemma-3-12b-it-heretic_1.txt +65 -0
p-e-w_gemma-3-12b-it-heretic_1.txt ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Load model directly
3
+ from transformers import AutoProcessor, AutoModelForImageTextToText
4
+
5
+ processor = AutoProcessor.from_pretrained("p-e-w/gemma-3-12b-it-heretic")
6
+ model = AutoModelForImageTextToText.from_pretrained("p-e-w/gemma-3-12b-it-heretic")
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/938e0eb736d7250f/lib/python3.13/site-packages/transformers/image_processing_base.py", line 354, in get_image_processor_dict
31
+ resolved_image_processor_file = resolved_image_processor_files[0]
32
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
33
+ IndexError: list index out of range
34
+
35
+ During handling of the above exception, another exception occurred:
36
+
37
+ Traceback (most recent call last):
38
+ File "/tmp/p-e-w_gemma-3-12b-it-heretic_1wMo1OT.py", line 26, in <module>
39
+ processor = AutoProcessor.from_pretrained("p-e-w/gemma-3-12b-it-heretic")
40
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/models/auto/processing_auto.py", line 396, in from_pretrained
41
+ return processor_class.from_pretrained(
42
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
43
+ pretrained_model_name_or_path, trust_remote_code=trust_remote_code, **kwargs
44
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
+ )
46
+ ^
47
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/processing_utils.py", line 1394, in from_pretrained
48
+ args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
49
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/processing_utils.py", line 1453, in _get_arguments_from_pretrained
50
+ args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
51
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/models/auto/image_processing_auto.py", line 494, in from_pretrained
53
+ raise initial_exception
54
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/models/auto/image_processing_auto.py", line 476, in from_pretrained
55
+ config_dict, _ = ImageProcessingMixin.get_image_processor_dict(
56
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
57
+ pretrained_model_name_or_path, image_processor_filename=image_processor_filename, **kwargs
58
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
+ )
60
+ ^
61
+ File "/tmp/.cache/uv/environments-v2/938e0eb736d7250f/lib/python3.13/site-packages/transformers/image_processing_base.py", line 361, in get_image_processor_dict
62
+ raise OSError(
63
+ ...<4 lines>...
64
+ )
65
+ OSError: Can't load image processor for 'p-e-w/gemma-3-12b-it-heretic'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'p-e-w/gemma-3-12b-it-heretic' is the correct path to a directory containing a preprocessor_config.json file