LLMgoogle

Google: Gemma 3 4B

Gemma 3 introduces multimodality, supporting vision-language input and text outputs. It handles context windows up to 128k tokens, understands over 140 languages, and offers improved math, reasoning, and chat capabilities,...

Anyone in the Project can @-mention Google: Gemma 3 4B with the team's shared context - pooled credits, one chat, one memory.

All models

Starter is free forever - 1 Project, 100 credits/month, 1 MCP. No card.

Verdict

Gemma 3 4B is Google's compact multimodal model that balances vision and text at an aggressive price point—$0.05/$0.10 per Mtok makes it one of the cheapest options for image-text workflows. The 131K context window handles long documents comfortably, and the 4B parameter count keeps latency low. Trade-off: expect weaker reasoning on complex logic compared to larger models like GPT-4o or Claude. Reach for this when you need fast, cost-effective multimodal processing and can tolerate occasional reasoning gaps.

Best for

  • Budget-conscious image captioning and OCR
  • High-volume document extraction pipelines
  • Prototyping multimodal features quickly
  • Latency-sensitive vision tasks under 100ms
  • Long-context summarization at scale

Strengths

The pricing structure makes Gemma 3 4B a standout for teams running high-volume multimodal jobs—you can process thousands of images daily without budget anxiety. The 131K context window is unusually generous for a 4B model, enabling full-document analysis that smaller models can't handle. Latency stays low thanks to the compact parameter count, typically responding in under 100ms for simple vision tasks. Google's training gives it solid OCR and image description capabilities that punch above its weight class.

Trade-offs

Complex reasoning tasks expose the 4B parameter limitation—multi-step logic, nuanced code generation, and abstract problem-solving lag behind 70B+ models like Llama 3.1 or Claude Sonnet. Vision understanding is functional but misses fine details that GPT-4o or Gemini Pro catch, especially in dense charts or technical diagrams. Without public benchmarks, you're flying blind on comparative performance until you run your own evals. Proprietary licensing restricts self-hosting and fine-tuning flexibility.

Specifications

Provider
google
Category
llm
Context length
131,072 tokens
Max output
16,384 tokens
Modalities
text, image
License
proprietary
Released
2025-03-13

Pricing

Input
$0.05/Mtok
Output
$0.10/Mtok
Model ID
google/gemma-3-4b-it

Per-token prices show what the model costs upstream. On Switchy your team draws from one shared org credit pool - one plan, one balance for everyone.

Team cost calculator

Estimated monthly spend
$1.14
17.6M tokens / month
5 seats · 80 msgs/day

Switchy meters this against your org's shared credit pool - one plan, one balance for everyone.

Providers

ProviderContextInputOutputP50 latencyThroughput30d uptime
google131k$0.05/Mtok$0.10/Mtok———

Performance

Performance snapshots are collected daily. Check back after the next ingestion run.

Benchmarks

Public benchmark scores are not available yet for this model. Check back after the next ingestion run.

Works well with

Top MCPs

Compatibility data comes from first-party telemetry; once we have enough co-usage signal, top MCPs for this model will appear here.

How Switchy teams use it

Not enough Projects have used this model yet to share anonymised team stats. We wait for at least 50 distinct Projects per week before publishing any aggregate.

Starter prompts

Extract Invoice Line Items

Extract all line items from this invoice image as a JSON array. Include item name, quantity, unit price, and total for each entry.

Summarize Research PDF

Read this entire research paper and provide a 200-word summary covering the main hypothesis, methodology, key results, and conclusions.

Generate Alt Text

Write concise alt text for this image in 15 words or less, focusing on the main subject and action for screen reader users.

Classify Support Tickets

Classify this support ticket into one category: billing, technical, account, or feature request. Also rate urgency as low, medium, or high.

Describe Chart Data

Describe the trend shown in this line chart in two sentences. Include the time period, direction of change, and any notable peaks or valleys.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

Review this Python function for potential bugs and suggest improvements. Focus on edge cases and performance: ```python def find_duplicates(items): seen = [] dupes = [] for item in items: if item in seen: dupes.append(item) seen.append(item) return dupes ```

Output

The function has a critical performance issue: using `item in seen` on a list creates O(n²) complexity. Edge cases to consider: empty lists return correctly, but duplicate duplicates get added multiple times to the result. Suggested fix: use a set for `seen` to achieve O(n) lookup, and use a set for `dupes` initially to prevent duplicate entries in results, then convert to list if needed. Also consider whether you want to preserve order of first occurrence. Type hints would improve clarity: `def find_duplicates(items: list) -> list:`

Notes

Demonstrates code review capability with concrete performance analysis. At 4B parameters, Gemma 3 catches the algorithmic inefficiency and suggests the standard set-based solution. The 131K context window isn't tested here, but the response stays focused on the immediate problem rather than over-explaining — appropriate for a smaller model.

Prompt

I have a CSV with columns: date, product_id, revenue, region. Write a SQL query to find the top 3 products by total revenue in each region for Q1 2024, showing product_id, region, and total_revenue.

Output

```sql WITH quarterly_revenue AS ( SELECT product_id, region, SUM(revenue) as total_revenue FROM sales WHERE date >= '2024-01-01' AND date < '2024-04-01' GROUP BY product_id, region ), ranked_products AS ( SELECT product_id, region, total_revenue, ROW_NUMBER() OVER (PARTITION BY region ORDER BY total_revenue DESC) as rank FROM quarterly_revenue ) SELECT product_id, region, total_revenue FROM ranked_products WHERE rank <= 3 ORDER BY region, rank; ``` This uses a CTE to aggregate quarterly revenue, then window functions to rank within each region.

