Artificial Ignorance

How to Run a 35B AI Model on a 12GB or 8GB GPU (Qwen 3.6 35B-A3B Guide)

Yes, you can run Qwen 3.6 35B-A3B on an 8GB or 12GB graphics card. The trick is that it is a mixture-of-experts model: it holds 35 billion parameters but uses only about 3 billion for each token. With llama.cpp, you keep the small, always-used part on the GPU and move most of the "expert" weights into system RAM with one flag, --n-cpu-moe. You need enough total memory for the file: about 32GB of system RAM for the recommended 4-bit download, or 16GB of RAM for a smaller 3-bit file.

Below I explain why this works, which file to download for your RAM, the exact commands for 8GB and 12GB cards, how much context you can afford, and what speed to expect. Model details are taken from Qwen's own model card and configuration, checked on 5 December 2026. Qwen4-35B-A3B is now out as well; my Qwen4-35B-A3B guide for 8GB, 12GB and 16GB cards covers its new n-gram table, thinking levels and exact commands, and my Qwen4 vs Qwen 3.6 comparison helps you decide whether to switch.

Running Qwen 3.6 35B-A3B on an 8 GB or 12 GB graphics cardA grid of 256 expert blocks with only a few lit, beside a small graphics card and a large block of system memory, showing that most of the model can live in RAM.LOCAL AI GUIDE35B model.8 GB card.Qwen 3.6 35B-A3B with llama.cpp8 GB VRAM12 GB VRAMOnly 3B of 35B parameters work on each token256 experts per layer, 8 + 1 active per tokenGPU8 GBattention+ some experts32 GB system RAM: most experts
01

Why a 35B model can fit on an 8GB card

A normal "dense" 35B model would need every one of its 35 billion weights for every word it writes, which is far too much for an 8GB card. Qwen 3.6 35B-A3B is built differently. According to the official model card, it has 35B parameters in total but only 3B activated. Each of its 40 layers contains 256 small "experts", and for every token a router picks just 8 of them, plus one shared expert that is always used.

From the model's own configuration file, the routed experts add up to roughly 32 billion parameters, about 92% of the whole model. Yet a single token touches only about 1 billion of them. That changes what the GPU has to hold:

Where llama.cpp puts each part of a mixture-of-experts modelAttention, the shared expert, embeddings and the context cache stay on the graphics card. The routed experts, about 92 percent of the weights, live in system RAM, and each token only reads 8 of 256 experts per layer.THE TRICK: SPLIT BY JOB, NOT BY LAYERGraphics card (VRAM)Attention layers, the shared expert, embeddings andthe context cache. Small, used on every token, sothey belong on the fast card.bright: always here faded: experts you can afford to add System memory (RAM)The routed expert weights: about 92% of the model.Each token reads only 8 of 256 experts per layer, sothe CPU can keep up.bright: the few experts one token actually uses
Attention and the shared parts stay on the GPU; the bulk of the experts sit in system RAM, where each token reads only a small slice.
On the GPU

Attention layers, the shared expert, embeddings and the context cache. Roughly 1.8GB of the 4-bit file, used for every token.

In system RAM

Most of the routed expert weights. The CPU only needs the 8 experts the router chose, so it is not reading 30GB per token.

There is a second reason it fits well. Qwen 3.6 mixes two kinds of attention: three out of every four layers use linear attention with a fixed-size memory, and only 10 of the 40 layers use full attention with a growing cache. Those 10 layers use just 2 key-value heads. The result is a context cache that stays small even for long conversations, which matters a lot on a card with 8GB.

02

What you need before you start

PartMinimumComfortable
Graphics cardNVIDIA with 8GB VRAM (RTX 3060 Ti, 4060, 3070 and similar)12GB (RTX 3060 12GB, 4070, 5070)
System RAM16GB with a 3-bit file32GB with the 4-bit file
Free disk space15GB25GB on an SSD
Softwarellama.cpp CUDA build for Windows, or build it on LinuxSame, kept up to date

Unsloth, which publishes the most widely used GGUF versions, puts it simply: your total memory, VRAM plus system RAM, should be larger than the file you download. Its Qwen 3.6 guide lists about 17GB of total memory for 3-bit and 23GB for 4-bit. If the file is bigger than your memory, llama.cpp can still run from the SSD, but it becomes much slower.

