bethrezen commited on
Commit
23e5f66
·
verified ·
1 Parent(s): 9e1e4a6

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-3-12b-it
3
+ library_name: peft
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+
11
+
12
+ ## Model Details
13
+
14
+ ### Model Description
15
+
16
+ <!-- Provide a longer summary of what this model is. -->
17
+
18
+
19
+
20
+ - **Developed by:** [More Information Needed]
21
+ - **Funded by [optional]:** [More Information Needed]
22
+ - **Shared by [optional]:** [More Information Needed]
23
+ - **Model type:** [More Information Needed]
24
+ - **Language(s) (NLP):** [More Information Needed]
25
+ - **License:** [More Information Needed]
26
+ - **Finetuned from model [optional]:** [More Information Needed]
27
+
28
+ ### Model Sources [optional]
29
+
30
+ <!-- Provide the basic links for the model. -->
31
+
32
+ - **Repository:** [More Information Needed]
33
+ - **Paper [optional]:** [More Information Needed]
34
+ - **Demo [optional]:** [More Information Needed]
35
+
36
+ ## Uses
37
+
38
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
+
40
+ ### Direct Use
41
+
42
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
+
44
+ [More Information Needed]
45
+
46
+ ### Downstream Use [optional]
47
+
48
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Out-of-Scope Use
53
+
54
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
+
56
+ [More Information Needed]
57
+
58
+ ## Bias, Risks, and Limitations
59
+
60
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ### Recommendations
65
+
66
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
+
68
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
+
70
+ ## How to Get Started with the Model
71
+
72
+ Use the code below to get started with the model.
73
+
74
+ [More Information Needed]
75
+
76
+ ## Training Details
77
+
78
+ ### Training Data
79
+
80
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
+
82
+ [More Information Needed]
83
+
84
+ ### Training Procedure
85
+
86
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
+
88
+ #### Preprocessing [optional]
89
+
90
+ [More Information Needed]
91
+
92
+
93
+ #### Training Hyperparameters
94
+
95
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
+
97
+ #### Speeds, Sizes, Times [optional]
98
+
99
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
+
101
+ [More Information Needed]
102
+
103
+ ## Evaluation
104
+
105
+ <!-- This section describes the evaluation protocols and provides the results. -->
106
+
107
+ ### Testing Data, Factors & Metrics
108
+
109
+ #### Testing Data
110
+
111
+ <!-- This should link to a Dataset Card if possible. -->
112
+
113
+ [More Information Needed]
114
+
115
+ #### Factors
116
+
117
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
+
119
+ [More Information Needed]
120
+
121
+ #### Metrics
122
+
123
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
+
125
+ [More Information Needed]
126
+
127
+ ### Results
128
+
129
+ [More Information Needed]
130
+
131
+ #### Summary
132
+
133
+
134
+
135
+ ## Model Examination [optional]
136
+
137
+ <!-- Relevant interpretability work for the model goes here -->
138
+
139
+ [More Information Needed]
140
+
141
+ ## Environmental Impact
142
+
143
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
+
145
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
+
147
+ - **Hardware Type:** [More Information Needed]
148
+ - **Hours used:** [More Information Needed]
149
+ - **Cloud Provider:** [More Information Needed]
150
+ - **Compute Region:** [More Information Needed]
151
+ - **Carbon Emitted:** [More Information Needed]
152
+
153
+ ## Technical Specifications [optional]
154
+
155
+ ### Model Architecture and Objective
156
+
157
+ [More Information Needed]
158
+
159
+ ### Compute Infrastructure
160
+
161
+ [More Information Needed]
162
+
163
+ #### Hardware
164
+
165
+ [More Information Needed]
166
+
167
+ #### Software
168
+
169
+ [More Information Needed]
170
+
171
+ ## Citation [optional]
172
+
173
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
+
175
+ **BibTeX:**
176
+
177
+ [More Information Needed]
178
+
179
+ **APA:**
180
+
181
+ [More Information Needed]
182
+
183
+ ## Glossary [optional]
184
+
185
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
+
187
+ [More Information Needed]
188
+
189
+ ## More Information [optional]
190
+
191
+ [More Information Needed]
192
+
193
+ ## Model Card Authors [optional]
194
+
195
+ [More Information Needed]
196
+
197
+ ## Model Card Contact
198
+
199
+ [More Information Needed]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.15.2
adapter_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "google/gemma-3-12b-it",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": null,
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": 256,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 256,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": "model.language_model.layers.[\\d]+.(mlp|cross_attn|self_attn).(up|down|gate|q|k|v|o)_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:7f4276f2952a5dc234b60822d794c8aa0b502415e13f4abc2e3655e8e93c2ddf
3
+ size 2095157960
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image_soft_token>": 262144
3
+ }
chat_template.jinja ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {#- Begin-of-sequence token to start the model prompt -#}
2
+ {{ bos_token }}
3
+ {#- Extracts the system message. Gemma does not support system messages so it will be prepended to first user message. -#}
4
+ {%- if messages[0]['role'] == 'system' -%}
5
+ {%- if messages[0]['content'] is string -%}
6
+ {%- set system_message = messages[0]['content'] -%}
7
+ {%- else -%}
8
+ {%- set system_message = messages[0]['content'][0]['text'] -%}
9
+ {%- endif -%}
10
+ {%- set loop_messages = messages[1:] -%}
11
+ {%- else -%}
12
+ {%- set system_message = "You are a helpful assistant Zero-Gemma made by ZeroAgency company from Russia. You must be helpful, harmless, and honest." -%}
13
+ {%- set loop_messages = messages -%}
14
+ {%- endif -%}
15
+
16
+ {%- if enable_thinking is defined and enable_thinking is true -%}
17
+ {%- set system_message = system_message + "\nFirst, think through the reasoning internally, then present the reasoning within <think>...</think>. After thinking, clearly state a response that addresses the user's request and aligns with their preferences, not just providing a direct answer." -%}
18
+ {%- endif -%}
19
+
20
+ {%- set system_message = system_message + '\n\n' -%}
21
+ {#- Set tools to none if not defined for this ChatCompletion request (helps avoid errors later) -#}
22
+ {%- if not tools is defined -%}
23
+ {%- set tools = none -%}
24
+ {%- endif -%}
25
+
26
+ {#- First - system message -#}
27
+
28
+ {{ '<start_of_turn>system\n' -}}
29
+ {{ system_message }}
30
+ {#- Append system message with tool information if using tools in message request. -#}
31
+ {%- if tools is not none -%}
32
+ {{- "Tools (functions) are available. If you decide to invoke one or more of the tools, you must respond with a python list of the function calls.\n" -}}
33
+ {{- "Example Format: [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)] \n" -}}
34
+ {{- "Do not use variables. DO NOT USE MARKDOWN SYNTAX. You SHOULD NOT include any other text in the response if you call a function. If none of the functions can be used, point it out. If you lack the parameters required by the function, also point it out.\n" -}}
35
+ {{- "Here is a list of functions in JSON format that you can invoke.\n" -}}
36
+ {{- tools | tojson(indent=4) -}}
37
+ {{- "\n\n" -}}
38
+ {%- endif -%}
39
+ {{ '<end_of_turn>\n' }}
40
+
41
+ {#- Main loop over all messages in the conversation history -#}
42
+ {%- for message in loop_messages if message['role'] != 'system' -%}
43
+ {#- Normalize roles for model prompt formatting -#}
44
+ {%- if (message['role'] == 'assistant') -%}
45
+ {%- set role = "model" -%}
46
+ {%- elif (message['role'] == 'tool') -%}
47
+ {%- set role = "user" -%}
48
+ {%- else -%}
49
+ {%- set role = message['role'] -%}
50
+ {%- endif -%}
51
+ {#- Mark the start of a message block with the appropriate role -#}
52
+ {{ '<start_of_turn>' + role + '\n' -}}
53
+
54
+ {#- Format model tool calls (turns where model indicates they want to call a tool) -#}
55
+ {%- if 'tool_calls' in message -%}
56
+ {%- if message['content'] is string -%}
57
+ {%- set content = message['content'] -%}
58
+ {# {%- if '</think>' in content -%} #}
59
+ {{- content | trim -}}
60
+ {# {{- "\n" -}} #}
61
+ {# {%- endif -%} #}
62
+ {%- endif -%}
63
+ {#- Opening bracket for tool call list. -#}
64
+ {{- '[' -}}
65
+ {#- For each tool call -#}
66
+ {%- for tool_call in message.tool_calls -%}
67
+ {#- Function name & opening parenthesis. -#}
68
+ {%- if tool_call.function is defined -%}
69
+ {%- set tool_call = tool_call.function -%}
70
+ {%- endif -%}
71
+ {{- tool_call.name + '(' -}}
72
+
73
+ {#-- Handle arguments as list (positional) or dict (named) --#}
74
+ {#-- Named arguments (dict) --#}
75
+ {%- if tool_call.arguments is iterable and tool_call.arguments is mapping -%}
76
+ {%- set first = true -%}
77
+ {%- for key, val in tool_call.arguments.items() -%}
78
+ {%- if not first %}, {% endif -%}
79
+ {{ key }}={{ val | tojson }}
80
+ {%- set first = false -%}
81
+ {%- endfor -%}
82
+ {#-- Positional arguments (list) --#}
83
+ {%- elif tool_call.arguments is iterable -%}
84
+ {{- tool_call.arguments | map('tojson') | join(', ') -}}
85
+ {#-- Fallback: single positional value --#}
86
+ {%- else -%}
87
+ {{- tool_call.arguments | tojson -}}
88
+ {#-- Closing parenthesis. --#}
89
+ {%- endif -%}
90
+ {{- ')' -}}
91
+ {#-- If more than one tool call, place comma and move to formatting next tool call --#}
92
+ {%- if not loop.last -%}{{- "," -}}{%- endif -%}
93
+ {%- endfor -%}
94
+ {#- Closing bracket for tool call list. -#}
95
+ {{- ']' -}}
96
+ {%- endif -%}
97
+
98
+ {#- Tool response start tag (for messages from a tool) -#}
99
+ {%- if (message['role'] == 'tool') -%}
100
+ {{- '<tool_response>\n' -}}
101
+ {%- endif -%}
102
+
103
+ {#- Render the message content: handle plain string or multimodal content like image/text -#}
104
+ {%- if not 'tool_calls' in message and message['content'] -%}
105
+ {%- if message['content'] is string -%}
106
+ {%- set content = message['content'] -%}
107
+ {# {%- if '</think>' in content -%}
108
+ {%- set content = content.split('</think>')[-1] -%}
109
+ {%- endif -%} #}
110
+ {{- content | trim -}}
111
+ {%- elif message['content'] is iterable -%}
112
+ {%- for item in message['content'] -%}
113
+ {%- if item['type'] == 'image' -%}
114
+ {{ '<start_of_image>' }}
115
+ {%- elif item['type'] == 'text' -%}
116
+ {%- set content = item['text'] -%}
117
+ {# {%- if '</think>' in content -%}
118
+ {%- set content = content.split('</think>')[-1] -%}
119
+ {%- endif -%} #}
120
+ {{ content | trim }}
121
+ {%- endif -%}
122
+ {%- endfor -%}
123
+ {%- else -%}
124
+ {{ raise_exception("Invalid content type:"+ message|tojson) }}
125
+ {%- endif -%}
126
+ {%- endif -%}
127
+
128
+ {#- Tool response end tag -#}
129
+ {%- if (message['role'] == 'tool') -%}
130
+ {{ '</tool_response>' -}}
131
+ {%- endif -%}
132
+
133
+ {#- Mark end of a single turn -#}
134
+ {{ '<end_of_turn>\n' }}
135
+ {%- endfor -%}
136
+
137
+ {#- If generation is to be triggered, add model prompt prefix -#}
138
+ {%- if add_generation_prompt -%}
139
+ {{'<start_of_turn>model\n'}}
140
+ {%- if enable_thinking is defined and enable_thinking is true -%}
141
+ {{- '<think>' -}}
142
+ {%- endif %}
143
+ {%- endif -%}
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": "<eos>",
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
 
trainer_state.json ADDED
The diff for this file is too large to render. See raw diff
 
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5d0e80e438980788042eeb987b304e103d61870c791095a6aa49d3cf5da5572
3
+ size 14968