OpenCode and llama.cpp: Windows coding agent setup
Set up OpenCode with a llama.cpp server on Windows, connect Qwen 3.6 models, and try MTP. The speaker recommends at least 16 GB VRAM.
Player not loading? Watch on YouTube
This tutorial connects OpenCode to an OpenAI-compatible llama.cpp server for a self-hosted coding assistant on Windows. The walkthrough uses an NVIDIA graphics card. The speaker recommends at least 16 GB of VRAM and 32 GB of system RAM for that GPU configuration; these are recommendations for the demonstrated workflow, rather than universal minimums.
Setup covers Node.js, Git and uv, followed by OpenCode installation through npm. The llama.cpp steps use Windows x64 CUDA 13 binaries and CUDA 13.3 DLLs. The supplied release link points to b9484. After loading a Qwen 3.6 27B GGUF model, the speaker tests the browser chat at localhost:8080 and adds a provider template to OpenCode's configuration. The example sets a 32,000-token context limit and a 16K output limit.
For a 16 GB GPU, the speaker recommends Qwen 3.6 35B A3B, citing faster CPU offloading with its mixture-of-experts architecture. The tutorial then asks the AI agent to create a batch launch script and adds multi-token prediction with a draft maximum of two tokens. Reported speeds rise from 33 to 43 and then 62 tokens per second in brief tests, but the speaker notes that MTP can also slow generation on some GPUs.
The final sections cover resuming sessions, allowing commands without approval, and opening project folders through Windows Explorer or VS Code's terminal. The speaker warns that unrestricted command access carries risks and recommends backups.