Skip to content

How-ToSSD

How to Run Qwen 4 Locally on Your PC

Qwen's new Qwen4-35B-A3B is an open mixture-of-experts model with a lookup table that can stay on your SSD. We explain how much memory it needs, how to run it with llama.cpp or Unsloth Desktop, and the thinking and sampling settings to use.

By , Systems & Technical Editor

5 min read

How to Run Qwen 4 Locally on Your PC

This guide is based on Qwen's Qwen4-35B-A3B model card, Hugging Face's launch post and GGUF file listing, and Unsloth's run guide, all read on 4 December 2026. Speed figures are Unsloth's own measurements, credited where used, and memory figures other than the published ones are our estimates.

Alibaba's Qwen team has released Qwen4-35B-A3B, an open model from its new Qwen4 series, under the Apache 2.0 licence. It's a mixture-of-experts (MoE) model that reads text, images and video, has a native context window of 1,048,576 tokens, and is aimed at agentic coding and multi-step work. Hugging Face says it shipped with day-one support in llama.cpp, vLLM, SGLang, MLX and Transformers, so you can run it on a well-equipped PC today.

Step 1: Understand what makes Qwen 4 different

Qwen's model card lists 35 billion parameters with 3 billion activated per token, plus a 20-billion-parameter n-gram embedding and a 2-billion-parameter multi-token prediction (MTP) layer. Hugging Face's launch post puts the total at about 56 billion.

The n-gram embedding is the unusual part. Unsloth calls it the engram: a large lookup table where each token reads only a few rows. Because it's a lookup table rather than weights the GPU has to work through, Unsloth says it can be memory-mapped from your SSD, with only the rows that are needed read from disk. That's why Qwen 4 can run on less graphics memory than its full download size suggests.

If MoE models are new to you, our MoE vs dense LLMs for local AI explainer covers why only part of the model works on each token.

Step 2: Check how much memory you need

Unsloth publishes this table for its Qwen4 GGUF files. The figures are what the model weights need in VRAM plus system RAM (or unified memory) with the engram left on the SSD:

Quantisation

Weights with engram on SSD

2-bit

11.9GB to 16.2GB

3-bit

17.2GB to 19.4GB

4-bit

20.5GB to 24.7GB

6-bit

29.2GB to 30.5GB

8-bit

40.5GB (62.3GB full download)

Source: Unsloth's Qwen4 run guide. Sizes in GB (10^9 bytes).

Unsloth suggests starting with its UD-IQ4_XS file on a 24GB device, or UD-IQ3_XXS on an 18GB device with a short context, and stresses these are starting points rather than full runtime requirements. You need extra memory for the context (the KV cache), compute buffers and the vision projector if you use images.

For comparison, the ggml-org GGUF repository linked from Hugging Face's launch post holds single-file Q4_K_M, Q6_K and Q8_0 downloads of 36GB, 51GB and 59.4GB respectively. Our guide to checking whether a model fits your GPU explains how to read file sizes like these.

Our rule of thumb: a 24GB or 32GB graphics card is the comfortable starting point for 4-bit, and a 16GB card can work with the 2-bit files or with part of the model in system RAM. Keep 32GB or more of system RAM; our guide to how much RAM you need for local AI explains why.

Step 3: Put the model on a fast SSD

Unsloth's full 8-bit download is 62.3GB, and its engram files alone range from 11.52GB (IQ4_NL) to 40.96GB (BF16). Because the engram is read from disk, the first prompts after loading are slower: on an RTX 5090, Unsloth measured prompt processing of about 750 tokens per second on a cold first run against about 8,300 once the table was cached. It recommends sending a short warm-up prompt after loading. A fast NVMe drive such as the Samsung 9100 PRO 2TB helps here, and our best SSDs for local AI models guide has more options.

Step 4: Run it with llama.cpp

Unsloth says Qwen4 support is in mainline llama.cpp from pull request #33626 onwards, so you need a recent build. Hugging Face's launch post gives this command to download and serve the 4-bit file:

llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M

Swap Q4_K_M for Q6_K or Q8_0 if you have more memory. Unsloth's guide says you can then open http://localhost:8080 in a browser to chat. To keep the engram on your SSD rather than in graphics memory, Unsloth's guide adds --load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU when it runs its own GGUF files.