AMD and Intel cards can run llama.cpp too, through its Vulkan, ROCm or SYCL builds, and the same expert-offload flag applies. The commands in this guide use the NVIDIA CUDA build.

10

The whole setup at a glance

Five steps to run Qwen 3.6 35B-A3B on a small graphics cardDownload llama.cpp, pick the GGUF file by system RAM, keep most expert layers in RAM with --n-cpu-moe, choose a 32K to 64K context with an 8-bit cache, then lower the number until VRAM is nearly full.THE WHOLE SETUP IN FIVE STEPS1Get llama.cppCUDA build for Windowsfrom GitHub2Pick the fileBy system RAM, Q4_K_XLfor 32 GB3Experts to RAM--n-cpu-moe 32 (8 GB)or 24 (12 GB)4Size the context32K to 64K, q8_0 cache5TuneLower the number untilVRAM is full
Bookmark this: the five steps that matter, in order.
03

Step 1: pick the right file for your RAM

Quantisation shrinks the model by storing weights with fewer bits. Unsloth's "UD" (dynamic) files keep the most sensitive layers at higher precision, so they hold up better than plain quantisation at the same size. Choose by the system RAM you have, not by your GPU:

Qwen 3.6 35B-A3B GGUF file sizes and the RAM they suitUnsloth GGUF sizes: Q2_K_XL 12.3 GB, IQ3_XXS 13.2 GB, Q3_K_XL 16.9 GB, IQ4_XS 17.7 GB, Q4_K_XL 22.4 GB, Q6_K 29.3 GB, Q8_0 36.9 GB, each matched to the system RAM it fits alongside an 8 to 12 GB card.PICK THE FILE BY YOUR SYSTEM RAMUD-Q2_K_XL12.3 GB16 GB RAM, quality dropsUD-IQ3_XXS13.2 GB16 GB RAM, usableUD-Q3_K_XL16.9 GB24 GB RAMUD-IQ4_XS17.7 GB24 GB RAM, good balanceUD-Q4_K_XL22.4 GB32 GB RAM, recommendedUD-Q6_K29.3 GB48 GB RAMQ8_036.9 GB64 GB RAMFile sizes from Unsloth's Hugging Face repository. RAM suggestions assume an 8 to 12 GB card and room left for Windows.
The 4-bit UD-Q4_K_XL file is the usual sweet spot. Drop to IQ3_XXS only if you have 16GB of RAM.
  • 32GB RAM: UD-Q4_K_XL (22.4GB). Best quality that still leaves room for Windows and a browser.
  • 24GB RAM: UD-IQ4_XS (17.7GB). Very close to Q4 quality, noticeably smaller.
  • 16GB RAM: UD-IQ3_XXS (13.2GB). Usable for chat and simple coding; expect a few more mistakes.
  • Want to show it images? Also download mmproj-F16.gguf (0.9GB). The model is multimodal and reads screenshots and photos.

All the files are in Unsloth's Hugging Face repository. The model itself is released under the Apache 2.0 licence, so you can use it for personal and commercial work.

04

Step 2: install llama.cpp

Download the latest Windows release from the llama.cpp releases page. For an NVIDIA card you need two zip files from the same release: the one named llama-bXXXXX-bin-win-cuda-12.4-x64.zip and the matching cudart-llama-bin-win-cuda-12.4-x64.zip. Unzip both into the same folder, for example C:\llama. There is nothing to install beyond that.

Open PowerShell in that folder and check it runs:

.\llama-server.exe --version

On Linux, build it from source with CUDA enabled, as described in the llama.cpp README. The flags in the rest of this guide are the same on both systems.

05

Step 3: the commands for 8GB and 12GB cards

The flag that does the work is --n-cpu-moe N. According to the llama.cpp server documentation, it keeps the expert weights of the first N layers in system RAM. Everything else, including the experts of the remaining layers, goes on the GPU. With 40 layers, a higher number means less VRAM used.

