Gemma 4 12B AgentTracer: A model for agent tasks and function calling with preliminary reasoning
2 min readupdated
Gemma 4 12B AgentTracer is a multimodal model built on the google/gemma-4-12B-it architecture, designed for building autonomous agents and working with tools. It excels at planning step-by-step reasoning before every action or response, accurately passing data to external functions, and protecting against prompt injections. The model supports text, images, and audio within a long context window. It is ideal for developers building smart assistants, API-driven chatbots, and automated information processing pipelines.
Key features
- Step-by-step thinking: Generates a detailed chain of thought before calling tools and delivering a response.
- Reliable function calling: Precise API orchestration and multi-step interaction support.
- Injection defense: Ignores malicious instructions hidden inside external text or API responses.
- Honest refusal: Knows how to stop or ask for clarification if parameters are missing for a task.
What you can do
- Build an AI assistant: Connect external tools like weather forecasts, search engines, or databases.
- Run multi-step search: Gather and synthesize fragmented information from multiple sources.
- Automate workflows: Manage memory and structured data within a conversation.
Example
import torch
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "Rumiii/gemma-4-12B-AgentTracer"
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto",
)
messages = [
{
"role": "system",
"content": "You are Gemma 4 12B AgentTracer, an agentic reasoning and tool-use assistant.",
},
{
"role": "user",
"content": "Hi! Who are you and what can you help me with?",
},
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
enable_thinking=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=1.0,
top_p=0.95,
top_k=64,
)
print(processor.decode(outputs[0][input_len:], skip_special_tokens=False))
Read more
DetailsParameters: ~12 billion (11.96 B)
Hardware: GPU with 24 GB+ VRAM required to run in 16-bit mode
Recommendations: Temperature 1.0, Top-p 0.95, Top-k 64
License: Apache 2.0










Comments