Gemma 1 7B

Parameters

7B

Context Length

8K

Modality

Text

Architecture

Dense

KV Cache Rate

336 KB/tok

License

Gemma Terms of Use

Release Date

21 Feb 2024

Knowledge Cutoff

-

API Pricing (per 1M)

Input: $0.05 · Output: $0.08

Hardware & System Requirements

Precision

Native

Context

Workload Memory: 8.38 GB

INT4 · 8K context

Base Weights: 3.26 GB

KV Cache: 2.63 GB

Runtime & Graphs: 2.50 GB

Minimum Required Hardware

1x NVIDIA L4 24GB

8.4 / 21.6 GB usable

1x RTX 3060 12GB

8.4 / 10.8 GB usable

Apple M4 24GB

8.4 / 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

Input TokensToken EmbeddingPosition: RoPEHidden: 3.1k · Context: 8Kx 28 layersRMSNormPre-AttentionMulti-Head Attention32Q / 32KV headsHead dim: 96+RMSNormPre-FFNFeed-Forward NetworkActivation+Final RMSNormOutput Logits

Evaluation Benchmarks

Rank

#246

BenchmarkScoreRank

General Text

Text Arena

1138

194

Rankings

Overall Rank

#246

Coding Rank

-

About Gemma 1 7B

Gemma 1 7B is Google's foundational open-weights decoder-only transformer engineered for general text generation and reasoning. Trained on 6T tokens, it offers an efficient balance of capability and accessible deployment on local workstations.

Specifications

Attention

Attention Structure

Multi-Head Attention

Attention Heads

32

Key-Value Heads

32

Position Embedding

ROPE

Normalization

RMS Normalization

Dimensions

Base Precision

FP16

Hidden Dimension Size

3,072

Number of Layers

28

About Gemma 1

Gemma 1 is a family of lightweight, decoder-only transformer models from Google, available in 2B and 7B parameter sizes. Designed for various text generation tasks, they incorporate rotary positional embeddings, shared input/output embeddings, GEGLU activation, and RMSNorm. The 2B model uses multi-query attention, while 7B uses multi-head attention.


Other Gemma 1 Models
Gemma 1 7B - VRAM Requirements, Specs & Benchmarks