Instructions to use google/gemma-7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use google/gemma-7b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="google/gemma-7b-GGUF", filename="gemma-7b.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-7b-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-7b-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-7b-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf google/gemma-7b-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-7b-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-7b-GGUF # Run inference directly in the terminal: ./llama-cli -hf google/gemma-7b-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-7b-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf google/gemma-7b-GGUF
Use Docker
docker model run hf.co/google/gemma-7b-GGUF
- LM Studio
- Jan
- Ollama
How to use google/gemma-7b-GGUF with Ollama:
ollama run hf.co/google/gemma-7b-GGUF
- Unsloth Studio new
How to use google/gemma-7b-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-7b-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-7b-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-7b-GGUF to start chatting
- Docker Model Runner
How to use google/gemma-7b-GGUF with Docker Model Runner:
docker model run hf.co/google/gemma-7b-GGUF
- Lemonade
How to use google/gemma-7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull google/gemma-7b-GGUF
Run and chat with the model
lemonade run user.gemma-7b-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Error: pull model manifest ollama
Hi, I try to use the model with Ollama according to https://huggingface.co/docs/hub/ollama but it is not working.
command :ollama run hf.co/google/gemma-7b-GGUF
result:
pulling manifest
Error: pull model manifest: Get "Authentication%!r(MISSING)equired?nonce=VZsAKGnamjCp-giE0xXapw&scope=&service=&ts=1729508446": unsupported protocol scheme ""
Hi @kudukudu ,
when trying to use ollama run hf.co/google/gemma-7b-GGUF. This often happens because of how Ollama handles direct Hugging Face URLs, especially for gated models.
The most reliable way to get Gemma running with Ollama is to use the models directly from Ollama's official model library. These models are pre-configured and optimized for Ollama's ecosystem.
Instead of: ollama run hf.co/google/gemma-7b-GGUF
ollama run gemma:7b
Ollama maintains its own comprehensive library of popular models. When you use a tag like gemma:7b, Ollama knows to pull the appropriate Gemma 7B model directly from its own verified sources, by passing any complexities associated with directly parsing Hugging Face URLs or handling gated model access tokens in that specific context. Kindly try and let us know if you have any concerns.
Thank you.