# Gemma

CreateWithAI Hub page: https://createwithaihub.com/ai-models/gemma
Latest version of this file: https://createwithaihub.com/ai-models/gemma.md

- Type: AI model · Category: AI Models
- Publisher: Google DeepMind
- Pricing: Free · License: Apache-2.0
- Runs on: API (cloud)

Google DeepMind's Apache-2.0 open-weight Gemma 4 models, from on-device E2B to 31B, with text, image and audio input.

Gemma is Google DeepMind's family of open-weight models. The current generation, Gemma 4 (April 2026), comes in E2B, E4B and 12B dense models that accept text, image and audio, a 26B A4B mixture-of-experts model and a 31B dense model, with 128K to 256K context. Gemma 4 is released under Apache-2.0 and runs locally with tools like Ollama, LM Studio, llama.cpp and Transformers, free of charge through the Gemini API, or on Vertex AI in Google Cloud.

Useful for: Running a capable multimodal model on a laptop or phone, or fine-tuning a small open model for a specific task without license restrictions.

## Key features

- Sizes from E2B and E4B (on-device) to 26B A4B MoE and 31B dense
- Text and image input on all sizes; audio on E2B, E4B and 12B
- 128K context on small models, 256K on larger ones
- Apache-2.0 license for Gemma 4
- Weights on Hugging Face and Kaggle; runs in Ollama, LM Studio, llama.cpp, MLX and vLLM
- Free use through Google AI Studio and the Gemini API

## Connection

- Capability: Reasoning, Coding, Chat, Vision
- Modality: Text, Image, Audio, Multimodal
- Weights: Open-weight
- Local or hosted: Can run locally, Hosted
- API availability: Official API
- Free usage: Free usage available
- Provider: Google
- Model family: Gemma

## Install steps from the official documentation

Transformers (from the Hugging Face model card):

```
pip install -U transformers torch accelerate
```

## Limitations

- Audio clips up to 30 seconds and video only as frames (up to 60 s at 1 fps)
- The 31B model needs about 70 GB of memory in BF16
- No paid Gemini API tier for Gemma, so production rate limits are those of the free tier

## Official links

- Website: https://deepmind.google/models/gemma/
- Documentation: https://gemma.ai/models/gemma-4
- Source: https://gemma.ai/models/gemma-4 (Gemma 4 sizes, hardware needs and where it runs (ai.google.dev/gemma redirects here))
- Source: https://huggingface.co/google/gemma-4-12B-it (Sizes, modalities, context lengths, audio/video limits, Transformers install)
- Source: https://huggingface.co/api/models/google/gemma-4-31B-it (license:apache-2.0 tag; license link ai.google.dev/gemma/docs/gemma_4_license)
- Source: https://gemma.ai/resources/apache-2/ (Gemma 4 license page is the Apache 2.0 text)
- Source: https://deepmind.google/models/gemma/ (April 2026 release, availability in AI Studio and other platforms)
- Source: https://aistudio.google.com/docs/pricing (Gemma free of charge on the free tier; paid tier not available)
- Source: https://cloud.google.com/blog/products/ai-machine-learning/gemma-4-available-on-google-cloud (Gemma 4 on Vertex AI Model Garden, Cloud Run and GKE; Apache 2.0)
- Source: https://gemma.ai/resources/terms/ (Gemma Terms of Use cover Gemma 1 to 3n; Gemma 4 has its own license)
