ApX logoApX logo

Gemma 2 2B

Parameters

2B

Context Length

8K

Modality

Text

Architecture

Dense

License

Gemma License

Release Date

27 Jun 2024

Knowledge Cutoff

Jun 2024

API Pricing (per 1M)

Self-hosted only

System Requirements

VRAM requirements for different quantization methods and context sizes

1,024 tokens

5.76 GB VRAM

Consumer

1x RTX 4090

24GB VRAM

Datacenter

1x NVIDIA A100

80GB VRAM

Apple Silicon

1x Apple M3 Max

128GB VRAM

8,192 tokens

6.16 GB VRAM

Consumer

1x RTX 4090

24GB VRAM

Datacenter

1x NVIDIA A100

80GB VRAM

Apple Silicon

1x Apple M3 Max

128GB VRAM

Architecture Diagram

Input TokensToken EmbeddingPosition: RoPEHidden: 2k · Context: 8Kx 26 layersRMSNormPre-AttentionGrouped-Query Attention16Q / 4KV headsHead dim: 128+RMSNormPre-FFNFeed-Forward NetworkGELU+Final RMSNormOutput Logits

Evaluation Benchmarks

Rank

#188

BenchmarkScoreRank

General Text

Text Arena

1200

159

Rankings

Overall Rank

#188

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.

Technical Specifications

Attention

Attention Structure

Grouped-Query Attention

Attention Heads

16

Key-Value Heads

4

Attention Head Dimension

-

Position Embedding

ROPE

RoPE Theta

-

Sliding Window Attention

-

Sliding Window Size

-

Sliding Window Ratio

-

Linear Attention

-

Linear Attention Ratio

-

Normalization

RMS Normalization

Activation Function

GELU

Dimensions

Hidden Dimension Size

2,048

Number of Layers

26

FFN Intermediate Size (Dense)

-

Multi-Token Prediction Heads

-

Tokenizer

Vocabulary Size

-

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
Gemma 2 2B: Specifications and GPU VRAM Requirements