LLM·Dex
Open weightsGooglesmalltext

Gemma 2 2B

Google's 2B Gemma, built for laptop and phone inference under tight memory budgets.

Updated


Quick facts

Released
Jul 2024
Context
8.2K tokens
Output / 1M
Pricing not published
License
Gemma License

About Gemma 2 2B

Gemma 2 2B is Google's smallest open-weight model, designed for on-device inference on phones and laptops. Surprisingly capable for its size on simple chat and classification tasks, with broad tooling support via Ollama, MLX, and llama.cpp.

For truly resource-constrained edge deployments, it's one of the few mainstream-vendor models that fits in under 2GB after 4-bit quantization.

Benchmarks

Published scores from Google's model card or independent leaderboards. We do not publish numbers we cannot source, see methodology.

HumanEval
,
Python coding pass@1
MMLU
,
Broad academic knowledge
GPQA
,
Graduate-level reasoning
SWE-bench
,
Real software-engineering tasks
Benchmark scores not yet available. We only publish numbers we can source from official model cards or independent leaderboards, see methodology.

Capabilities

Strengths

  • Tiny, runs on phones
  • Wide tooling

Tracked weaknesses

  • Quality very limited
  • Custom license

Pricing

Per-million-token rates as published by Google.

Per-token pricing not yet published for Gemma 2 2B. Check the official provider site for current tiers.

Call Gemma 2 2B from your code

Drop-in snippet for the Google SDK. Set your API key in the environment and run.

typescript
import { GoogleGenerativeAI } from "@google/generative-ai";

const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const model = genAI.getGenerativeModel({ model: "gemma-2-2b" });

const result = await model.generateContent(
  "What's the time complexity of quicksort?",
);

console.log(result.response.text());

Compare Gemma 2 2B with…

Frequently asked

  • How much does Gemma 2 2B cost?
    Google has not published per-token API pricing for Gemma 2 2B at the time of writing. Check the official site for current pricing tiers, or compare against alternative models on LLMDex.
  • What is Gemma 2 2B's context window?
    Gemma 2 2B supports a context window of 8.2K tokens.
  • Is Gemma 2 2B open source?
    Gemma 2 2B ships with open weights under the Gemma License license. You can self-host it, fine-tune it, and (subject to the license terms) deploy it commercially.
  • When was Gemma 2 2B released?
    Gemma 2 2B was released on Jul 31, 2024 by Google.
Friday digest

Intelligence, distilled weekly.

One short email every Friday, new model launches, leaderboard moves, and pricing drops. Curated by hand. Free, no spam.