
How To Run LM Studio On Windows With An 8GB NVIDIA GPU, The Best Qwen Model For A Coding Agent
A clean Windows walkthrough for LM Studio on an 8GB NVIDIA card, which Qwen model actually fits that VRAM for coding, the settings that matter, and how to wire it into a real coding agent instead of just a chat window.
LM Studio
Desktop app for downloading and running local language models with a chat UI and a local API server
lmstudio.ai
LM Studio Model Catalog
Official catalog listing supported Qwen sizes and other local models
lmstudio.ai
Continue
Open source coding agent extension for VS Code and JetBrains that connects to local model servers
continue.dev
Alex Chen
July 19, 2026
What This Guide Actually Covers
This is the Windows and NVIDIA version. Installing LM Studio, confirming your card is actually being used instead of your CPU, picking the right Qwen model for an 8GB card that still leaves room to run VS Code and a browser at the same time, and connecting it to a real coding agent instead of just chatting in the LM Studio window.
Step 1: Confirm Your Driver Is Current
LM Studio bundles the CUDA backend for NVIDIA cards, so you do not need to separately install the CUDA toolkit the way you would for some other tools. You do need a reasonably current NVIDIA driver. Open your NVIDIA app or GeForce Experience and update to the latest Game Ready or Studio driver before you install anything else, an old driver is the most common reason CUDA fails to initialize.
Quick check before installing LM Studio:
1. Open a terminal (PowerShell)
2. Run: nvidia-smi
3. You should see your GPU name, driver version and available VRAM listed
If nvidia-smi is not recognized, your driver install did not complete properly, reinstall it before moving on.Step 2: Install LM Studio
Download the Windows installer from lmstudio.ai and run it like any normal application. On first launch, go to Settings and turn Developer Mode on right away, this unlocks the advanced load parameters and the local API server you will need later.
Step 3: Confirm The CUDA Backend Is Selected
LM Studio usually detects an NVIDIA card automatically, but it is worth checking manually the first time. Open the hardware settings panel, look at the backend or runtime dropdown, and confirm CUDA llama.cpp is selected rather than Vulkan or CPU. Your GPU name should be listed with its VRAM amount next to it.
If LM Studio only shows Vulkan or CPU as options, your driver is either outdated or the install did not register CUDA correctly. Update the driver from step one and restart LM Studio before trying anything else.
Step 4: Pick The Right Qwen Model For 8GB VRAM Coding
8GB is a real limit once you also want room for a browser, VS Code, and whatever else you keep open while coding. Search inside LM Studio's model browser and filter for GGUF, then pull whichever of these fits how you actually work.
- Qwen2.5-Coder 7B, Q4_K_M: the safest pick for pure coding, around 4.5GB, leaves plenty of room for a large context window and other apps running alongside it, writes code with almost no conversational filler
- Qwen3 8B, Q4_K_M: around 5.5GB, the better pick when you want an actual agent that reasons about a task and calls tools rather than just completing code in a single file
- Qwen2.5-Coder 14B, Q4_K_M: sits right at the edge of an 8GB card, noticeably smarter but you need to keep context strictly under 8K tokens or it spills into system RAM and slows down hard
If your actual goal is an agent that plans steps, calls tools and edits files across a project rather than just autocompleting the current line, start with Qwen3 8B. If you mainly want fast, accurate single file completions with a model that never rambles, Qwen2.5-Coder 7B is still the better daily driver even with the newer options around.
Step 5: The Load Settings For An 8GB Card
Before you hit load, open the model settings panel and set these deliberately instead of trusting the defaults.
- GPU offload: set to maximum or full, an 8GB card can fully offload a 7B or 8B model at Q4, there is no reason to leave any layers on the CPU
- Flash attention: turn this on, it cuts the memory the context cache uses without hurting output quality, which matters a lot at this VRAM size
- Context length: keep this around 4096 to 8192 tokens for an 8GB card, pushing it higher eats into the VRAM the model itself needs and will slow generation down or cause it to fail to load
- Quantization: stick to Q4_K_M, avoid Q2 or Q3 files, they save a little space but the coding quality drop is not worth it
- Keep model in memory: turn this on if you are coding for a full session, it avoids a reload every time you switch chats
Close Chrome or any other GPU accelerated app before loading a model if you are right at the edge of your VRAM. Browser hardware acceleration quietly eats a few hundred megabytes that can be the difference between a clean load and an out of memory error on an 8GB card.
Step 6: Confirm The GPU Is Actually Doing The Work
Check this before assuming your settings are correct.
In PowerShell, while a prompt is running in LM Studio:
nvidia-smi
Look for:
- GPU-Util climbing close to 90 to 100 percent while text is generating
- Memory-Usage rising to roughly the model's file size
If GPU-Util barely moves and your fans spin up instead, GPU offload is set too low, go back to step five.Step 7: Turn It Into An Actual Coding Agent
The LM Studio chat window is fine for testing, but a real coding agent needs to sit inside your editor, read your files, and call tools. LM Studio exposes an OpenAI compatible local server for exactly this, and Continue is a free extension for VS Code and JetBrains that connects to it directly.
Start the server from the Developer tab in LM Studio, then point Continue at it.
# Start the local server from LM Studio's command line tool
lms server start
# Confirm it is responding
curl http://localhost:1234/v1/modelsInside Continue's config, point the model provider at your local LM Studio server instead of a cloud API key.
# continue config, roughly what this looks like
models:
- name: local qwen coder
provider: lmstudio
model: qwen2.5-coder-7b
apiBase: http://localhost:1234/v1Once that is connected, Continue can read your open files, suggest edits, and run through multi step coding tasks using your local Qwen model instead of a paid cloud model, all while the model itself never leaves your machine.
Quick Troubleshooting
- LM Studio only lists Vulkan or CPU, not CUDA: update your NVIDIA driver, then fully restart LM Studio, do not just reload the model
- Model fails to load with an out of memory error: drop from 14B to 8B, or lower context length before dropping quantization further
- Generation feels slow even with GPU offload maxed: check nvidia-smi during generation, background apps like a browser or a game overlay may be eating VRAM you assumed was free
- Continue cannot reach the local server: confirm lms server start is actually running and that the port in your config matches what LM Studio shows in the Developer tab
Where This Leaves You
On an 8GB NVIDIA card, Qwen2.5-Coder 7B is still the steady, no fuss pick for straight coding help, and Qwen3 8B is the better choice the moment you want something that behaves like an actual agent rather than an autocomplete box. Get GPU offload set correctly, confirm it with nvidia-smi, and connect it to Continue so the model is actually working inside your editor instead of a separate chat window.