Instructions to use google/gemma-7b-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-7b-it-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="google/gemma-7b-it-GGUF", filename="gemma-7b-it.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use google/gemma-7b-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-7b-it-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-7b-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-7b-it-GGUF # Run inference directly in the terminal: llama-cli -hf google/gemma-7b-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-7b-it-GGUF # Run inference directly in the terminal: ./llama-cli -hf google/gemma-7b-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-7b-it-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf google/gemma-7b-it-GGUF
Use Docker
docker model run hf.co/google/gemma-7b-it-GGUF
- LM Studio
- Jan
- Ollama
How to use google/gemma-7b-it-GGUF with Ollama:
ollama run hf.co/google/gemma-7b-it-GGUF
- Unsloth Studio
How to use google/gemma-7b-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-7b-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-7b-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-7b-it-GGUF to start chatting
- Docker Model Runner
How to use google/gemma-7b-it-GGUF with Docker Model Runner:
docker model run hf.co/google/gemma-7b-it-GGUF
- Lemonade
How to use google/gemma-7b-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull google/gemma-7b-it-GGUF
Run and chat with the model
lemonade run user.gemma-7b-it-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Quantized Models?
Almost none of the people interested in running a 7B model want or need to run the f32 model (vram isn't infinite on consumer GPUs)
It would be nice to have some models with quantized weights in GGUF format (most people don't want to download a file over 30gb just to quantize it down to 8 or 4 bits)
float32 weights only make sense on the gemma-2b and gemma-7b models (the ones that aren't already instruction-tuned or in GGUF, a format that doesn't allow finetuning)
Hi @PFnove , Sorry for late response,
You're right , the float32 versions are not the workhorses of the consumer LLM space. They are the foundational checkpoints , which serve as the source material for creating the more accessible, quantized versions. This is why you often see models released in a full-precision format first—it allows the community to create a variety of quantized versions optimized for different hardware and use cases.
The Hugging Face Hub is the central repository for pre-quantized models. You'll find that many community members, particularly those from projects like llama.cpp and creators like TheBloke, have already done the work of converting and quantizing popular models. You can filter the models by the GGUF tag to find a comprehensive list.
Thank you.