Instructions to use kingjones777/Gemma-4-12B-it-ROCmFP4-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 kingjones777/Gemma-4-12B-it-ROCmFP4-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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP # Run inference directly in the terminal: llama cli -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP # Run inference directly in the terminal: llama cli -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP # Run inference directly in the terminal: ./llama-cli -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP # Run inference directly in the terminal: ./build/bin/llama-cli -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
Use Docker
docker model run hf.co/kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
- LM Studio
- Jan
- vLLM
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
- Ollama
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with Ollama:
ollama run hf.co/kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
- Unsloth Studio
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-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 kingjones777/Gemma-4-12B-it-ROCmFP4-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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF to start chatting
- Pi
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
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": "kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with Docker Model Runner:
docker model run hf.co/kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
- Lemonade
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
Run and chat with the model
lemonade run user.Gemma-4-12B-it-ROCmFP4-GGUF-Q4_0_ROCMFP
List all available models
lemonade list
- Hermes Agent
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
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 kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP
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 "kingjones777/Gemma-4-12B-it-ROCmFP4-GGUF:Q4_0_ROCMFP" \ --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-it โ ROCmFP4 / ROCmFPX GGUF
AMD-native FP4 / FP8 GGUF builds of google/gemma-4-12b-it, for the ROCmFPX fork of
llama.cpp on RDNA3.5 / Strix Halo (gfx1151). These tensor types do not exist in mainline
llama.cpp โ you need a ROCmFPX-capable build to load them.
Multimodal (mmproj included) and shipped with the MTP draft head, which is worth
1.46ร here (see below).
Variants โ all five in this repo
| file | ftype | size | BPW | token_embd |
decode |
|---|---|---|---|---|---|
gemma-4-12b-it-Q4_0_ROCMFP4_COHERENT.gguf |
102 | 6.50 GiB | 4.68 | q6_K | 26.95 t/s |
gemma-4-12b-it-Q4_0_ROCMFP4_FAST_COHERENT.gguf |
104 | 6.18 GiB | 4.45 | q6_K | 26.56 t/s |
gemma-4-12b-it-Q6_0_ROCMFPX_AGENT.gguf |
114 | 10.43 GiB | 7.52 | q8_0 | 17.54 t/s |
gemma-4-12b-it-Q8_0_ROCMFPX.gguf |
111 | 11.48 GiB | 8.27 | q8_0 | 16.39 t/s |
gemma-4-12b-it-Q8_0_ROCMFPX_AGENT.gguf |
115 | 11.67 GiB | 8.41 | q8_0 | 15.92 t/s |
Decode measured on an idle Ryzen AI MAX+ 395 (Strix Halo, 128 GB, ROCm 7.2.4), -ngl 999,
-c 4096 -fa on -fit off -np 1, 300-token generations, no draft head โ see the MTP
section for the accelerated figures.
โ ๏ธ Tied embeddings โ --output-tensor-type is a silent no-op here
gemma-4-12b-it sets tie_word_embeddings: true, so there is no output.weight tensor.
Passing --output-tensor-type does nothing at all; --token-embedding-type is the only
head protection that applies. With a 262144-token vocabulary at n_embd 3840 the embedding
is a large share of the file, which is why the 4-bit lands at 4.68 BPW rather than ~4.0.
Measured โ not estimated
| quant | correctness | decode median | runs |
|---|---|---|---|
| 102 | 3/3 โ | 26.95 t/s | 26.95 / 26.96 / 26.99 / 26.95 / 26.98 / 26.93 / 26.98 / 26.97 / 26.96 / 26.95 / 26.95 / 26.95 |
| 104 | 3/3 โ | 26.56 t/s | 26.56 / 26.56 / 26.57 / 26.59 / 26.57 / 26.55 / 26.56 / 26.56 / 26.56 / 26.56 / 26.56 / 26.58 |
| 114 | 3/3 โ | 17.54 t/s | 17.54 / 17.54 / 17.54 / 17.54 / 17.55 / 17.54 / 17.54 / 17.55 / 17.54 / 17.54 / 17.54 / 17.54 |
| 111 | 3/3 โ | 16.39 t/s * | 16.39 / 15.56 / 16.39 / 16.38 / 16.39 |
| 115 | 3/3 โ | 15.92 t/s * | 15.92 / 15.16 / 15.92 / 15.92 / 15.93 |
* = 5 samples rather than 12. Those two rows each had a single low sample, which a median absorbs; the 4-bit rows were re-run at 12 samples because two low samples of five moved the number and inverted the FAST-vs-COHERENT ordering.
Correctness is 17ร23 โ 391 ยท capital of Japan โ Tokyo ยท days in 2024 โ 366, asserted
against content + reasoning and recorded with finish_reason. This model is a reasoner:
it routinely returns an empty content with the answer in reasoning_content, so a harness
that only reads content will score correct answers as failures.
Size integrity
Every artifact's on-disk size exceeds its dry-run projection by a constant ~%s MiB header delta (spread across all five: 0.0075 MiB). A varying delta is the signature of a truncated write; a constant one is just the header.
โญ Speculative decoding (MTP) โ big speedup, with one real caveat
mtp-gemma-4-12b-it-Q8_0.gguf ships in this repo. Unlike the E2B/E4B members of this family,
the draft head is a substantial win here โ read the caveat below before enabling it.
| config | decode | vs no drafter | draft acceptance |
|---|---|---|---|
| no drafter | 26.95 t/s | 1.00ร | โ |
--spec-draft-n-max 3 |
36.2 t/s | 1.34ร | 0.64378 |
--spec-draft-n-max 5 โ best |
39.25 t/s | 1.46ร | 0.57049 |
llama-server -m gemma-4-12b-it-Q4_0_ROCMFP4_COHERENT.gguf \
--spec-type draft-mtp --model-draft mtp-gemma-4-12b-it-Q8_0.gguf \
--spec-draft-ngl 999 --spec-draft-n-max 5 \
-ngl 999 -c 4096 -fa on -fit off -np 1
โญ Note that the fastest setting is not the one with the highest draft acceptance.
Acceptance measures how often the drafter is right; throughput also pays for the
verification work. Sweep n-max and rank on measured t/s, not on acceptance.
โ Known defect: long generations abort the server with the draft head enabled
With --spec-type draft-mtp at -c 4096, a 1500-token generation reliably aborts the
server:
server-context.cpp:395: GGML_ASSERT(spec_i_batch.empty()) failed
in server_slot::update_batch(llama_batch&)
Reproduced at both --spec-draft-n-max 3 and 5. 300-token generations are unaffected โ
we ran 5 per quant here plus 13 consecutive requests in a separate test with no failure, so
the decode figures above are sound. We have not yet isolated whether the trigger is the
single-request length itself or a context shift near the -c limit; if you enable the
drafter, cap generations conservatively and give yourself context headroom. Without
--spec-type the model handles long generations normally.
โ MTP and vision cannot be used together (upstream llama.cpp PR #20277 โ image embeddings
are injected outside the token path and the speculative batch loses its boundary). Run two
configurations: text with the drafter, images with -fa off and no --spec-type.
A note on measurement, because we hit it here
This model showed a reproducible ~8% dip in a minority of decode samples on an otherwise idle box, while E2B/E4B measured on the same machine and harness were flat. We re-ran at 12 samples per quant to characterise it:
Q4_0_ROCMFP4_COHERENT[pyfunc] median 26.93 โ 26.94 / 26.93 / 26.93 / 26.93 / 26.93 / 26.94 / 26.94 / 26.93 / 26.93 / 26.93 / 26.95 / 26.94Q4_0_ROCMFP4_COHERENT[story] median 26.93 โ 26.92 / 26.93 / 26.93 / 26.93 / 26.93 / 26.92 / 26.93 / 26.94 / 26.92 / 26.93 / 26.93 / 26.92Q4_0_ROCMFP4_FAST_COHERENT[pyfunc] median 26.57 โ 26.58 / 26.6 / 26.64 / 26.57 / 26.57 / 26.58 / 26.57 / 26.57 / 26.57 / 26.57 / 26.56 / 26.58
The medians above are taken over 12 samples for this reason. We report every raw sample rather than a summary so you can see the distribution yourself.
Verification
Each artifact was loaded on real hardware and checked for: exact stat bytes vs the dry-run
projection, actual token_embd type, three correctness answers, and a 5-sample decode median
with two warm-ups discarded. Vision was verified separately with the mmproj on a
four-quadrant colour image.
Credits
Base model google/gemma-4-12b-it. BF16 GGUF source from unsloth/gemma-4-12b-it-GGUF.
FP4/FP8 tensor types from the ROCmFPX fork of llama.cpp.
- Downloads last month
- 207