RecurrentGemma-2B logo

RecurrentGemma-2B

Free

Open weights language model from Google DeepMind, based on Griffin

FreeFree tier
Inputs: textOutputs: text
Type
Open Source
Company
Google DeepMind

About RecurrentGemma-2B

RecurrentGemma is a family of open-weights language models developed by Google DeepMind, based on the novel Griffin architecture. This architecture significantly improves inference speed for long sequences by replacing global attention with a mixture of local attention and linear recurrences. The repository provides model implementations in Flax (optimized) and PyTorch (reference), along with examples for sampling and fine-tuning. Pre-trained checkpoints (2B parameters) are available on Kaggle, and the project includes Colab tutorials for JAX and PyTorch sampling as well as JAX fine-tuning.

Key Features

Novel Griffin architecture with local attention and linear recurrences
Fast inference for long sequences
Open-weights model (2B parameters)
Optimized Flax implementation and reference PyTorch implementation
Examples for sampling and fine-tuning
Colab tutorials for JAX and PyTorch sampling, plus JAX fine-tuning
Available via Kaggle with model weights and tokenizer
Supports Poetry and pip installation

Pros & Cons

Pros
  • Fast inference for long sequences due to Griffin architecture
  • Open-weights allowing full access and modification
  • Multiple framework support (Flax optimized, PyTorch reference)
  • Comprehensive example scripts and Colab notebooks
  • Backed by Google DeepMind with published technical report
Cons
  • PyTorch implementation is un-optimized reference only
  • Requires downloading model weights from Kaggle with a Kaggle account
  • Limited to 2B parameter model size; no larger variants mentioned
  • Dependency on JAX or PyTorch with specific installations

Best For

Language generation and samplingFine-tuning for custom tasks (e.g., English-to-French translation)Research into efficient recurrent architectures for language modelsDeploying fast inference for long-context applications

FAQ

What architecture does RecurrentGemma use?
RecurrentGemma is based on the Griffin architecture, which replaces global attention with a mixture of local attention and linear recurrences for faster inference on long sequences.