Skip to content

Commit 7a2a36d

Browse files
authored
docs: fix Gemma 4 Colab notebook (abetlen#2275)
* docs: fix Gemma 4 Colab notebook * docs: use smaller Gemma 4 Colab model * docs: update Gemma 4 Colab CTA
1 parent 8949066 commit 7a2a36d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,11 @@ Below are the supported multi-modal models and their respective chat handlers (P
535535
| [llama-3-vision-alpha](https://huggingface.co/abetlen/llama-3-vision-alpha-gguf) | `Llama3VisionAlphaChatHandler` | `llama-3-vision-alpha` |
536536
| [minicpm-v-2.6](https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf) | `MiniCPMv26ChatHandler` | `minicpm-v-2.6` |
537537
| [qwen2.5-vl](https://huggingface.co/unsloth/Qwen2.5-VL-3B-Instruct-GGUF) | `Qwen25VLChatHandler` | `qwen2.5-vl` |
538-
| [gemma-4](https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/abetlen/llama-cpp-python/blob/main/examples/colab/notebook.ipynb) | `Gemma4ChatHandler` | `gemma4` |
538+
| [gemma-4](https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF) | `Gemma4ChatHandler` | `gemma4` |
539539
| GGUF models with an mtmd projector and embedded chat template | `MTMDChatHandler` | `mtmd` |
540540

541+
Try Gemma 4 12B in Google Colab -> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/abetlen/llama-cpp-python/blob/main/examples/colab/notebook.ipynb)
542+
541543
Then you'll need to use a custom chat handler to load the clip model and process the chat messages and images.
542544

543545
```python

examples/colab/notebook.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
" messages=[\n",
8282
" {\n",
8383
" \"role\": \"user\",\n",
84-
" \"content\": \"Write the exact string `<stdio.h>` and nothing else.\",\n",
84+
" \"content\": \"What is the capital of France? Answer in one sentence.\",\n",
8585
" }\n",
8686
" ],\n",
8787
" max_tokens=32,\n",
@@ -99,7 +99,7 @@
9999
"source": [
100100
"from IPython.display import Image, display\n",
101101
"\n",
102-
"IMAGE_URL = \"https://raw.githubusercontent.com/abetlen/llama-cpp-python/main/vendor/llama.cpp/tools/mtmd/test-1.jpeg\"\n",
102+
"IMAGE_URL = \"https://raw.githubusercontent.com/ggml-org/llama.cpp/master/tools/mtmd/test-1.jpeg\"\n",
103103
"\n",
104104
"display(Image(url=IMAGE_URL, width=320))\n"
105105
]

0 commit comments

Comments
 (0)