Running a capable 27B model as a local AI coding agent used to mean setting up inference servers, configuring endpoints, and connecting everything manually. With Qwen3.8-27B, Ollama, and OpenCode, the process is now remarkably straightforward.
Qwen3.8-27B is one of the local models I have been most excited to try. It is strong at coding, reasoning, tool use, and long-horizon agentic tasks, making it a great fit for working with complex projects and large local codebases.
In this guide, we will turn Qwen3.8-27B into a local AI coding agent using only three command lines in the terminal. We will install Ollama, download the model, launch it directly in OpenCode, and quickly verify that it is running on the GPU.
Before You Start: Checking Your Hardware
Qwen3.8-27B is a large model, so first make sure your machine has enough resources.
On Linux or Windows with NVIDIA drivers installed, run:
nvidia-smi
For this guide, we are using an RTX 3090 with 24 GB of VRAM. Ollama’s Qwen3.8-27B model is around 18 GB, so it can fit entirely on the GPU while leaving some VRAM for the context and runtime overhead.
As a general rule, 24 GB of VRAM is a good target if you want to keep most or all of the model on the GPU. Increasing the context window will require additional memory.
If your GPU does not have enough VRAM, Ollama can split the model between GPU VRAM and system RAM. It will still work, but generation will be slower.
I would recommend at least 32 GB of system RAM, especially if part of the model needs to be offloaded from the GPU.
Running Qwen3.8-27B in Just 3 Commands
Now that the hardware is ready, we can install Ollama, download Qwen3.8-27B, and launch it inside OpenCode using just three terminal commands.
1. Installing Ollama
First, install Ollama, which will handle downloading and serving the model locally.
curl -fsSL https://ollama.com/install.sh | sh
2. Starting Ollama and Downloading Qwen3.8-27B
Next, start the Ollama server in the background and download the Qwen3.8-27B model.
ollama serve & ollama pull qwen3.8:27b
This starts the local Ollama server and then downloads the model files. Keep this terminal open so you can also see the server logs when the model starts running.
3. Launching Qwen3.8-27B in OpenCode
Open a new terminal and launch OpenCode with Qwen3.8-27B already selected as the model.
ollama launch opencode --model qwen3.8:27b
If OpenCode is not installed yet, Ollama will prompt you to install it first.
Once the installation is complete, the OpenCode TUI will open with Qwen3.8-27B selected. From here, you can simply give it a coding task.
For my test, I asked it to build a simple Python application. On the first request, the model takes a little longer because Ollama has to load it into memory. You can watch this happen in the first terminal.
Once loaded, generation speed is impressive.
In my test, it built the application, tested it, and returned a detailed project summary in under two minutes.
That’s it. Ollama handles the local model, while OpenCode provides the agentic coding environment.
Final Thoughts
I know some people will prefer llama.cpp because it gives you much deeper control over inference, performance tuning, quantization, and advanced features. But that is not really the point of this guide.
This setup is for beginners and non-technical users who simply want to experience a powerful local coding model without building llama.cpp from source, configuring servers, or figuring out long command-line arguments.
With just three commands, you install Ollama, download and run Qwen3.8-27B, and launch it directly inside OpenCode.
That is it. You can go from nothing to a fully local AI coding agent in just a few minutes.
Abid Ali Awan (@1abidaliawan) is a certified data scientist professional who loves building machine learning models. Currently, he is focusing on content creation and writing technical blogs on machine learning and data science technologies. Abid holds a Master’s degree in technology management and a bachelor’s degree in telecommunication engineering. His vision is to build an AI product using a graph neural network for students struggling with mental illness.
