ApX logoApX logo

Gemma 2 9B

Parameters

9B

Context Length

8K

Modality

Text

Architecture

Dense

License

Gemma License

Release Date

27 Jun 2024

Knowledge Cutoff

-

API Pricing (per 1M)

Input: $0.03 · Output: $0.09

System Requirements

VRAM requirements for different quantization methods and context sizes

1,024 tokens

20.58 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

21.88 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: 2.3k · Context: 8Kx 42 layersRMSNormPre-AttentionGrouped-Query Attention32Q / 8KV headsHead dim: 72+RMSNormPre-FFNFeed-Forward NetworkSwiGLU+Final RMSNormOutput Logits

Evaluation Benchmarks

Rank

#171

BenchmarkScoreRank

General Text

Text Arena

1267

146

StackEval

Archived
ProLLM Stack Eval

0.715

16

QA Assistant

Archived
ProLLM QA Assistant

0.822

18

General Knowledge

Reference
MMLU

0.713

24

Summarization

Archived
ProLLM Summarization

0.582

26

Rankings

Overall Rank

#171

Coding Rank

-

About Gemma 2 9B

Gemma 2 9B is a versatile open language model by Google engineered for conversational AI, text generation, and code assistance. Trained on 8T tokens with knowledge distillation, it delivers strong performance across an 8K context window.

Technical Specifications

Attention

Attention Structure

Grouped-Query Attention

Attention Heads

32

Key-Value Heads

8

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

SwigLU

Dimensions

Hidden Dimension Size

2,304

Number of Layers

42

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