Gemma 2 2B

Parameters

2B

Context Length

8K

Modality

Text

Architecture

Dense

KV Cache Rate

52 KB/tok

License

Gemma License

Release Date

27 Jun 2024

Knowledge Cutoff

Jun 2024

API Pricing (per 1M)

Self-hosted only

Hardware & System Requirements

Precision

Native

Context

Workload Memory: 3.84 GB

INT4 · 8K context

Base Weights: 0.93 GB

KV Cache: 0.41 GB

Runtime & Graphs: 2.50 GB

Minimum Required Hardware

1x NVIDIA L4 24GB

3.8 / 21.6 GB usable

1x RTX 3060 12GB

3.8 / 10.8 GB usable

Apple M4 24GB

3.8 / 18.0 GB usable

Determine requirements for your specific workload:

Open in VRAM Calculator

Runtime requirements

Checkpoint format

FP16

CUDA

>= 11.8

PyTorch

>= 2.1

Transformers

>= 4.40.1

ArchitecturePrecisionAttention kernel

Blackwell, Hopper

Native FP16

FlashAttention-3

Ada Lovelace, Ampere

Native FP16

FlashAttention-2

Architecture Diagram

Evaluation Benchmarks

Rank

#237

BenchmarkScoreRank

General Text

Text Arena

1200

185

Rankings

Overall Rank

#237

Coding Rank

-

About Gemma 2 2B

Gemma 2 2B is a compact, open-weights language model developed by Google for resource-constrained edge and mobile deployments. Distilled from larger Gemini architectures, it provides efficient reasoning and text generation with low memory overhead.

Specifications

Attention

Attention Structure

Grouped-Query Attention

Attention Heads

16

Key-Value Heads

4

Position Embedding

ROPE

Normalization

RMS Normalization

Activation Function

GELU

Dimensions

Base Precision

FP16

Hidden Dimension Size

2,048

Number of Layers

26

About Gemma 2

Gemma 2 is Google's family of open large language models, offering 2B, 9B, and 27B parameter sizes. Built upon the Gemma architecture, it incorporates innovations such as interleaved local and global attention, logit soft-capping for training stability, and Grouped Query Attention for inference efficiency. The smaller models leverage knowledge distillation.


Other Gemma 2 Models