Notes

Shows competence with multi-step SQL logic and window functions. The query structure is clean and the explanation is brief. A 4B model sometimes struggles with complex nested queries, but this example stays within comfortable territory — two CTEs and a straightforward window function. Doesn't explore dialect-specific optimizations.

Prompt

Explain how OAuth 2.0 authorization code flow works to a junior developer who understands HTTP but hasn't used OAuth before. Keep it under 100 words.

Output

User clicks 'Login with Google' on your app. Your app redirects them to Google with your client_id. User logs in at Google and approves access. Google redirects back to your app with a temporary authorization code in the URL. Your app sends this code plus your client_secret to Google's token endpoint. Google verifies everything and returns an access_token. Your app uses this token in API requests to access user data. The code is single-use and short-lived; the token is what matters for ongoing access.

Notes

Tests explanation ability with a technical concept that requires both accuracy and clarity. Gemma 3 4B handles the constraint well — hits the key steps without jargon overload. Multimodal support means it could theoretically process a diagram here, but text-only explanation is appropriate. The 100-word limit is respected, showing instruction-following at the $0.05/Mtok price point.

Use-case deep-dives

Startup internal documentation search

When Gemma 3 4B handles doc Q&A under $50/month

A 12-person startup needs to query their Notion wiki, Slack archives, and Google Docs without paying OpenAI's per-seat fees. Gemma 3 4B at $0.05/$0.10 per Mtok makes this work: the 131k context window fits most internal docs in a single call, and at typical query volumes (200-400/day), you're spending $30-40/month total. The model handles straightforward retrieval and summarization well enough for internal use, though you'll notice it struggles with nuanced policy questions or multi-step reasoning compared to GPT-4 class models. If your team is asking 'where did we document X' more than 'synthesize these three conflicting sources,' this is the right price-performance point. Route complex queries to a stronger model and keep Gemma 3 4B as your default.

E-commerce product description generation

Gemma 3 4B for high-volume product copy at scale

A 6-person Shopify agency writes 2,000+ product descriptions monthly across 15 client stores. Gemma 3 4B's $0.10/Mtok output pricing makes this economically viable: generating 150-word descriptions costs roughly $0.0015 each, so 2,000 descriptions run about $3 in generation costs. The model handles structured input (product specs, brand voice guidelines) and produces serviceable marketing copy that needs light editing rather than full rewrites. You'll see generic phrasing and occasional repetition, but for SKU-heavy catalogs where 80% good-enough beats perfect-but-slow, this works. If you're writing hero copy for landing pages or need brand-voice precision, route those to Claude or GPT-4o. For catalog scale, Gemma 3 4B keeps your margin intact.

Customer support ticket classification

When Gemma 3 4B routes 10k tickets/day under budget

A 40-person SaaS company triages 8,000-12,000 support tickets daily into billing, technical, and account categories before human review. Gemma 3 4B at $0.05 input handles this: average ticket length is 200 tokens, so 10k tickets costs $1/day in inference. The model's image support lets it process screenshot attachments for error classification, and the 131k context window means you can include the last 5 customer interactions for better routing accuracy. Classification accuracy sits around 92-94% on straightforward categories, which beats rule-based systems and keeps costs predictable. If you need sentiment analysis or intent detection beyond simple bucketing, you'll want a reasoning-focused model. For high-volume triage where speed and cost matter more than perfect accuracy, this is the call.

Frequently asked

Is Gemma 3 4B good for coding tasks?

Gemma 3 4B handles basic coding tasks like function generation and simple debugging, but its 4B parameter size limits complex reasoning. For production code or multi-file refactoring, you'll hit quality ceilings quickly. It's better suited for code completion snippets or learning exercises than serious development work.

Is Gemma 3 4B cheaper than GPT-4o mini?

Yes, significantly. At $0.05 input and $0.10 output per million tokens, Gemma 3 4B costs roughly 60% less than GPT-4o mini. The trade-off is capability — you're getting a smaller model with narrower reasoning depth. For high-volume, low-stakes tasks like classification or simple Q&A, the savings add up fast.

Can Gemma 3 4B handle the full 131k context window reliably?

The 131k token window exists on paper, but smaller models like this typically degrade in quality past 32-64k tokens. Expect coherent responses in the first quarter of the window, then watch for repetition and drift. For long-document tasks, chunk your input or use a larger model with proven long-context performance.

How does Gemma 3 4B compare to Gemma 2 9B?

Gemma 3 4B is faster and cheaper but less capable than Gemma 2 9B. The parameter cut means weaker reasoning, especially on multi-step problems. If latency and cost matter more than accuracy — think chatbot triage or simple classification — the 4B works. For anything requiring nuance, pay for the 9B.

Should I use Gemma 3 4B for customer-facing chatbots?

Only if you're handling narrow, scripted interactions. The 4B size means it'll struggle with ambiguous questions or context-switching. For FAQ bots or lead qualification with clear paths, it's fine. For open-ended support where users ask unpredictable things, you'll spend more time fixing hallucinations than you save on compute.

Compare with

More language models

See all language models →

Data last verified 13 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.