Image-Text-to-Text
Transformers
Safetensors
gemma4
text-generation-inference
unsloth
reasoning
heretic
uncensored
decensored
abliterated
reproducible
conversational
darkc0de commited on
Commit
5ab7866
·
verified ·
1 Parent(s): 217e1cd

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +327 -103
README.md CHANGED
@@ -1,199 +1,423 @@
1
  ---
2
- library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
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]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: unsloth/gemma-4-31B-it
3
+ tags:
4
+ - text-generation-inference
5
+ - transformers
6
+ - unsloth
7
+ - gemma4
8
+ - reasoning
9
+ - heretic
10
+ - uncensored
11
+ - decensored
12
+ - abliterated
13
+ - reproducible
14
+ license: apache-2.0
15
+ datasets:
16
+ - TeichAI/Claude-Opus-4.6-Reasoning-887x
17
+ - TeichAI/claude-4.5-opus-high-reasoning-250x
18
+ - Crownelius/Opus-4.6-Reasoning-2100x-formatted
19
  ---
20
+ # This is a decensored version of [TeichAI/gemma-4-31B-it-Claude-Opus-Distill-v2](https://huggingface.co/TeichAI/gemma-4-31B-it-Claude-Opus-Distill-v2), made using [Heretic](https://github.com/p-e-w/heretic) v1.3.0
21
 
22
+ > [!TIP]
23
+ > **This model is reproducible!**
24
+ >
25
+ > See the [README](reproduce/README.md) in the `reproduce` directory for more information.
26
 
27
+ ## Abliteration parameters
28
 
29
+ | Parameter | Value |
30
+ | :-------- | :---: |
31
+ | **direction_index** | 34.68 |
32
+ | **attn.o_proj.max_weight** | 1.49 |
33
+ | **attn.o_proj.max_weight_position** | 35.77 |
34
+ | **attn.o_proj.min_weight** | 0.58 |
35
+ | **attn.o_proj.min_weight_distance** | 34.11 |
36
+ | **mlp.down_proj.max_weight** | 1.50 |
37
+ | **mlp.down_proj.max_weight_position** | 36.82 |
38
+ | **mlp.down_proj.min_weight** | 1.28 |
39
+ | **mlp.down_proj.min_weight_distance** | 18.49 |
40
 
41
+ ## Performance
42
 
