Gemma 4 E2B Swift
compressing thought tokens without accuracy loss
2 min read
The Gemma 4 E2B Swift model is a fine-tuned version of the base language model google/gemma-4-E2B (around 5.12 billion parameters) optimized to generate more concise reasoning when solving complex tasks. Training was carried out using the OPSDC / CRISP method (a scientific self-distillation approach for reasoning compression), where the model learns from itself to answer more briefly while maintaining or even improving response quality. The output is the same text model, but it spends on average 13% fewer tokens on internal "thinking". It is well suited for developers and researchers who care about generation speed and token economy without a drop in reasoning accuracy.
Key features
- A reduction in reasoning tokens by an average of 12.9% compared to the base version.
- An increase in average accuracy on benchmarks by +1.30 points (including improvements in the AIME and MMLU-Pro math tests).
- Weights are fully merged (the LoRA (a small adaptive add-on over the base model) is baked into the weights), so the model works "out of the box" without extra filters and servers.
- Full compatibility with standard tools in the Hugging Face ecosystem, vLLM, and the GGUF format converter.
What you can do
- Run the model locally or on a server via the
transformerslibrary to generate texts and solve logic tasks. - Integrate the model into vLLM pipelines to speed up inference and lower costs for long reasoning chains.
- Convert the weights to GGUF to run on consumer graphics cards or local clients.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ukisai/gemma-4-E2B-swift", dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("ukisai/gemma-4-E2B-swift")
Read more
DetailsBenchmarks (average gain +1.30, AIME 2024: 40.67 vs 35.33 for base, MMLU-Pro: 47.17 vs 45.32).
Hardware requirements match the base google/gemma-4-E2B model (around 5.12B parameters).
Trained on 16,858 filtered DAPO tasks using LoRA (r32/α64) with stopping at step 30.
Distributed under the standard Gemma license.










Comments