futureHQ commited on
Commit
7e7d945
·
verified ·
1 Parent(s): ba1326f

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ .ipynb_checkpoints/tokenizer-checkpoint.json filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
.ipynb_checkpoints/README-checkpoint.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/gemma-3-27b-it
3
+ library_name: peft
4
+ license: gemma
5
+ ---
6
+
7
+ # LOGIC-27B
8
+
9
+ LOGIC Framework (Lay Out Problem, Options, Groundwork, Inference, Conclusion)
10
+
11
+ Example Output
12
+ ```xml
13
+ <layOutProblem>
14
+ Explain the problem or question in detail.
15
+ </layOutProblem>
16
+
17
+ <options>
18
+ List different strategies or paths you might take to solve the problem.
19
+ </options>
20
+
21
+ <groundwork>
22
+ Note important facts, formulas, or references needed. Establish constraints.
23
+ </groundwork>
24
+
25
+ <inference>
26
+ Perform detailed reasoning or computations. Validate steps or check for errors.
27
+ </inference>
28
+
29
+ <conclusion>
30
+ Present the clear answer or outcome.
31
+ </conclusion>
32
+ ```
33
+
34
+ Why Use LOGIC?
35
+ Emphasizes exploring multiple options.
36
+ Encourages building a strong groundwork of facts or constraints.
37
+ Includes inference to handle the step-by-step thinking process.
38
+ Ends with a conclusion that ties it all together.
39
+
40
+
41
+
42
+ ### Model Details
43
+ - **Model Name:** Bifröst-27B
44
+ - **Base Architecture:** gemma3
45
+ - **Application:** Reasoning using LOGIC Framework
46
+ - **Release Date:** 16-March-2025
47
+
48
+ ```python
49
+ system_prompt = \
50
+ f"""You are given a problem.
51
+ You are LOGIC
52
+ Always follow the format
53
+ layOutProblem
54
+ options
55
+ groundwork
56
+ inference
57
+ conclusion
58
+
59
+ Explain the problem or question in detail.
60
+ Place it between <layOutProblem> and </layOutProblem>
61
+
62
+ List different strategies or paths you might take to solve the problem.
63
+ Place it between <options> and </options>
64
+
65
+ Note important facts, formulas, or references needed. Establish constraints.
66
+ Place it between <groundwork> and </groundwork>
67
+
68
+ Think about the problem and provide your working out.
69
+ Place it between <inference> and </inference>.
70
+
71
+ Then, provide your solution between <conclusion> and </conclusion>
72
+
73
+ """
74
+ system_prompt
75
+ ```
76
+
77
+ Example Prompt
78
+ ```python
79
+ system_prompt = \
80
+ messages = [
81
+ {"role": "system", "content": system_prompt},
82
+ {"role": "user", "content": "A triangle has sides 13, 14, and 15. Find the radius of its circumcircle."},
83
+ ]
84
+
85
+ text = tokenizer.apply_chat_template(
86
+ messages,
87
+ add_generation_prompt = True,
88
+ tokenize = False,
89
+ )
90
+ from transformers import TextStreamer
91
+ _ = model.generate(
92
+ **tokenizer(text, return_tensors = "pt").to("cuda"),
93
+ max_new_tokens = 1024,
94
+ temperature = 1.0, top_p = 0.95, top_k = 64,
95
+ streamer = TextStreamer(tokenizer, skip_prompt = True),
96
+ )
97
+ system_prompt
98
+ ```
99
+
100
+ Example Output
101
+ ```xml
102
+ <layOutProblem>
103
+ The problem asks us to find the radius of the circumcircle of a triangle with sides of length 13, 14, and 15. The circumcircle is the circle that passes through all three vertices of the triangle. The radius of the circumcircle is often denoted by *R*. We are given the lengths of the three sides of the triangle, and we need to determine the radius of the circle that circumscribes it.
104
+ </layOutProblem>
105
+
106
+ <options>
107
+ 1. **Use the formula R = abc / 4K**, where a, b, and c are the side lengths and K is the area of the triangle. This requires us to first calculate the area of the triangle. We can use Heron's formula to find the area.
108
+ 2. **Use the Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R. This requires us to find one of the angles of the triangle, which can be done using the Law of Cosines.
109
+ 3. **Coordinate Geometry:** Place the triangle on a coordinate plane and find the circumcenter, then calculate the distance from the circumcenter to any vertex. This is generally more complex.
110
+ </options>
111
+
112
+ <groundwork>
113
+ * **Heron's Formula:** For a triangle with sides a, b, and c, the area K is given by K = sqrt(s(s-a)(s-b)(s-c)), where s is the semi-perimeter, s = (a+b+c)/2.
114
+ * **Law of Cosines:** c² = a² + b² - 2ab*cos(C)
115
+ * **Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R
116
+ * **Circumradius Formula:** R = abc / 4K
117
+ * **Side lengths:** a = 13, b = 14, c = 15
118
+ * **Constraint:** The radius must be a positive real number.
119
+ </groundwork>
120
+
121
+ <inference>
122
+ Let's use the formula R = abc / 4K. First, we need to find the area K using Heron's formula.
123
+ The semi-perimeter s = (13 + 14 + 15) / 2 = 42 / 2 = 21.
124
+ Now, we can calculate the area K:
125
+ K = sqrt(21(21-13)(21-14)(21-15)) = sqrt(21 * 8 * 7 * 6) = sqrt(3 * 7 * 2³ * 7 * 2 * 3) = sqrt(2⁴ * 3² * 7²) = 2² * 3 * 7 = 4 * 21 = 84.
126
+ Now we can find the circumradius R:
127
+ R = (13 * 14 * 15) / (4 * 84) = (13 * 14 * 15) / 336 = (13 * 2 * 7 * 3 * 5) / (2⁴ * 3 * 7) = (13 * 5) / 8 = 65 / 8 = 8.125
128
+
129
+ </inference>
130
+
131
+ <conclusion>
132
+ The radius of the circumcircle is 65/8 or 8.125.
133
+ </conclusion><end_of_turn>
134
+ ```
135
+
136
+
.ipynb_checkpoints/adapter_config-checkpoint.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "unsloth/gemma-3-27b-it",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 64,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 64,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense).*?(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj).*?)|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense)\\.(?:(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj)))",
27
+ "task_type": "CAUSAL_LM",
28
+ "trainable_token_indices": null,
29
+ "use_dora": false,
30
+ "use_rslora": false
31
+ }
.ipynb_checkpoints/chat_template-checkpoint.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{{ bos_token }}\n{%- if messages[0]['role'] == 'system' -%}\n {%- if messages[0]['content'] is string -%}\n {%- set first_user_prefix = messages[0]['content'] + '\n\n' -%}\n {%- else -%}\n {%- set first_user_prefix = messages[0]['content'][0]['text'] + '\n\n' -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n{%- else -%}\n {%- set first_user_prefix = \"\" -%}\n {%- set loop_messages = messages -%}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<start_of_turn>' + role + '\n' + (first_user_prefix if loop.first else \"\") }}\n {%- if message['content'] is string -%}\n {{ message['content'] | trim }}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '<end_of_turn>\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<start_of_turn>model\n'}}\n{%- endif -%}\n"
3
+ }
.ipynb_checkpoints/preprocessor_config-checkpoint.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_pan_and_scan": null,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Gemma3ImageProcessor",
13
+ "image_seq_length": 256,
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "pan_and_scan_max_num_crops": null,
20
+ "pan_and_scan_min_crop_size": null,
21
+ "pan_and_scan_min_ratio_to_activate": null,
22
+ "processor_class": "Gemma3Processor",
23
+ "resample": 2,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 896,
27
+ "width": 896
28
+ }
29
+ }
.ipynb_checkpoints/processor_config-checkpoint.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_length": 256,
3
+ "processor_class": "Gemma3Processor"
4
+ }
.ipynb_checkpoints/special_tokens_map-checkpoint.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boi_token": "<start_of_image>",
3
+ "bos_token": {
4
+ "content": "<bos>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "eoi_token": "<end_of_image>",
11
+ "eos_token": {
12
+ "content": "<end_of_turn>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "image_token": "<image_soft_token>",
19
+ "pad_token": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
.ipynb_checkpoints/tokenizer-checkpoint.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
3
+ size 33384568
.ipynb_checkpoints/tokenizer_config-checkpoint.json ADDED
The diff for this file is too large to render. See raw diff
 
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/gemma-3-27b-it
3
+ library_name: peft
4
+ license: gemma
5
+ ---
6
+
7
+ # LOGIC-27B
8
+
9
+ LOGIC Framework (Lay Out Problem, Options, Groundwork, Inference, Conclusion)
10
+
11
+ Example Output
12
+ ```xml
13
+ <layOutProblem>
14
+ Explain the problem or question in detail.
15
+ </layOutProblem>
16
+
17
+ <options>
18
+ List different strategies or paths you might take to solve the problem.
19
+ </options>
20
+
21
+ <groundwork>
22
+ Note important facts, formulas, or references needed. Establish constraints.
23
+ </groundwork>
24
+
25
+ <inference>
26
+ Perform detailed reasoning or computations. Validate steps or check for errors.
27
+ </inference>
28
+
29
+ <conclusion>
30
+ Present the clear answer or outcome.
31
+ </conclusion>
32
+ ```
33
+
34
+ Why Use LOGIC?
35
+ Emphasizes exploring multiple options.
36
+ Encourages building a strong groundwork of facts or constraints.
37
+ Includes inference to handle the step-by-step thinking process.
38
+ Ends with a conclusion that ties it all together.
39
+
40
+
41
+
42
+ ### Model Details
43
+ - **Model Name:** Bifröst-27B
44
+ - **Base Architecture:** gemma3
45
+ - **Application:** Reasoning using LOGIC Framework
46
+ - **Release Date:** 16-March-2025
47
+
48
+ ```python
49
+ system_prompt = \
50
+ f"""You are given a problem.
51
+ You are LOGIC
52
+ Always follow the format
53
+ layOutProblem
54
+ options
55
+ groundwork
56
+ inference
57
+ conclusion
58
+
59
+ Explain the problem or question in detail.
60
+ Place it between <layOutProblem> and </layOutProblem>
61
+
62
+ List different strategies or paths you might take to solve the problem.
63
+ Place it between <options> and </options>
64
+
65
+ Note important facts, formulas, or references needed. Establish constraints.
66
+ Place it between <groundwork> and </groundwork>
67
+
68
+ Think about the problem and provide your working out.
69
+ Place it between <inference> and </inference>.
70
+
71
+ Then, provide your solution between <conclusion> and </conclusion>
72
+
73
+ """
74
+ system_prompt
75
+ ```
76
+
77
+ Example Prompt
78
+ ```python
79
+ system_prompt = \
80
+ messages = [
81
+ {"role": "system", "content": system_prompt},
82
+ {"role": "user", "content": "A triangle has sides 13, 14, and 15. Find the radius of its circumcircle."},
83
+ ]
84
+
85
+ text = tokenizer.apply_chat_template(
86
+ messages,
87
+ add_generation_prompt = True,
88
+ tokenize = False,
89
+ )
90
+ from transformers import TextStreamer
91
+ _ = model.generate(
92
+ **tokenizer(text, return_tensors = "pt").to("cuda"),
93
+ max_new_tokens = 1024,
94
+ temperature = 1.0, top_p = 0.95, top_k = 64,
95
+ streamer = TextStreamer(tokenizer, skip_prompt = True),
96
+ )
97
+ system_prompt
98
+ ```
99
+
100
+ Example Output
101
+ ```xml
102
+ <layOutProblem>
103
+ The problem asks us to find the radius of the circumcircle of a triangle with sides of length 13, 14, and 15. The circumcircle is the circle that passes through all three vertices of the triangle. The radius of the circumcircle is often denoted by *R*. We are given the lengths of the three sides of the triangle, and we need to determine the radius of the circle that circumscribes it.
104
+ </layOutProblem>
105
+
106
+ <options>
107
+ 1. **Use the formula R = abc / 4K**, where a, b, and c are the side lengths and K is the area of the triangle. This requires us to first calculate the area of the triangle. We can use Heron's formula to find the area.
108
+ 2. **Use the Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R. This requires us to find one of the angles of the triangle, which can be done using the Law of Cosines.
109
+ 3. **Coordinate Geometry:** Place the triangle on a coordinate plane and find the circumcenter, then calculate the distance from the circumcenter to any vertex. This is generally more complex.
110
+ </options>
111
+
112
+ <groundwork>
113
+ * **Heron's Formula:** For a triangle with sides a, b, and c, the area K is given by K = sqrt(s(s-a)(s-b)(s-c)), where s is the semi-perimeter, s = (a+b+c)/2.
114
+ * **Law of Cosines:** c² = a² + b² - 2ab*cos(C)
115
+ * **Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R
116
+ * **Circumradius Formula:** R = abc / 4K
117
+ * **Side lengths:** a = 13, b = 14, c = 15
118
+ * **Constraint:** The radius must be a positive real number.
119
+ </groundwork>
120
+
121
+ <inference>
122
+ Let's use the formula R = abc / 4K. First, we need to find the area K using Heron's formula.
123
+ The semi-perimeter s = (13 + 14 + 15) / 2 = 42 / 2 = 21.
124
+ Now, we can calculate the area K:
125
+ K = sqrt(21(21-13)(21-14)(21-15)) = sqrt(21 * 8 * 7 * 6) = sqrt(3 * 7 * 2³ * 7 * 2 * 3) = sqrt(2⁴ * 3² * 7²) = 2² * 3 * 7 = 4 * 21 = 84.
126
+ Now we can find the circumradius R:
127
+ R = (13 * 14 * 15) / (4 * 84) = (13 * 14 * 15) / 336 = (13 * 2 * 7 * 3 * 5) / (2⁴ * 3 * 7) = (13 * 5) / 8 = 65 / 8 = 8.125
128
+
129
+ </inference>
130
+
131
+ <conclusion>
132
+ The radius of the circumcircle is 65/8 or 8.125.
133
+ </conclusion><end_of_turn>
134
+ ```
135
+
136
+
adapter_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "unsloth/gemma-3-27b-it",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 64,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 64,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": "(?:.*?(?:language|text).*?(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense).*?(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj).*?)|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense)\\.(?:(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj)))",
27
+ "task_type": "CAUSAL_LM",
28
+ "trainable_token_indices": null,
29
+ "use_dora": false,
30
+ "use_rslora": false
31
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2fb0a4686e2f05caa33ccf8d4db249f3697c2f2abd55a5e58699118842c54c3
3
+ size 1816396048
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image_soft_token>": 262144
3
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{{ bos_token }}\n{%- if messages[0]['role'] == 'system' -%}\n {%- if messages[0]['content'] is string -%}\n {%- set first_user_prefix = messages[0]['content'] + '\n\n' -%}\n {%- else -%}\n {%- set first_user_prefix = messages[0]['content'][0]['text'] + '\n\n' -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n{%- else -%}\n {%- set first_user_prefix = \"\" -%}\n {%- set loop_messages = messages -%}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<start_of_turn>' + role + '\n' + (first_user_prefix if loop.first else \"\") }}\n {%- if message['content'] is string -%}\n {{ message['content'] | trim }}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '<end_of_turn>\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<start_of_turn>model\n'}}\n{%- endif -%}\n"
3
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": null,
3
+ "do_normalize": true,
4
+ "do_pan_and_scan": null,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Gemma3ImageProcessor",
13
+ "image_seq_length": 256,
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "pan_and_scan_max_num_crops": null,
20
+ "pan_and_scan_min_crop_size": null,
21
+ "pan_and_scan_min_ratio_to_activate": null,
22
+ "processor_class": "Gemma3Processor",
23
+ "resample": 2,
24
+ "rescale_factor": 0.00392156862745098,
25
+ "size": {
26
+ "height": 896,
27
+ "width": 896
28
+ }
29
+ }
processor_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "image_seq_length": 256,
3
+ "processor_class": "Gemma3Processor"
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boi_token": "<start_of_image>",
3
+ "bos_token": {
4
+ "content": "<bos>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "eoi_token": "<end_of_image>",
11
+ "eos_token": {
12
+ "content": "<end_of_turn>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "image_token": "<image_soft_token>",
19
+ "pad_token": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
3
+ size 33384568
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
3
+ size 4689074
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff