Local inference for OpenAI gpt-oss-20b via llama.cpp and Vulkan.
| Model | Fits this GPU? | Notes |
|---|---|---|
| gpt-oss-20b | ✅ Yes | MXFP4 GGUF ~11.3 GiB; full GPU offload on 890M |
| gpt-oss-120b | ❌ No | Needs ~80 GB VRAM (or heavy CPU offload + 64 GB+ RAM) |
Weights: ggml-org/gpt-oss-20b-GGUF → gpt-oss-20b-mxfp4.gguf (~12 GB on disk)
- GPU: AMD Radeon 890M (gfx1150, ~13.5 GB UMA)
- Backend: Vulkan (ROCm untested for gpt-oss; Vulkan is stable here)
- Build: llama.cpp
6e14286,-DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release
# One-shot prompt
./run-gpt-oss.sh "What is 17+25? One short sentence."
# OpenAI-compatible server → http://127.0.0.1:8080
./run-gpt-oss-server.shcd llama.cpp
./build/bin/llama-cli \
-m ../models/gpt-oss-20b-mxfp4.gguf \
-ngl 99 -fa 1 -c 8192 -b 512 -ub 512 \
--jinja --single-turn --simple-io \
-p "Your prompt here" -n 256Reduce context or offload MoE layers to CPU:
CTX=4096 ./run-gpt-oss.sh "prompt"
# or (llama-server / llama-cli)
--n-cpu-moe 8 # try 8, 12, 16 until it loadsMeasured 2026-06-14 on this machine.
| Test | Throughput |
|---|---|
Token generation (tg128, llama-bench) |
27.1 t/s |
| Interactive generation (8192 ctx) | 23–26 t/s |
| Prompt processing (short prompt) | 128–162 t/s |
Settings: -ngl 99 -fa 1 -c 8192 -b 512 -ub 512, model fully on GPU.
Community reference (same GPU, more RAM): ~27 t/s generation on 890M Vulkan (llama.cpp #15396).
cd llama.cpp
git pull
cmake -B build -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON
cmake --build build -j"$(nproc)"python3 -m venv .venv && . .venv/bin/activate
pip install huggingface_hub
huggingface-cli download ggml-org/gpt-oss-20b-GGUF gpt-oss-20b-mxfp4.gguf --local-dir modelscd llama.cpp
./build/bin/llama-bench \
-m ../models/gpt-oss-20b-mxfp4.gguf \
-ngl 99 -t 1 -fa 1 -p 0 -n 128 -b 2048 -ub 512OpenCode is configured to use the local llama-server via an OpenAI-compatible adapter.
curl -fsSL https://opencode.ai/install | bash
cd /home/devops/projects/tts/.opencode && npm installConfig files:
opencode.json(project)~/.config/opencode/opencode.json(user)
Terminal 1 — model server (16384 ctx, 1 slot for agent prompts):
CTX=16384 NP=1 ./run-gpt-oss-server.shTerminal 2 — OpenCode (starts servers automatically if needed):
./run-opencode.sh "Explain what run-gpt-oss-server.sh does."Interactive TUI:
./run-opencode.shInside OpenCode: /models → select llama.cpp/gpt-oss-20b-mxfp4.gguf.
- OpenCode agent system prompts are ~6k tokens; use ctx ≥ 16384 or you'll get
Context size has been exceeded. - Requires
@ai-sdk/openai-compatiblein~/.opencodeand.opencode/node_modules. - Model ID must match llama-server:
gpt-oss-20b-mxfp4.gguf.