Instructions to use Bruce001/gemma4-12b-ashq1-4850 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 Bruce001/gemma4-12b-ashq1-4850 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 Bruce001/gemma4-12b-ashq1-4850 # Run inference directly in the terminal: llama cli -hf Bruce001/gemma4-12b-ashq1-4850
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Bruce001/gemma4-12b-ashq1-4850 # Run inference directly in the terminal: llama cli -hf Bruce001/gemma4-12b-ashq1-4850
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 Bruce001/gemma4-12b-ashq1-4850 # Run inference directly in the terminal: ./llama-cli -hf Bruce001/gemma4-12b-ashq1-4850
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 Bruce001/gemma4-12b-ashq1-4850 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Bruce001/gemma4-12b-ashq1-4850
Use Docker
docker model run hf.co/Bruce001/gemma4-12b-ashq1-4850
- LM Studio
- Jan
- vLLM
How to use Bruce001/gemma4-12b-ashq1-4850 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Bruce001/gemma4-12b-ashq1-4850" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bruce001/gemma4-12b-ashq1-4850", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Bruce001/gemma4-12b-ashq1-4850
- Ollama
How to use Bruce001/gemma4-12b-ashq1-4850 with Ollama:
ollama run hf.co/Bruce001/gemma4-12b-ashq1-4850
- Unsloth Desktop
- Pi
How to use Bruce001/gemma4-12b-ashq1-4850 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bruce001/gemma4-12b-ashq1-4850
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Bruce001/gemma4-12b-ashq1-4850" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Bruce001/gemma4-12b-ashq1-4850 with Docker Model Runner:
docker model run hf.co/Bruce001/gemma4-12b-ashq1-4850
- Lemonade
How to use Bruce001/gemma4-12b-ashq1-4850 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Bruce001/gemma4-12b-ashq1-4850
Run and chat with the model
lemonade run user.gemma4-12b-ashq1-4850-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Bruce001/gemma4-12b-ashq1-4850 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bruce001/gemma4-12b-ashq1-4850
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 Bruce001/gemma4-12b-ashq1-4850
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Bruce001/gemma4-12b-ashq1-4850 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bruce001/gemma4-12b-ashq1-4850
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 "Bruce001/gemma4-12b-ashq1-4850" \ --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"
Gemma-4-12B-Obliterated (ASHQ1-4850 Mix-Quant GGUF)
This repository contains an experimental, highly optimized ASHQ1 (Adaptive Layer-Budget Hybrid Quantization) GGUF quantization of Gemma-4-12B-Obliterated.
By employing importance matrix (imatrix) guided layer-by-layer classification, this model achieves a balance: preserving language/reasoning capabilities at Q4-level quality while keeping the total size within 4.85 GB (3.2 BPW) (not tested yet).
🌟 Key Experiment Highlights
Unlike traditional uniform quantization (such as standard IQ3_M or Q3_K_M), which applies the same bit-width indiscriminately across all layers, this ASHQ1-4850 build uses dynamic layer budget allocation:
- Attention Layers Protection (
Q4_K): Attention mechanisms (attn_q,attn_k,attn_v,attn_output) are prioritized and bumped up to Q4_K. This preserves in-context reasoning, instruction following, and needle-in-a-haystack capabilities. - Normalization & Scales Saved (
F16): Allnormandscaletensors are strictly locked at F16 (~1.5 MiB total) to prevent numerical instability and activation overflow. - FFN Down-Projection Compression (
IQ2_XXS): The redundant FFN down-projection layers (ffn_down) are aggressively quantized to IQ2_XXS to squeeze the overall file size down to meet strict RAM/VRAM budgets. - FFN Up/Gate Projections (
IQ4_XS): Gate and Up projections are kept at higher precision to retain dense feature activation before down-projection.
📊 Quantization Allocation & Strategy
| Layer / Tensor Type | Assigned Precision | Rationale / Strategic Value |
|---|---|---|
| All Norms & Scales | F16 |
Zero accuracy loss on critical activation boundaries with negligible size penalty (~1.5 MiB). |
| Attention Key/Query/Value | Q4_K |
Protects self-attention matrix and long-context reasoning (~1.83 GB budget). |
| FFN Gate & Up Projections | IQ4_XS |
Retains feature expansion richness. |
| FFN Down Projections | IQ2_XXS |
Trades non-critical factual memory density for extreme file compression. |
| Token Embeddings | Q4_K |
Prevents vocabulary collapse. |
| Output Head | Q5_K |
Ensures precise token probability distributions. |
Target Budget: 4850 MiB (~4.74 GB)
Actual Size: ~4.75 GB
Effective Bit-Per-Weight (BPW): ~3.2 bpw
💡 Performance Expectation
- Logic & Instruction Following: ~85%–90% of native Q4_K_M. Handles multi-step reasoning, JSON formatting, and code structure seamlessly.
- Factual Knowledge: Slightly reduced compared to uncompressed models due to 2-bit FFN down-projections (rare facts/niche details may show hallucination).
- Best Suited For: Hardware constrained environments (e.g., 6GB VRAM GPUs, 8GB Apple Silicon Macs, or edge deployment) where standard Q4_K (~7.2GB) cannot fit.
🚀 How to Run
1. Using llama.cpp (Command Line)
Make sure you have an up-to-date build of llama.cpp supporting Gemma 4 architecture:
./llama-cli -m gemma4-12b-obliterated-ashq1-4850.gguf \
-p "You are a helpful AI assistant." \
-n 512 \
--ngl 99 \
--temp 0.7
2. Using Ollama
Create a file named Modelfile:
Dockerfile
FROM ./gemma4-12b-obliterated-ashq1-4850.gguf
PARAMETER temperature 0.7
PARAMETER top_p 0.9
Run the model:
Bash
ollama create gemma4-ashq1 -f Modelfile
ollama run gemma4-ashq1
3. LM Studio / Chatbox
- Move
gemma4-12b-obliterated-ashq1-4850.ggufto your local LM Studio models folder (~/.cache/lm-studio/models/or custom directory). - Select the model from the top bar and start chatting.
🛠️ Reproduction & Quantization Logs
Quantized using the ASHQ1 framework with llama.cpp CUDA build.
Bash
python3 main.py \
--model /path/to/gemma4-f16.gguf \
--imatrix /path/to/Gemma-4-12B-OBLITERATED.imatrix.gguf \
--size 4850 \
--allow-q3-or-lower \
--output ./gemma4-12b-obliterated-ashq1-4850.gguf \
--run
Acknowledgements
- Base Model: Gemma-4-12B-Obliterated
- Quantization Algorithm: ASHQ1 Engine by @wepiqx
- Inference Backend: llama.cpp
- Downloads last month
- 15
We're not able to determine the quantization variants.