Humble Pi (Qwen 3.8 27B Edition) -- agentic coding on 24 GB of VRAM A developer detailed a setup for running Qwen3.8 27B, an agentic coding model, locally on a 24 GB VRAM machine using llama.cpp and the pi coding agent. The configuration achieves about 8 tokens per second generation on Apple Silicon and works offline without an API key. The guide covers installation, server flags, and pi integration for a fully local agentic coding experience. This guide sets up Qwen3.8 27B https://huggingface.co/unsloth/Qwen3.8-27B-GGUF with pi https://pi.dev through llama.cpp https://github.com/ggml-org/llama.cpp on a 32 GB machine: an Apple Silicon Mac or a Linux box with a 24 GB GPU. Thinking is kept in the conversation on every turn, so the KV cache survives between messages. No API key, no cloud, works offline. | download | 17.56 GB UD-Q4 K XL | | resident | about 19.4 GB at 64k context | | generation | about 8 tokens/second on an M-series with 32 GB, 9 with MTP | | prompt | about 66 tokens/second | | licence | Apache 2.0 | Qwen3.8 needs a recent build. This gives you the llama binary. Confirm with llama version ; you want build 10470 or later. macOS -- Homebrew https://formulae.brew.sh/formula/llama.cpp . Already installed? brew upgrade llama.cpp instead. brew install llama.cpp Linux -- installama.sh https://github.com/angt/installama.sh detects your CPU and GPU CUDA / ROCm / Vulkan and drops llama into ~/.local/bin . Run it again to upgrade. curl -fsSL https://angt.github.io/installama.sh | sh Unsloth's GGUF carries its own chat template and llama.cpp reads it from the model file. No download, no patch. Put this in ~/.zshrc ~/.bashrc on Linux : alias qwen-27b='mkdir -p ~/.llama-logs && llama serve -hf unsloth/Qwen3.8-27B-GGUF:UD-Q4 K XL -c 65536 -fa 1 -ctk q8 0 -ctv q8 0 -ctxcp 8 --prio 2 --no-ui --jinja --parallel 1 --cache-ram 0 --no-mmproj --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 --reasoning on --reasoning-preserve 2 &1 | tee ~/.llama-logs/qwen-27b-$ date +%Y%m%d-%H%M%S .log' source ~/.zshrc source ~/.bashrc on Linux qwen-27b The first run downloads 17.56 GB to ~/.cache/huggingface/hub . The server is up when the log prints listening on http://127.0.0.1:8080 . A failed to set process priority warning is the OS refusing --prio 2 without elevated rights and can be ignored. | flag | what it does | |---|---| -c 65536 | Context. 64k fits 32 GB with room to spare; the model trains to 262144. | -fa 1 | Flash attention. Required for a quantized KV cache. | -ctk q8 0 -ctv q8 0 | 8-bit KV cache, roughly half the size of f16. | -ctxcp 8 | Cap context checkpoints. Each one snapshots the recurrent state about 150 MiB . Inert at 64k, where only 8 can exist; keeps memory flat if you raise -c . | --prio 2 | High thread priority where the OS allows it, so inference is interrupted less. | --parallel 1 | One slot, so the whole context serves one conversation. | --cache-ram 0 | No cross-chat KV cache in RAM. One chat at a time does not need it. | --no-mmproj | Skip the 930 MB vision projector. Text only. | --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0 | Qwen's recommended sampling for thinking mode. | --reasoning on | Parse the model's