ApX logoApX logo
CalculatorCoursesPricing

Gemma 2 9B

Open Source
Open Weights

Parameters

9B

Context Length

8K

Modality

Text

Architecture

Dense

KV Cache Rate

95 KB/tok

License

Gemma License

Release Date

27 Jun 2024

Knowledge Cutoff

-

API Pricing (per 1M)

Input: $0.03 · Output: $0.09

Hardware & System Requirements

Precision

Context

Workload Memory: 7.43 GB

vLLM

INT4 · 8K context · 1 user

Base Weights: 4.19 GB

KV Cache: 0.74 GB

Runtime & Graphs: 2.50 GB

Minimum Required Hardware

1x NVIDIA L4 24GB

vLLM

7.4 / 21.6 GB

1x RTX 3060 12GB

llama.cpp

7.4 / 11.2 GB

Apple M4 24GB

llama.cpp

7.4 / 18.0 GB

Determine requirements for concurrent users or multi-node clusters:

Runtime compatibility

Verified on hardware and checkpoint files.

Checkpoint format

FP32

CUDA

13.0

PyTorch

2.14.0

Transformers

≥ 4.40.1

ArchitecturePrecisionKernel

Hopper

Native BF16

FlashAttention-3

Architecture Diagram

Evaluation Benchmarks

Rank

#226

BenchmarkScoreRank

General Text

Text Arena

1267.05

#180

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

#226

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.

Specifications

Attention

Attention Structure

Grouped-Query Attention

Attention Heads

32

Key-Value Heads

8

Position Embedding

ROPE

Normalization

RMS Normalization

Activation Function

SwiGLU

Dimensions

Base Precision

FP16

Hidden Dimension Size

2,304

Number of Layers

42

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 9B Size, VRAM & Hardware Requirements