Turn on multi-token prediction. Every Qwen4 GGUF includes the MTP head. Hugging Face says adding --spec-type draft-mtp --spec-draft-n-max 3 sped up generation by 22% on an Apple M5 with the 4-bit file. Unsloth recommends a draft depth of 2 by default and depth 1 when experts spill to system RAM, and measured gains of 1.22x to 1.28x on an RTX 5090 at a draft depth of 1. Speed-ups depend on your hardware, so compare with and without it. Our speculative decoding guide explains the idea.

Step 5: Or use Unsloth Desktop

If you'd rather not use a terminal, Unsloth says its open-source Unsloth Desktop app for Windows, macOS and Linux can search for and download its Qwen4 GGUF files, set up the engram automatically, and offload to system RAM when the model doesn't fit. Unsloth suggests starting with a 32,768-token context.

We couldn't find a Qwen4 page in Ollama's or LM Studio's model libraries when we checked at about 03:00 GMT on 4 December, so check those apps for updates before relying on them.

Step 6: Set thinking and sampling

Qwen 4 thinks before answering by default. Qwen's model card lists four reasoning_effort levels: xhigh for complex tasks, high (the default), low for quick replies and off to disable thinking. Qwen warns that lower effort isn't always faster overall in multi-step agent tasks, because it can lead to more failures and retries.

Qwen recommends these sampling settings:

Setting

Thinking mode

Non-thinking mode

temperature

1.0

0.7

top_p

0.95

0.80

top_k

20

20

presence_penalty

0.0

1.5

With llama.cpp's server, Unsloth advises using the top-level reasoning_effort field in requests, or starting the server with --reasoning off, because some other ways of turning thinking off can conflict.

Step 7: Decide whether Qwen 4 is the right model

If your graphics card has 8GB to 12GB, Qwen 4 will rely heavily on system RAM. Our guide to running MoE models on low VRAM with llama.cpp covers that approach, and our Qwen 4 vs Qwen3.8 comparison explains how it differs from Qwen's previous 27B model. For hardware advice, see our best graphics cards for Qwen 4.

The bottom line

Qwen4-35B-A3B is a 35B mixture-of-experts model with 3B active parameters and a large lookup table that can stay on your SSD. That means a 4-bit build needs about 20.5GB to 24.7GB of memory, so a 24GB or 32GB graphics card is the comfortable choice and 16GB cards can use smaller files. Use a recent llama.cpp build or Unsloth Desktop, keep the files on a fast NVMe SSD and try multi-token prediction for extra speed.

In this article

Sources

  1. 01Qwen, Qwen4-35B-A3B model card (Hugging Face)
  2. 02Hugging Face, Welcome Qwen 4: Cutting-edge intelligence on-device
  3. 03ggml-org, Qwen4-35B-A3B GGUF files (Hugging Face)
  4. 04Unsloth, Qwen4 35B-A3B: How to Run Locally

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Graphics Cards for Qwen 4 in 2026

Best Picks

Best Graphics Cards for Qwen 4 in 2026

The best graphics cards for running Qwen's new Qwen4-35B-A3B at home, from the 32GB RTX 5090 and Radeon AI PRO R9700 to the 96GB RTX PRO 6000 Blackwell, 128GB DGX Spark and 16GB RTX 5070 Ti and RTX 5060 Ti, ranked by memory.

Hannah Vance4 min

Qwen 4 vs Qwen3.8: Which Should You Run on Your PC?

Versus

Qwen 4 vs Qwen3.8: Which Should You Run on Your PC?

Qwen4-35B-A3B and Qwen3.8-27B are both open models you can run at home, but one is a mixture-of-experts model and the other is dense. We compare their design, memory needs, context, features and software support.

Callum Reid3 min

Best Graphics Cards for MXFP4 AI Models 2026

Best Picks

Best Graphics Cards for MXFP4 AI Models 2026

The best graphics cards for running MXFP4 AI models such as OpenAI's gpt-oss at home, from the 96GB RTX PRO 6000 Blackwell and 128GB DGX Spark to the RTX 5090 and 16GB RTX 5070 Ti and RTX 5060 Ti, plus why none can run Amazon's 626GB Ergo alone.

Hannah Vance3 min

Amazon Ergo MXFP4 vs MXFP8: Which Version Should You Run?

Versus

Amazon Ergo MXFP4 vs MXFP8: Which Version Should You Run?

Amazon's Ergo comes in a 626GB MXFP4 version and a 1.17TB MXFP8 version. We compare what's different, what Amazon says about quality, the hardware and storage each needs, and which one makes sense to run.

Callum Reid3 min