Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/capabilities/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/capabilities/kitchen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/capabilities/roses-are.wav
Binary file not shown.
Binary file added docs/assets/capabilities/surprise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/deployment/ai-edge-gallery.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: AI Edge Gallery
title: Try Gemma on your phone with AI Edge Gallery
description: Run Gemma 4 on an Android or iOS phone with no code — chat, vision, audio transcription and benchmarking, fully offline.
models: [gemma-4]
frameworks: [litert, android, ios]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/gemini-api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Gemini API
title: Run Gemma with the Gemini API
description: Call hosted Gemma 4 models through the Gemini API instead of running and serving your own instance.
models: [gemma-4]
frameworks: [gemini-api]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/google-cloud.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Google Cloud
title: Gemma on Google Cloud
description: "Deploy, serve, and fine-tune Gemma 4 on Google Cloud: Cloud Run, GKE, the Agent Development Kit, vLLM on TPUs, MaxText, and Sovereign Cloud."
models: [gemma-4]
frameworks: [google-cloud, vllm]
Expand Down
6 changes: 3 additions & 3 deletions docs/deployment/huggingface.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Run Gemma with Hugging Face Transformers
description: Generating text, summarizing, and analysing content are just some of the tasks you can accomplish with Gemma open models.
description: "Run Gemma 4 with Hugging Face Transformers in Python for text, image, audio, and multi-turn chat generation."
models: [gemma-4, gemma-3, gemma-3n]
frameworks: [transformers]
source_url: "https://ai.google.dev/gemma/docs/core/huggingface_inference.md.txt"
Expand Down Expand Up @@ -163,7 +163,7 @@ messages = [
"role": "user",
"content": [
{"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
{"type": "audio", "audio": "https://ai.google.dev/gemma/docs/audio/roses-are.wav"},
{"type": "audio", "audio": "https://gemma.ai/assets/capabilities/roses-are.wav"},
]
}
]
Expand All @@ -176,7 +176,7 @@ pipe(text=messages, return_full_text=False, generate_kwargs=gen_kwargs)
'content': [{'type': 'text',
'text': 'Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.'},
{'type': 'audio',
'audio': 'https://ai.google.dev/gemma/docs/audio/roses-are.wav'}]}],
'audio': 'https://gemma.ai/assets/capabilities/roses-are.wav'}]}],
'generated_text': 'Roses are red, violets are blue.<turn|>'}]
```

Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/keras.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Run Gemma with Keras
description: Generating content, summarizing, and analysing content are just some of the tasks you can accomplish with Gemma open models.
description: "Run Gemma 4 inference with Keras and KerasHub for text and multimodal image generation in Python."
models: [gemma-4]
frameworks: [keras]
source_url: "https://ai.google.dev/gemma/docs/core/keras_inference.md.txt"
Expand Down Expand Up @@ -269,7 +269,7 @@ Load the image and format the data so the model can process it. Use `read_image(
from matplotlib import pyplot as plt

image = read_image(
"https://ai.google.dev/gemma/docs/images/thali-indian-plate.jpg"
"https://gemma.ai/assets/deployment/thali-indian-plate.jpg"
)
plt.imshow(image)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/litert.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: LiteRT-LM
title: Run Gemma on-device with LiteRT-LM
description: Run Gemma 4 on-device with LiteRT-LM — CLI install, prebuilt .litertlm weights, and exporting your own fine-tune.
models: [gemma-4]
frameworks: [litert]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/llamacpp.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: llama.cpp
title: Run Gemma with llama.cpp
description: Run Gemma 4 with llama.cpp — GGUF repos for every size, image/audio/video input, and the OpenAI-compatible server.
models: [gemma-4]
frameworks: [llamacpp]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/lmstudio.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: LM Studio
title: Run Gemma with LM Studio
description: Run Gemma 4 with LM Studio — desktop app, lms CLI, and the OpenAI-compatible local server.
models: [gemma-4]
frameworks: [lmstudio]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/mlx.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Apple MLX
title: Run Gemma with MLX
description: Run Gemma 4 on Apple silicon with MLX — text and vision generation, model repos, and the OpenAI-compatible server.
models: [gemma-4]
frameworks: [mlx]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/ollama.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Ollama
title: Run Gemma with Ollama
description: Run Gemma 4 locally with Ollama — model tags, image input, and the OpenAI-compatible server.
models: [gemma-4]
frameworks: [ollama]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/sglang.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: SGLang
title: Serve Gemma with SGLang
description: Serve Gemma 4 with SGLang — install, launch_server, model repositories, and the OpenAI-compatible API.
models: [gemma-4]
frameworks: [sglang]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/unsloth.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Unsloth
title: Run Gemma with Unsloth
description: Run Gemma 4 with Unsloth — the desktop Studio app, dynamic-quant GGUFs for llama.cpp, and 2x faster fine-tuning.
models: [gemma-4]
frameworks: [unsloth, llamacpp]
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/vllm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: vLLM
title: Serve Gemma with vLLM
description: Serve Gemma 4 with vLLM — install, vllm serve, model repositories, and the OpenAI-compatible API.
models: [gemma-4]
frameworks: [vllm]
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/capabilities/audio.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Audio understanding
description: Starting with Gemma 3n, you can use audio directly into your prompts and workflows.
description: "Process and transcribe speech, music, and sound inputs with Gemma 4 and Gemma 3n multimodal audio understanding."
models: [gemma-4]
requires: audio
frameworks: [transformers]
Expand Down Expand Up @@ -185,7 +185,7 @@ messages = [
"role": "user",
"content": [
{"type": "text", "text": "Transcribe the following speech segment in English, then translate it into Korean. When formatting the answer, first output the transcription in English, then one newline, then output the string 'Korean: ', then the translation in Korean."},
{"type": "audio", "audio": "https://ai.google.dev/gemma/docs/audio/roses-are.wav"},
{"type": "audio", "audio": "https://gemma.ai/assets/capabilities/roses-are.wav"},
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/capabilities/function-calling.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Tool calling
description: When using a generative artificial intelligence (AI) model such as Gemma, you may want to use the model to operate programming interfaces in order to complete tasks or answer questions.
description: "Build agentic workflows with Gemma 4 native tool calling and structured function schemas in Hugging Face Transformers."
models: [gemma-4]
frameworks: [transformers]
colab: https://colab.research.google.com/github/google-gemma/docs/blob/main/docs/notebooks/function-calling-gemma-4-e2b.ipynb
Expand Down
8 changes: 4 additions & 4 deletions docs/get-started/capabilities/image.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Image understanding
description: You can use Gemma 3 and later models to analyze and understand the content of images.
description: "Analyze images with Gemma 4 using variable aspect ratios, configurable vision token budgets, and multi-image prompts."
models: [gemma-4]
frameworks: [transformers]
colab: https://colab.research.google.com/github/google-gemma/docs/blob/main/docs/notebooks/image-gemma-4-e2b.ipynb
Expand Down Expand Up @@ -103,8 +103,8 @@ config.max_new_tokens = 512
gen_kwargs = dict(generation_config=config)

img_urls = [
"https://ai.google.dev/gemma/docs/capabilities/vision/images/surprise.png",
"https://ai.google.dev/gemma/docs/capabilities/vision/images/kitchen.jpg",
"https://gemma.ai/assets/capabilities/surprise.png",
"https://gemma.ai/assets/capabilities/kitchen.jpg",
]
for img in img_urls:
display(Image.open(requests.get(img, stream=True).raw))
Expand Down Expand Up @@ -196,7 +196,7 @@ config = GenerationConfig.from_pretrained(MODEL_ID)
config.max_new_tokens = 512
gen_kwargs = dict(generation_config=config)

img_url = "https://ai.google.dev/gemma/docs/capabilities/vision/images/cat.png"
img_url = "https://gemma.ai/assets/capabilities/cat.png"
input_image = Image.open(requests.get(img_url, stream=True).raw)
display(input_image)

Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/capabilities/video.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Video understanding
description: Video data is a rich source of information that can help you accomplish tasks and understand the world around you.
description: "Analyze video clips and interleaved frame sequences with Gemma 4 multimodal vision-language models."
models: [gemma-4]
frameworks: [transformers]
colab: https://colab.research.google.com/github/google-gemma/docs/blob/main/docs/notebooks/video-gemma-4-e2b.ipynb
Expand Down
Loading
Loading