43
+ | Metric | This model | Original model ([TeichAI/gemma-4-31B-it-Claude-Opus-Distill-v2](https://huggingface.co/TeichAI/gemma-4-31B-it-Claude-Opus-Distill-v2)) |
44
+ | :----- | :--------: | :---------------------------: |
45
+ | **KL divergence** | 0.0063 | 0 *(by definition)* |
46
+ | **Refusals** | 28/100 | 89/100 |
47
 
48
+ -----
49
 
 
50
 
51
+ # 🌟 Gemma 4 - 31B x Claude Opus 4.6 v2
52
 
53
+ > **Build Environment & Features:**
54
+ > - **Fine-tuning Framework**: **Unsloth**
55
+ > - **Reasoning Effort**: **High**
56
+ > - This model bridges the gap between Google's exceptional open-weights architecture and Claude 4.6's profound reasoning capabilities, leveraging cutting-edge fine-tuning environments.
 
 
 
57
 
58
+ ![Gemma 4 Benchmarks](https://storage.googleapis.com/gweb-uniblog-publish-prod/documents/gemma-4-table_light_Web_with_Arena.jpg)
59
 
60
+ ## 💡 Model Introduction
61
+ **Gemma 4 - 31B x Claude Opus 4.6** is a highly capable model fine-tuned on top of the powerful `unsloth/gemma-4-31B-it` architecture. The model's core directive is to absorb state-of-the-art reasoning distillation, primarily sourced from Claude-4.6 Opus interactions.
62
 
63
+ By utilizing datasets where the reasoning effort was explicitly set to **High**, this model excels in breaking down complex problems and delivering precise, nuanced solutions across a variety of demanding domains.
 
 
64
 
65
+ ## 🗺️ Training Pipeline Overview
66
 
67
+ ```text
68
+ Base Model (unsloth/gemma-4-31B-it)
69
+
70
+
71
+ Supervised Fine-Tuning (SFT) + High-Effort Reasoning Datasets
72
+
73
+
74
+ Final Model (Gemma 4 - 31B x Claude Opus 4.6)
75
+ ````
76
 
77
+ ## 📋 Stage Details & Benchmarks
78
 
79
+ *Benchmarks coming soon*
80
 
81
+ **Performance vs Size:**
82
 
83
+ > **Deep Dive Analysis:** For more comprehensive insights regarding the base capabilities of the Gemma 4 architecture, please refer to [this Analysis Document](https://huggingface.co/TeichAI/gemma-4-31B-it-Claude-Opus-Distill/resolve/main/Gemma%204%20Analysis.pdf).
84
 
85
+ ### 🔹 Supervised Fine-Tuning (Meeting Claude)
86
 
87
+ - **Objective:** To inject high-density reasoning logic and establish a strict format for complex problem-solving.
88
+ - **Methodology:** We utilized **Unsloth** for highly efficient memory and compute optimization during the fine-tuning process. The model was trained extensively on various reasoning trajectories from Claude Opus 4.6 to adopt a structured and efficient thinking pattern.
89
 
90
+ ### 📚 All Datasets Used
91
 
92
+ The dataset consists of high-quality, high-effort reasoning distillation data:
93
 
94
+ | Dataset Name | Description / Purpose |
95
+ |--------------|-----------------------|
96
+ | `TeichAI/Claude-Opus-4.6-Reasoning-887x` | Core Claude 4.6 Opus reasoning trajectories. |
97
+ | `TeichAI/claude-4.5-opus-high-reasoning-250x` | High-intensity reasoning distillation. |
98
+ | `Crownelius/Opus-4.6-Reasoning-2100x-formatted` | Crownelius's extensively formatted Opus reasoning dataset for structural reinforcement. |
99
 
100
+ ## 🌟 Core Skills & Capabilities
101
 
102
+ Thanks to its robust base model and high-effort reasoning distillation, this model is highly optimized for the following use cases:
103
 
104
+ 1. **💻 Coding:** Advanced code generation, debugging, and software architecture planning.
105
+ 2. **🔬 Science:** Deep scientific reasoning, hypothesis evaluation, and analytical problem-solving.
106
+ 3. **🔎 Deep Research:** Navigating complex, multi-step research queries and synthesizing vast amounts of information.
107
+ 4. **🧠 General Purpose:** Highly capable instruction-following for everyday tasks requiring high logical coherence.
108
 
109
+ ## Getting Started
110
 
111
+ You can use all Gemma 4 models with the latest version of Transformers. To get started, install the necessary dependencies in your environment:
112
 
113
+ `pip install -U transformers torch accelerate`
114
 
115
+ Once you have everything installed, you can proceed to load the model with the code below:
116
 
117
+ ```python
118
+ from transformers import AutoProcessor, AutoModelForCausalLM
119
 
120
+ MODEL_ID = "google/gemma-4-31B-it"
121
 
122
+ # Load model
123
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
124
+ model = AutoModelForCausalLM.from_pretrained(
125
+ MODEL_ID,
126
+ dtype="auto",
127
+ device_map="auto"
128
+ )
129
+ ```
130
 
131
+ Once the model is loaded, you can start generating output:
132
 
133
+ ```python
134
+ # Prompt
135
+ messages = [
136
+ {"role": "system", "content": "You are a helpful assistant."},
137
+ {"role": "user", "content": "Write a short joke about saving RAM."},
138
+ ]
139
 
140
+ # Process input
141
+ text = processor.apply_chat_template(
142
+ messages,
143
+ tokenize=False,
144
+ add_generation_prompt=True,
145
+ enable_thinking=False
146
+ )
147
+ inputs = processor(text=text, return_tensors="pt").to(model.device)
148
+ input_len = inputs["input_ids"].shape[-1]
149
 
150
+ # Generate output
151
+ outputs = model.generate(**inputs, max_new_tokens=1024)
152
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
153
 
154
+ # Parse output
155
+ processor.parse_response(response)
156
+ ```
157
 
158
+ To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
159
 
160
+ Below, you will also find snippets for processing audio (E2B and E4B only), images, and video alongside text:
161
 
162
+ <details>
163
+ <summary>Code for processing Audio</summary>
164
 
165
+ Instead of using `AutoModelForCausalLM`, you can use `AutoModelForMultimodalLM` to process audio. To use it, make sure to install the following packages:
166
 
 
167
 
168
+ `pip install -U transformers torch librosa accelerate`
169
 
170
+ You can then load the model with the code below:
171
 
172
+ ```python
173
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
174
 
175
+ MODEL_ID = "google/gemma-4-E2B-it"
176
 
177
+ # Load model
178
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
179
+ model = AutoModelForMultimodalLM.from_pretrained(
180
+ MODEL_ID,
181
+ dtype="auto",
182
+ device_map="auto"
183
+ )
184
+ ```
185
 
186
+ Once the model is loaded, you can start generating output by directly referencing the audio URL in the prompt:
187
 
 
188
 
189
+ ```python
190
+ # Prompt - add audio before text
191
+ messages = [
192
+ {
193
+ "role": "user",
194
+ "content": [
195
+ {"type": "audio", "audio": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/journal1.wav"},
196
+ {"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
197
+ ]
198
+ }
199
+ ]
200
 
201
+ # Process input
202
+ inputs = processor.apply_chat_template(
203
+ messages,
204
+ tokenize=True,
205
+ return_dict=True,
206
+ return_tensors="pt",
207
+ add_generation_prompt=True,
208
+ ).to(model.device)
209
+ input_len = inputs["input_ids"].shape[-1]
210
 
211
+ # Generate output
212
+ outputs = model.generate(**inputs, max_new_tokens=512)
213
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
214
 
215
+ # Parse output
216
+ processor.parse_response(response)
217
+ ```
218
 
219
+ </details>
220
 
221
+ <details>
222
+ <summary>Code for processing Images</summary>
223
+
224
+ Instead of using `AutoModelForCausalLM`, you can use `AutoModelForMultimodalLM` to process images. To use it, make sure to install the following packages:
225
+
226
+
227
+ `pip install -U transformers torch torchvision accelerate`
228
 
229
+ You can then load the model with the code below:
230
 
231
+ ```python
232
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
233
+
234
+ MODEL_ID = "google/gemma-4-31B-it"
235
 
236
+ # Load model
237
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
238
+ model = AutoModelForMultimodalLM.from_pretrained(
239
+ MODEL_ID,
240
+ dtype="auto",
241
+ device_map="auto"
242
+ )
243
+ ```
244
 
245
+ Once the model is loaded, you can start generating output by directly referencing the image URL in the prompt:
246
 
 
247
 
248
+ ```python
249
+ # Prompt - add image before text
250
+ messages = [
251
+ {
252
+ "role": "user", "content": [
253
+ {"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
254
+ {"type": "text", "text": "What is shown in this image?"}
255
+ ]
256
+ }
257
+ ]
258
 
259
+ # Process input
260
+ inputs = processor.apply_chat_template(
261
+ messages,
262
+ tokenize=True,
263
+ return_dict=True,
264
+ return_tensors="pt",
265
+ add_generation_prompt=True,
266
+ ).to(model.device)
267
+ input_len = inputs["input_ids"].shape[-1]
268
 
269
+ # Generate output
270
+ outputs = model.generate(**inputs, max_new_tokens=512)
271
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
272
 
273
+ # Parse output
274
+ processor.parse_response(response)
275
+ ```
276
 
277
+ </details>
278
 
 
279
 
280
+ <details>
281
+ <summary>Code for processing Videos</summary>
282
 
283
+ Instead of using `AutoModelForCausalLM`, you can use `AutoModelForMultimodalLM` to process videos. To use it, make sure to install the following packages:
284
 
285
+ `pip install -U transformers torch torchvision torchcodec librosa accelerate`
 
 
 
 
286
 
287
+ You can then load the model with the code below:
288
 
289
+ ```python
290
+ from transformers import AutoProcessor, AutoModelForMultimodalLM
291
 
292
+ MODEL_ID = "google/gemma-4-31B-it"
293
 
294
+ # Load model
295
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
296
+ model = AutoModelForMultimodalLM.from_pretrained(
297
+ MODEL_ID,
298
+ dtype="auto",
299
+ device_map="auto"
300
+ )
301
+ ```
302
 
303
+ Once the model is loaded, you can start generating output by directly referencing the video URL in the prompt:
304
 
 
305
 
306
+ ```python
307
+ # Prompt - add video before text
308
+ messages = [
309
+ {
310
+ 'role': 'user',
311
+ 'content': [
312
+ {"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
313
+ {'type': 'text', 'text': 'Describe this video.'}
314
+ ]
315
+ }
316
+ ]
317
 
318
+ # Process input
319
+ inputs = processor.apply_chat_template(
320
+ messages,
321
+ tokenize=True,
322
+ return_dict=True,
323
+ return_tensors="pt",
324
+ add_generation_prompt=True,
325
+ ).to(model.device)
326
+ input_len = inputs["input_ids"].shape[-1]
327
 
328
+ # Generate output
329
+ outputs = model.generate(**inputs, max_new_tokens=512)
330
+ response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
331
 
332
+ # Parse output
333
+ processor.parse_response(response)
334
+ ```
335
 
336
+ </details>
337
 
338
+ ## **Best Practices**
339
 
340
+ For the best performance, use these configurations and best practices:
341
 
342
+ ### 1. Sampling Parameters
343
 
344
+ Use the following standardized sampling configuration across all use cases:
345
 
346
+ * `temperature=1.0`
347
+ * `top_p=0.95`
348
+ * `top_k=64`
349
 
350
+ ### 2. Thinking Mode Configuration
351
 
352
+ Compared to Gemma 3, the models use standard `system`, `assistant`, and `user` roles. To properly manage the thinking process, use the following control tokens:
353
 
354
+ * **Trigger Thinking:** Thinking is enabled by including the `<|think|>` token at the start of the system prompt. To disable thinking, remove the token.
355
+ * **Standard Generation:** When thinking is enabled, the model will output its internal reasoning followed by the final answer using this structure:
356
+ `<|channel>thought\n`**[Internal reasoning]**`<channel|>`
357
+ * **Disabled Thinking Behavior:** For all models except for the E2B and E4B variants, if thinking is disabled, the model will still generate the tags but with an empty thought block:
358
+ `<|channel>thought\n<channel|>`**[Final answer]**
359
 
360
+ > [!Note]
361
+ > Note that many libraries like Transformers and llama.cpp handle the complexities of the chat template for you.
362
 
363
+ ### 3. Multi-Turn Conversations
364
 
365
+ * **No Thinking Content in History**: In multi-turn conversations, the historical model output should only include the final response. Thoughts from previous model turns must *not be added* before the next user turn begins.
366
 
367
+ ### 4. Modality order
368
 
369
+ * For optimal performance with multimodal inputs, place image and/or audio content **before** the text in your prompt.
370
+
371
+ ### 5. Variable Image Resolution
372
+
373
+ Aside from variable aspect ratios, Gemma 4 supports variable image resolution through a configurable visual token budget, which controls how many tokens are used to represent an image. A higher token budget preserves more visual detail at the cost of additional compute, while a lower budget enables faster inference for tasks that don't require fine-grained understanding.
374
+
375
+ * The supported token budgets are: **70**, **140**, **280**, **560**, and **1120**.
376
+ * Use *lower budgets* for classification, captioning, or video understanding, where faster inference and processing many frames outweigh fine-grained detail.
377
+ * Use *higher budgets* for tasks like OCR, document parsing, or reading small text.
378
+
379
+ ### 6. Audio
380
+
381
+ Use the following prompt structures for audio processing:
382
+
383
+ * **Audio Speech Recognition (ASR)**
384
+
385
+ ```text
386
+ Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.
387
+
388
+ Follow these specific instructions for formatting the answer:
389
+ * Only output the transcription, with no newlines.
390
+ * When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.
391
+ ```
392
+
393
+ * **Automatic Speech Translation (AST)**
394
+
395
+ ```text
396
+ Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
397
+ When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.
398
+ ```
399
+
400
+ ### 7. Audio and Video Length
401
+
402
+ All models support image inputs and can process videos as frames whereas the E2B and E4B models also support audio inputs. Audio supports a maximum length of 30 seconds. Video supports a maximum of 60 seconds assuming the images are processed at one frame per second.
403
+
404
+ ## 🙏 Acknowledgements
405
+
406
+ - **Google**: For providing an exceptional open weights model. Read more about Gemma 4 on the [Google Innovation Blog](https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/).
407
+ - **Unsloth**: For assembling ready-to-use, cutting-edge fine-tuning environments that make this work possible.
408
+ - **Crownelius**: For creating and sharing his awesome Opus reasoning dataset with the community.
409
+
410
+
411
+ ## 📖 Citation
412
+
413
+ If you use this model in your research or projects, please cite:
414
+
415
+ ```bibtex
416
+ @misc{teichai_gemma4_31b_opus_distilled_v2,
417
+ title = {Gemma-4-31B-it-Claude-Opus-Distill-v2},
418
+ author = {TeichAI},
419
+ year = {2026},
420
+ publisher = {Hugging Face},
421
+ howpublished = {\url{https://huggingface.co/TeichAI/gemma-4-31B-it-Claude-Opus-Distill-v2}}
422
+ }
423
+ ```