Instructions to use google/gemma-4-12B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-12B-it with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-12B-it") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-12B-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
Emit an empty thought after a tool response when enable_thinking=false
#53
by sunnyshechkaa - opened
- chat_template.jinja +2 -0
chat_template.jinja
CHANGED
|
@@ -386,5 +386,7 @@
|
|
| 386 |
{%- endif -%}
|
| 387 |
{%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
|
| 388 |
{{- '<|channel>thought\n' -}}
|
|
|
|
|
|
|
| 389 |
{%- endif -%}
|
| 390 |
{%- endif -%}
|
|
|
|
| 386 |
{%- endif -%}
|
| 387 |
{%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
|
| 388 |
{{- '<|channel>thought\n' -}}
|
| 389 |
+
{%- elif ns.prev_message_type == 'tool_response' -%}
|
| 390 |
+
{{- '<|channel>thought\n<channel|>' -}}
|
| 391 |
{%- endif -%}
|
| 392 |
{%- endif -%}
|