Instructions to use steampunque/gemma-3-4b-it-MP-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use steampunque/gemma-3-4b-it-MP-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H # Run inference directly in the terminal: llama cli -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H # Run inference directly in the terminal: llama cli -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
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 steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H # Run inference directly in the terminal: ./llama-cli -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
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 steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H # Run inference directly in the terminal: ./build/bin/llama-cli -hf steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
Use Docker
docker model run hf.co/steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
- LM Studio
- Jan
- Ollama
How to use steampunque/gemma-3-4b-it-MP-GGUF with Ollama:
ollama run hf.co/steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
- Unsloth Studio
How to use steampunque/gemma-3-4b-it-MP-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 steampunque/gemma-3-4b-it-MP-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 steampunque/gemma-3-4b-it-MP-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for steampunque/gemma-3-4b-it-MP-GGUF to start chatting
- Docker Model Runner
How to use steampunque/gemma-3-4b-it-MP-GGUF with Docker Model Runner:
docker model run hf.co/steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
- Lemonade
How to use steampunque/gemma-3-4b-it-MP-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull steampunque/gemma-3-4b-it-MP-GGUF:Q6_K_H
Run and chat with the model
lemonade run user.gemma-3-4b-it-MP-GGUF-Q6_K_H
List all available models
lemonade list
- Atomic Chat
Mixed Precision GGUF layer quantization of gemma-3-4b-it by Google
Original model: https://huggingface.co/google/gemma-3-4b-it
The hybrid quant employs different quantization levels on a per layer basis to increased flexibility of trading off performance vs file size. Less parameter bits are used at deep layers and more bits at cortex layers to simultaneously optimize quantized size and model performance. This quant was designed to approximately match Q6_K size with improved performance while using all K-quants for faster CPU processing when partially offloaded. For this file the layer quants are as follows:
LAYER_TYPES='[
[0 ,"Q8_0" ],[1 ,"Q6_K" ],[2 ,"Q5_K_M"],[3 ,"Q5_K_S"],[4 ,"Q5_K_M"],[5 ,"Q5_K_M"],
[6 ,"Q5_K_M"],[7 ,"Q5_K_M"],[8, "Q6_K" ],[9, "Q5_K_M"],[10,"Q6_K" ],[11,"Q5_K_M"],
[12,"Q6_K" ],[13,"Q5_K_M"],[14,"Q6_K" ],[15,"Q5_K_M"],[16,"Q6_K" ],[17,"Q5_K_M"],
[18,"Q6_K" ],[19,"Q6_K" ],[20,"Q6_K" ],[21,"Q6_K" ],[22,"Q6_K" ],[23,"Q6_K" ],
[24,"Q8_0" ],[25,"Q6_K" ],[26,"Q8_0" ],[27,"Q6_K" ],[28,"Q8_0" ],[29,"Q6_K" ],
[30,"Q8_0" ],[31,"Q6_K" ],[32,"Q8_0" ],[33,"Q8_0" ]
]'
FLAGS="--token-embedding-type Q6_K --output-tensor-type Q6_K"
This quant was optimized for high reasoning + knowledge performance across a range of test prompts.
Comparison:
| Quant | size | PPL | Comment |
|---|---|---|---|
| Q6_K | 3.2e9 | 14.3 | default embed and output |
| Q6_K_H | 3.2e9 | 14.5 | Q6_K embed Q6_K output |
Usage:
gemma-3 4b is a vision capable model. It can be used together with its multimedia projector layers to process images and text inputs and generate text outputs. The mmproj file is made available in this repository. To test vision mode follow the docs in the mtmd readme in the tools directory of the source tree https://github.com/ggml-org/llama.cpp/blob/master/tools/mtmd/README.md .
The model also uses sliding window attention. Use of llama.cpp b5554 and above is recommend for support of the SWA mode. If --swa-full flag is used, the old method of keeping all KV memory and masking out everything outside the SWA window is used. When using SWA, prompt cache capability is lost but the available context is greatly increased (around 5.5x bigger).
Benchmarks:
A full set of benchmarks for both text and vision mode will eventually be provided here: https://huggingface.co/spaces/steampunque/benchlm
Download the file from below:
| Link | Type | Size/e9 B | Notes |
|---|---|---|---|
| gemma-3-4b-it.Q6_K_H.gguf | Q6_K_H | 3.2e9 B | ~Q6_K size |
| gemma-3-4b-it.mmproj.gguf | mmproj | 0.85e9 B | multimedia projector |
A discussion thread about the hybrid layer quant approach can be found here on the llama.cpp git repository:
- Downloads last month
- 6
6-bit