Cerberus-E4B is an open-weights, multi-task reasoning and agentic language model fine-tuned on top of Google's gemma-4-E4B-it architecture (~7.5B total parameters with frozen vision and audio towers, 4B active language backbone).
Cerberus is designed for advanced bilingual step-by-step reasoning (English & Russian), precise function calling via native Gemma 4 tool schemas, and versatile dual-channel generation.
Looking for quantized GGUF weights?
👉 Cerberus-E4B-GGUF
<|channel>thought\n...<channel|>) and concise, direct responses (instant).<|turn>model\n<|tool_call>...<|call:function_name{...}>), ensuring structured execution for multi-turn agents.mmproj support.All evaluations were conducted in greedy / deterministic mode comparing Cerberus-E4B directly against google/gemma-4-E4B-it:
| Benchmark | Base Model (Gemma-4-E4B-it) |
Cerberus-E4B | Delta (vs. Base) | Generation Mode |
|---|---|---|---|---|
| MATH-500 | 43.3% | 60.0% | +16.7% | Thinking Mode (<thought>) |
| MATH-500 | 35.0% | 48.0% | +13.0% | Instant Mode (Direct calculation) |
| MMLU-Redux | 62.0% | 63.0% | +1.0% | Multi-discipline academic knowledge |
| IFEval | 90.8% | 90.5% | Parity (~90%) | Complex system constraint following |
Cerberus-E4B is released as an official PEFT LoRA adapter for google/gemma-4-E4B-it.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "google/gemma-4-E4B-it"
adapter_model_id = "rrlabs-ai/Cerberus-E4B"
# Load tokenizer and base model
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Apply Cerberus LoRA adapter
model = PeftModel.from_pretrained(base_model, adapter_model_id)
# 1. Thinking Mode Prompt (Step-by-step reasoning)
prompt = "Find the number of positive integers n <= 1000 such that gcd(n, 36) = 1."
formatted_input = f"<|turn>user\n{prompt}<turn|>\n<|turn>model\n<|channel>thought\n"
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=2048,
temperature=0.8,
top_p=0.95,
do_sample=True
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=False)
print(response)
To ensure optimal generation quality across different tasks:
Thinking mode):do_sample=True, temperature=0.8, top_p=0.95, top_k=64.llama.cpp / GGUF: Enable the dynamic DRY sampler (--dry-multiplier 0.8 --dry-base 1.75 --dry-allowed-length 2) to eliminate n-gram loops during long thinking traces.Instant mode):do_sample=False, temperature=0.0) for maximum determinism and syntax reliability.Looking for standalone quantized GGUF weights for local execution on llama.cpp, LM Studio, or Ollama?
Pre-quantized GGUF files (including Q4_K_M, Q5_K_M, Q8_0, BF16, and multimodal mmproj) are available at:
👉 rrlabs-ai/Cerberus-E4B-GGUF
Cerberus-E4B pairs seamlessly with rrchat — an open-source, mobile-ready AI chat interface:
Use your local PC's llama.cpp from your phone. Clean mobile-ready AI chat interface with vision, web search, and privacy.
Cerberus was trained on a carefully curated, decontaminated multi-source dataset. In accordance with dataset terms and open research best practices, we gratefully acknowledge the following data creators:
nvidia/Nemotron-Post-Training-Dataset-v2 and nvidia/Nemotron-SFT-Agentic-v2.open-r1/OpenR1-Math-220k (Apache-2.0 License).HuggingFaceTB/smoltalk2 (Apache-2.0 License).Vikhrmodels/GrandMaster-PRO-MAX (Apache-2.0 License).google/gemma-4-E4B-it, developed by Google DeepMind and governed by the Gemma Terms of Use.This model adapter is released under the Apache-2.0 License. Use of the underlying base model remains subject to the Gemma Terms of Use.
google/gemma-4-E4B-it