Instructions to use vsark/gemma-4-19b-a4b-it-REAP-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 vsark/gemma-4-19b-a4b-it-REAP-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 vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S # Run inference directly in the terminal: llama cli -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S # Run inference directly in the terminal: llama cli -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
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 vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S # Run inference directly in the terminal: ./llama-cli -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
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 vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Use Docker
docker model run hf.co/vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
- LM Studio
- Jan
- Ollama
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with Ollama:
ollama run hf.co/vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
- Unsloth Studio
How to use vsark/gemma-4-19b-a4b-it-REAP-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 vsark/gemma-4-19b-a4b-it-REAP-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 vsark/gemma-4-19b-a4b-it-REAP-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for vsark/gemma-4-19b-a4b-it-REAP-GGUF to start chatting
- Pi
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with Docker Model Runner:
docker model run hf.co/vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
- Lemonade
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Run and chat with the model
lemonade run user.gemma-4-19b-a4b-it-REAP-GGUF-Q3_K_S
List all available models
lemonade list
- Hermes Agent
How to use vsark/gemma-4-19b-a4b-it-REAP-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default vsark/gemma-4-19b-a4b-it-REAP-GGUF:Q3_K_S
Run Hermes
hermes
- Atomic Chat
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: gemma
|
| 5 |
+
tags:
|
| 6 |
+
- gemma4
|
| 7 |
+
- moe
|
| 8 |
+
- gguf
|
| 9 |
+
- reap
|
| 10 |
+
- pruned
|
| 11 |
+
- llama-cpp
|
| 12 |
+
base_model: 0xSero/gemma-4-19b-a4b-it-REAP
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Gemma 4 19B-A4B-it REAP — GGUF Quantizations
|
| 16 |
+
|
| 17 |
+
GGUF quantizations of [0xSero/gemma-4-19b-a4b-it-REAP](https://huggingface.co/0xSero/gemma-4-19b-a4b-it-REAP) — a **30% expert-pruned** Gemma 4 using [Cerebras REAP](https://github.com/cerebras/reap).
|
| 18 |
+
|
| 19 |
+
## Available Quantizations
|
| 20 |
+
|
| 21 |
+
| File | Quant | Size | BPW | Use Case |
|
| 22 |
+
| ------------------------------ | ------ | ---------- | ---- | -------------------------------------------------------- |
|
| 23 |
+
| `gemma-4-19b-reap-Q4_K_M.gguf` | Q4_K_M | **12 GB** | 5.32 | **Recommended.** Best quality/size tradeoff. |
|
| 24 |
+
| `gemma-4-19b-reap-Q3_K_S.gguf` | Q3_K_S | **8.4 GB** | 3.89 | Fits 12GB cards. Slight quality loss on technical terms. |
|
| 25 |
+
|
| 26 |
+
## Performance (AMD RX 9070 XT, 16GB VRAM, Vulkan)
|
| 27 |
+
|
| 28 |
+
| Metric | Original 26B Q4_K_M | REAP 19B Q4_K_M |
|
| 29 |
+
| ---------------------- | ------------------- | ----------------------------------------------- |
|
| 30 |
+
| **Speed** | 17 tok/s | **130 tok/s** |
|
| 31 |
+
| **VRAM @ 2k ctx** | 99% | **76%** |
|
| 32 |
+
| **Max context @ 16GB** | ~4k | **65k+** |
|
| 33 |
+
| **Quality** | Baseline | Indistinguishable on coding/reasoning/synthesis |
|
| 34 |
+
|
| 35 |
+
The 7x speedup comes from crossing the VRAM comfort threshold — at 76% usage the GPU runs without memory pressure.
|
| 36 |
+
|
| 37 |
+
## Quick Start
|
| 38 |
+
|
| 39 |
+
### llama.cpp
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
# Download
|
| 43 |
+
hf download vsark/gemma-4-19b-a4b-it-REAP-GGUF gemma-4-19b-reap-Q4_K_M.gguf
|
| 44 |
+
|
| 45 |
+
# Run (IMPORTANT: use --reasoning off for Gemma 4)
|
| 46 |
+
llama-server \
|
| 47 |
+
--model gemma-4-19b-reap-Q4_K_M.gguf \
|
| 48 |
+
--n-gpu-layers 99 \
|
| 49 |
+
--ctx-size 16384 \
|
| 50 |
+
--reasoning off \
|
| 51 |
+
--host 127.0.0.1 --port 8012
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
### Ollama
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
# Create a Modelfile
|
| 58 |
+
echo 'FROM ./gemma-4-19b-reap-Q4_K_M.gguf
|
| 59 |
+
PARAMETER num_ctx 16384' > Modelfile
|
| 60 |
+
|
| 61 |
+
ollama create gemma4-19b-reap -f Modelfile
|
| 62 |
+
ollama run gemma4-19b-reap
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## Important Notes
|
| 66 |
+
|
| 67 |
+
- **Use `--reasoning off`** with llama-server, or the model tries to emit thinking tokens
|
| 68 |
+
- **Requires recent llama.cpp** with `gemma4` architecture support (older builds fail)
|
| 69 |
+
- **Speculative decoding hurts** at these speeds (31 tok/s vs 130 without) — don't use it
|
| 70 |
+
- Q3_K_S introduces occasional spelling errors on technical terms (e.g., "Affinity" → "Affity"). Use Q4_K_M for production.
|
| 71 |
+
|
| 72 |
+
## About REAP
|
| 73 |
+
|
| 74 |
+
REAP removes 30% of MoE experts (38 of 128 per layer) while keeping the same 8 active experts per token. Active parameter count is unchanged (~4B/token). The pruned experts were the least-used ones based on router gate values and activation norms across 22,000 calibration samples.
|
| 75 |
+
|
| 76 |
+
See the [original model card](https://huggingface.co/0xSero/gemma-4-19b-a4b-it-REAP) for full details and benchmarks.
|
| 77 |
+
|
| 78 |
+
## Conversion
|
| 79 |
+
|
| 80 |
+
```bash
|
| 81 |
+
python3 convert_hf_to_gguf.py ./gemma-4-19b-reap-bf16/ --outfile gemma-4-19b-reap-F16.gguf --outtype f16
|
| 82 |
+
llama-quantize gemma-4-19b-reap-F16.gguf gemma-4-19b-reap-Q4_K_M.gguf Q4_K_M
|
| 83 |
+
llama-quantize gemma-4-19b-reap-F16.gguf gemma-4-19b-reap-Q3_K_S.gguf Q3_K_S
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Credits
|
| 87 |
+
|
| 88 |
+
- **REAP pruning**: [0xSero](https://huggingface.co/0xSero)
|
| 89 |
+
- **Base model**: [Google Gemma 4](https://huggingface.co/google/gemma-4-26b-a4b-it)
|
| 90 |
+
- **GGUF conversion + benchmarks**: [vsark](https://huggingface.co/vsark)
|