Instructions to use google/gemma-2b-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use google/gemma-2b-it-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="google/gemma-2b-it-GGUF", filename="gemma-2b-it.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use google/gemma-2b-it-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf google/gemma-2b-it-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-2b-it-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf google/gemma-2b-it-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-2b-it-GGUF
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf google/gemma-2b-it-GGUF # Run inference directly in the terminal: ./llama-cli -hf google/gemma-2b-it-GGUF
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf google/gemma-2b-it-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf google/gemma-2b-it-GGUF
Use Docker
docker model run hf.co/google/gemma-2b-it-GGUF
- LM Studio
- Jan
- Ollama
How to use google/gemma-2b-it-GGUF with Ollama:
ollama run hf.co/google/gemma-2b-it-GGUF
- Unsloth Studio new
How to use google/gemma-2b-it-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for google/gemma-2b-it-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for google/gemma-2b-it-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for google/gemma-2b-it-GGUF to start chatting
- Docker Model Runner
How to use google/gemma-2b-it-GGUF with Docker Model Runner:
docker model run hf.co/google/gemma-2b-it-GGUF
- Lemonade
How to use google/gemma-2b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull google/gemma-2b-it-GGUF
Run and chat with the model
lemonade run user.gemma-2b-it-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Is there any hope to make 500M and 1B parameters like apple OpenELM?
I'm just wondering what if there is these sizes? that would be nice special on Android device
Some apps need tiny, mini or medium models for simple tasks not for QnA, i mean summarize, explain, text editing, etc
I so trust on google and I know maybe I'll see more models on future, Google Gemma is the only model who understands Arabic because Gemma Tokenizer split word not letters like gpt which mean he can understand meaning between words not letters, that reduce mistakes,
Finally I want to repeat Apple made big family of sizes why google don't?
Hi @yousef1727 , Great news! Based on your feedback, the Gemma team has released smaller Gemma 3 models, including the Gemma3-1b (both pretrained and instruction-tuned) specifically for text generation. We hope this meets your needs!
Thanks 👍 that can help me to continue my work with AI (Artificial Intelligence)