ApX logoApX logo

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 Sizing

Precision

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

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

#230

BenchmarkScoreRank

General Text

Text Arena

1200

183

Rankings

Overall Rank

#230

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

Position Embedding

ROPE

Normalization

RMS Normalization

Activation Function

GELU

Dimensions

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