How an 8 GB and a 12 GB card are filledEstimated VRAM budget with the Q4 model: about 1.8 GB for the always-on weights, 0.7 GB for a 32K context cache, about 1 GB for driver and compute buffers, and the rest for expert layers: about 8 layers on an 8 GB card and 16 on a 12 GB card.ESTIMATED VRAM BUDGET, UD-Q4_K_XL, 32K CONTEXT8 GB card--n-cpu-moe 32Always-onpartDriverandbuffersExperts for ~8 layers8 GB12 GB card--n-cpu-moe 24Always-onpartDriverandbuffersExperts for ~16 layers12 GBEstimates from the model files and config. Start here, then lower --n-cpu-moe until VRAM is nearly full.
My estimate of how each card fills up. The exact split depends on your driver, other apps and the file you chose.

8GB card, 32K context, thinking switched off for snappy answers:

.\llama-server.exe `
  -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL `
  --n-cpu-moe 32 `
  -c 32768 -fa on -ctk q8_0 -ctv q8_0 `
  --jinja --temp 0.7 --top-p 0.8 --top-k 20 --presence-penalty 1.5 `
  --chat-template-kwargs "{\"enable_thinking\":false}" 

12GB card, 64K context, thinking on:

.\llama-server.exe `
  -hf unsloth/Qwen3.6-35B-A3B-GGUF:UD-Q4_K_XL `
  --n-cpu-moe 24 `
  -c 65536 -fa on -ctk q8_0 -ctv q8_0 `
  --jinja --temp 1.0 --top-p 0.95 --top-k 20 --presence-penalty 1.5

The first run downloads the file into llama.cpp's cache; later runs start in seconds. When it says the server is listening, open http://127.0.0.1:8080 in your browser for a chat window, or point any app that speaks the OpenAI API at that address.

What the flags mean

-c is the context length, -fa on turns on flash attention, -ctk/-ctv q8_0 store the cache in 8-bit, and --jinja uses the model's own chat template.

Thinking on or off

Qwen 3.6 thinks before answering by default. The enable_thinking:false line skips that, which is faster on small cards. Remove it for harder problems.

The sampling values follow Qwen's own recommendations: temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5 without thinking, and temperature 1.0, top_p 0.95, top_k 20, presence_penalty 1.5 with thinking. For precise coding work with thinking on, Qwen suggests temperature 0.6 and presence penalty 0.

06

Step 4: tune it to your exact card

The numbers above are starting points, not magic values. Fine-tune them in two minutes:

  1. Start the server with the suggested valueOpen Task Manager, Performance tab, and watch "Dedicated GPU memory".
  2. Send a long messagePaste a page of text and ask for a summary, so the context cache actually fills.
  3. Lower the number if VRAM has roomIf more than about 1GB is free, stop the server and reduce --n-cpu-moe by 2. More experts on the GPU means more speed.
  4. Raise it if it crashes or crawlsAn out-of-memory error, or Windows quietly spilling into shared GPU memory, means you went too far. Go back up by 2.
  5. Keep the final commandSave it in a small .bat file so you can start the model with a double-click.

Watch for shared GPU memory. On Windows, the NVIDIA driver can silently move overflow into system RAM over PCIe instead of failing. Everything keeps working but becomes far slower. If "Shared GPU memory" in Task Manager climbs while the model runs, raise --n-cpu-moe.

Newer llama.cpp builds also try to fit unset settings to your memory automatically with their --fit option, which is on by default. Setting --n-cpu-moe yourself still gives the most predictable result on small cards.

07

How much context can you afford?

Context is how much text the model can keep in mind at once. Qwen 3.6 supports 262,144 tokens natively, and Qwen recommends keeping at least 128K to preserve its thinking ability. On an 8GB card you will usually trade some of that away. Thanks to the hybrid attention design, the cost is lower than you might expect:

How much VRAM the context cache needsCalculated from the model config at 16-bit: about 0.17 GB at 8K tokens, 0.67 GB at 32K, 1.34 GB at 64K, 2.68 GB at 128K and 5.37 GB at the full 262K. An 8-bit cache halves these.CONTEXT CACHE AT 16-BIT (HALVE IT WITH q8_0)0.17 GB8K0.67 GB32K1.34 GB64K2.68 GB128K5.37 GB262K (max)Only 10 of the 40 layers keep a growing cache, with 2 KV heads each. That is why long context is cheap for this model.
Calculated from the model configuration: 10 full-attention layers, 2 KV heads, head size 256, 16-bit cache.
  • 8GB card: 32K context is comfortable. 64K works with an 8-bit cache if you move two or four more layers to RAM.
  • 12GB card: 64K is a good default, and 128K is possible with an 8-bit cache and a higher --n-cpu-moe.
  • Every extra 32K tokens costs about 0.67GB at 16-bit, or about 0.34GB with -ctk q8_0 -ctv q8_0.
08

What speed to expect, and why

With most experts in system RAM, speed is set mostly by how fast your RAM can feed the CPU. For each token, the model needs the 8 chosen experts in each of the 40 layers: about 1 billion parameters, or roughly 0.6GB at 4-bit. Dual-channel DDR5 delivers in the region of 60 to 80GB/s in practice, so the theoretical ceiling is around 100 tokens per second, and real-world results land well below that because of compute, scheduling and the parts that run on the GPU.

What helps most

Dual-channel RAM (two or four sticks, not one), faster RAM, and moving more expert layers onto the GPU by lowering --n-cpu-moe.

What helps less than you think

A faster CPU with the same RAM. Generation is limited by memory bandwidth more than by core count. Prompt processing, the delay before the first word, does benefit from a stronger GPU.

I have not measured it on 8GB and 12GB cards for this article, so treat these as reasoned expectations rather than benchmarks. What is consistent across reports is the shape: a mixture-of-experts model split this way stays usable for chat and coding, while a dense model of the same size spilled into RAM drops to a few tokens per second.

09

When something goes wrong

ProblemLikely causeFix
Out of memory when loadingToo many experts on the GPURaise --n-cpu-moe by 2 to 4, or lower -c
Very slow, under 2 tokens per secondNot enough RAM, so Windows pages to disk, or GPU memory spilling into shared memoryUse a smaller file, close other apps, check Task Manager
Long pause before every answerThinking mode is onAdd --chat-template-kwargs "{\"enable_thinking\":false}"
Answers repeat themselvesSampling settingsUse Qwen's values above, including --presence-penalty 1.5
Command fails in PowerShellQuotes around the JSONUse the escaped form shown in this guide, as Unsloth recommends for Windows
11

Common questions

Is Qwen 3.6 35B-A3B better than a 7B or 8B model?

Usually yes. It reasons with far more stored knowledge while doing about as much work per token as a 3B model, which is why it is popular for local coding and agents.

Can I run it with only 16GB of system RAM?

Yes, with the 13.2GB IQ3_XXS file and an 8GB card. Close the browser and other heavy apps first, and keep the context at 32K or less.

Does this work on a 6GB card?

It can load with --cpu-moe, which keeps all experts in RAM, and a short context, but there is little VRAM left for speed. Treat 8GB as the practical minimum.

Can I use Ollama or LM Studio instead?

Both can run GGUF files and are fine for a first try. This guide uses llama.cpp directly because it gives you the --n-cpu-moe control, which is what makes small cards work well.

Is it free for commercial use?

The model is released under the Apache 2.0 licence, which allows commercial use. Check the licence on the model card for the exact terms.

Can it read images?

Yes. Download the matching mmproj file and add --mmproj with its path. Expect it to use a little more VRAM.

Should I use the 27B dense model instead?

Not on 8 to 12GB. The 27B model uses all of its weights for every token, so offloading part of it to RAM slows it down far more than the 35B-A3B mixture-of-experts model.

Is my data private?

Yes. llama.cpp runs everything on your own PC; nothing is sent anywhere unless you expose the server to the network yourself.

12

Your next step

If you have 32GB of RAM, download UD-Q4_K_XL, start with --n-cpu-moe 32 on an 8GB card or 24 on a 12GB card, and lower the number until Task Manager shows the GPU nearly full. That single flag is the difference between a 35B model that will not load and one you can use every day.

Sources: Qwen3.6-35B-A3B model card, model configuration, Unsloth GGUF files, Unsloth Qwen 3.6 guide, llama.cpp server options.