Instructions to use google/gemma-4-E4B-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/gemma-4-E4B-it with Transformers:
# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("google/gemma-4-E4B-it") model = AutoModelForMultimodalLM.from_pretrained("google/gemma-4-E4B-it", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
fix: scope preserve_thinking to tool-call turns, remove extra newline in continuation turns
Browse files- chat_template.jinja +0 -1
chat_template.jinja
CHANGED
|
@@ -362,7 +362,6 @@
|
|
| 362 |
{%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
|
| 363 |
{{- '<|tool_response>' -}}
|
| 364 |
{%- elif continues_into_next -%}
|
| 365 |
-
{{- '\n' -}}
|
| 366 |
{%- elif not (ns_tr_out.flag and not has_content) -%}
|
| 367 |
{{- '<turn|>\n' -}}
|
| 368 |
{%- endif -%}
|
|
|
|
| 362 |
{%- if ns.prev_message_type == 'tool_call' and not ns_tr_out.flag -%}
|
| 363 |
{{- '<|tool_response>' -}}
|
| 364 |
{%- elif continues_into_next -%}
|
|
|
|
| 365 |
{%- elif not (ns_tr_out.flag and not has_content) -%}
|
| 366 |
{{- '<turn|>\n' -}}
|
| 367 |
{%- endif -%}
|