Skip to main content
株式会社オブライト
株式会社オブライト

Qwen4-35B-A3B Requirements

VRAM, GGUF Sizes, Ollama & License (Dec 2026)

Published 2026/12/0413 min read

Qwen4-35B-A3B (35B MoE, 3B active): Q4_K_M is 35.2GB, so use a 48GB GPU or 64GB Mac, not 24GB (estimate). Apache 2.0, 1M context, Ollama commands. Dec 2026

Qwen4-35B-A3B is an open-weight Mixture-of-Experts model from Alibaba's Qwen team: 35B total parameters, about 3B active per token, Apache 2.0 licensed (commercial use allowed). The Hugging Face repository was created on December 3, 2026 (UTC). The 4-bit Unsloth GGUF (UD-Q4_K_M) is 35.2GB in total, so it will not fit on a single 24GB GPU, but it should fit on a 48GB-class GPU or a 64GB Mac (that fit is our estimate). It has a 1M-token context window and accepts text, image and video input.

Facts are from primary sources as of December 4, 2026: the Hugging Face model card and config.json, the Unsloth GGUF repository, and the Ollama library page. Values marked official come from those sources; values marked estimate are our own calculations. The model card gives no minimum hardware requirements, so every GPU and memory combination below is an estimate.

Requirements at a glance

FormatFile size (official)Setup that should work (estimate)
UD-IQ1_S (GGUF)21.3GBBarely fits a 24GB GPU; quality drops a lot
UD-Q2_K_XL (GGUF)27.7GBWeights fit a 32GB GPU (e.g. RTX 5090); keep context short
UD-IQ4_XS (GGUF)32GB40GB+ of memory (e.g. 48GB Mac)
UD-Q4_K_M (GGUF)35.2GB48GB GPU or 64GB Mac. The default choice
UD-Q5_K_M (GGUF)42.4GBTight on a 48GB GPU at long context; fine on a 64GB Mac
UD-Q6_K (GGUF)50.9GB64GB Mac or 80GB GPU
Q8_0 (GGUF)62GB80GB GPU or 96GB+ Mac
BF16 (official safetensors / GGUF)about 113-114GB2x 80GB GPUs or 128GB+ Mac
Ollama default tag (qwen4:35b-a3b)36-37GB48GB GPU or 64GB Mac

To check quickly whether a model fits your own GPU or Mac, our free VRAM calculator (no sign-up) estimates the memory you need from the model, quantization and context length. Qwen4-35B-A3B is available in its model list.

Real memory use is the weight size in the table plus the KV cache and runtime overhead (we assume roughly 1-3GB). Note that weight memory is set by total parameters, not the 3B active ones: an MoE cannot know in advance which experts a token will use, so all 35B of weights must sit in GPU or CPU memory (or fast storage). Speed follows the active 3B; memory follows the total.

What is Qwen4-35B-A3B? Model specs

Qwen4-35B-A3B is the first Qwen4 model with published weights, and it is also a vision-language model (the model card's task is image-text-to-text). It shares the "35B-A3B" name with earlier generations (Qwen3.5 and Qwen3.6) but uses a different architecture and file layout. Here is what the model card and config.json state.

ItemDetail (source)
ProviderAlibaba Qwen (Hugging Face: Qwen/Qwen4-35B-A3B)
ReleaseRepository created December 3, 2026 UTC (Hugging Face API); the model card gives no release date
LicenseApache-2.0 (model card, LICENSE)
Parameters35B total, 3B active; plus about 20B n-gram embedding and about 2B MTP parameters, about 57B in safetensors (model card)
Layers40 layers: 10 repeats of 3x (Gated DeltaNet -> MoE) then 1x (Qwen Sparse Attention -> MoE) (model card)
Experts8 of 256 routed, plus 1 shared (model card)
Hidden size2,048 (model card)
Context1,048,576 tokens (model card, config.json)
InputText, image, video (model card)
Reasoning controlreasoning_effort: xhigh / high (default) / low / off (model card)
Output limitsUp to 262,144 reasoning tokens and 131,072 answer tokens (model card)
FrameworksTransformers, vLLM, SGLang, TokenSpeed (model card); llama.cpp, Ollama, Unsloth, mlx-vlm, LiteRT-LM also listed

Three things stand out. First, a hybrid attention stack: 30 of the 40 layers use a linear-attention variant (Gated DeltaNet) and 10 use sparse attention (Qwen Sparse Attention), so the KV cache grows in only 10 layers even at very long context. Second, n-gram embeddings: a table of about 10 million entries that accounts for the extra roughly 20B parameters. Third, MTP (Multi-Token Prediction), which predicts several tokens per step to speed up inference and ships with the weights.

Weight breakdown: the n-gram embedding (Engram) is about 11.5GB

In Unsloth's GGUF repository, Q4_K_M is split into two files: about 23.7GB and about 11.5GB, 35.2GB in total. The second appears to be the n-gram embedding part (called engram in the repository), and an engram folder holds standalone files in IQ4_NL (11.5GB), Q5_1 (15.4GB), Q8_0 (21.8GB) and BF16 (41.0GB). Our reading of that file's role is an inference; Unsloth's explanation is brief.

Unsloth's model page says Unsloth Desktop's Engram feature offloads this part to SSD to cut RAM and VRAM use, and that a 3-bit GGUF can run on 18GB of RAM. We have not verified this or its speed impact. What the files do show is that the n-gram table is a lookup rather than something used in full at every token, so it costs memory out of proportion to compute. If it can live on SSD, the weights you must keep on the GPU could shrink to about 23.7GB for Q4_K_M.

Estimating VRAM: weights plus KV cache

The KV cache is the memory that grows with context length. According to config.json, only 10 of the 40 layers use regular (sparse) attention, with 2 KV heads and head_dim 256. Per token per layer that is 2 (K and V) x 2 x 256 = 1,024 values. Assuming a BF16 (2-byte) KV cache, our calculation is:

- 10 layers x 1,024 values x 2 bytes = about 20.5KB per token
- 32K tokens (32,768): about 0.7GB (estimate)
- 128K tokens (131,072): about 2.7GB (estimate)
- 256K tokens (262,144): about 5.4GB (estimate)
- 1M tokens (1,048,576): about 21.5GB (estimate)
- The 30 linear-attention layers keep a fixed-size state independent of context (not included here)

This excludes the sparse-attention indexer's cache, the linear-attention state, MTP memory and engine workspace, and implementations differ, so treat it as a lower bound and check real usage with nvidia-smi or ollama ps. A model with full attention in every layer would need several times more KV cache at the same context. Even so, 1M tokens costs about 21.5GB on top of the weights, so in practice most people should stay at 32K-128K.

GPU and Mac guide (all estimates)

HardwareHow to run it (estimate)
RTX 4090 / 3090 (24GB)Q4_K_M weights alone are 35.2GB, so it does not fit. Use llama.cpp's MoE expert CPU offload with 32GB+ RAM, or drop to IQ1_S (21.3GB) at a quality cost
RTX 5090 (32GB)Q2_K_XL (27.7GB) fits; Q4_K_M needs CPU offload
48GB GPU (e.g. RTX 6000 Ada)Q4_K_M (35.2GB) plus 128K context (about 2.7GB) should fit
32GB MacWeights only, no headroom; IQ2 or lower runs, but OS and apps leave little room
64GB MacQ4_K_M (35.2GB) to Q5_K_M (42.4GB) is realistic; check the Metal allocation limit
128GB+ MacQ8_0 (62GB) and BF16 (about 113GB) become options
Single 80GB GPUQ8_0 (62GB) plus a long context should fit

When memory runs short, try in this order: (1) one step lower quantization, (2) shorter context, (3) experts on the CPU side. Going from 4-bit to 2-bit class tends to hurt code and math accuracy most, so test on your own tasks before choosing.

How to run it: Ollama, llama.cpp, vLLM

Ollama is the quickest. The library has a qwen4 page with seven tags: latest and 35b-a3b (both 36-37GB), 35b-a3b-q4_K_M (37GB), 35b-a3b-bf16 and 35b-a3b-gguf-bf16 (114GB), and the MLX tags 35b-a3b-mlx-bf16 (114GB) and 35b-a3b-nvfp4 (36GB). Every tag has a 1M-token context and takes text and images (Ollama library page).

# Ollama (official library)
ollama run qwen4

# Pull a Hugging Face GGUF directly (Unsloth)
ollama run hf.co/unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_M

For llama.cpp, Unsloth's page gives the commands below. Install with brew install llama.cpp (Mac) or winget install llama.cpp (Windows); the page also shows a source build. It does not state a minimum llama.cpp version, so if loading fails, update to the latest build first.

# OpenAI-compatible server with a web UI
llama serve -hf unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_M

# Terminal chat
llama cli -hf unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_M

On a GPU server, the model card says to serve with vLLM or SGLang. The BF16 weights are about 113GB, so plan on at least two 80GB GPUs (estimate).

# vLLM (OpenAI-compatible API, default port 8000)
pip install vllm
vllm serve "Qwen/Qwen4-35B-A3B"

# SGLang
pip install sglang
python3 -m sglang.launch_server --model-path "Qwen/Qwen4-35B-A3B" --host 0.0.0.0 --port 30000

To change the context length in Ollama, see our Ollama context length (num_ctx) guide. If it runs slowly because the GPU is not used, see Ollama not using the GPU: troubleshooting.

Recommended settings: thinking mode and reasoning effort

The model card recommends different sampling settings for thinking and non-thinking modes.

SettingThinkingNon-thinking
temperature1.00.7
top_p0.950.80
top_k2020
min_p0.00.0
presence_penalty0.01.5
repetition_penalty1.01.0

Reasoning effort is set with reasoning_effort: xhigh, high (default), low or off. enable_thinking=False is equivalent to off. preserve_thinking, which carries thinking into later turns, is on by default (both are passed via chat_template_kwargs). The card also says presence_penalty can be set between 0 and 2 to curb endless repetition, but higher values may mix languages and slightly lower performance.

# Lower reasoning effort via vLLM's OpenAI-compatible API
curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen4-35B-A3B",
    "messages": [{"role": "user", "content": "Introduce yourself in one line"}],
    "chat_template_kwargs": {"reasoning_effort": "low"}
  }'

The snippet above follows the chat_template_kwargs mechanism in the model card; it is our example, not an official command copied verbatim. How you pass it varies by engine, so check your engine's docs.

Benchmarks: how to read the published numbers

The model card's benchmark table is an image, so we could not read all of it from the text. What we could confirm are agent- and work-oriented evaluations: Terminal Bench 4.1, FrontierCode-AA 2.0, AA-Briefcase v1.1 and AutomationBench-AA (all Artificial Analysis), APEX-Agents v1.1 (Mercor), and Work360 and ChartoGraphy (Qwen's own). The card's metadata also records Deep SWE at 61.8 and GPQA Diamond at 86.9, but the asterisks next to those scores are not explained.

Vendor-published scores are usually measured under settings (reasoning effort, tools, prompts) chosen in the vendor's favor, and we found no third-party reproduction as of this writing. Use them as a guide and run a small evaluation on your own data before you commit.

How it differs from other models

AspectQwen4-35B-A3BQwen3.8-27BQwen4-Max
DesignMoE (35B total, 3B active) plus vision inputDense 27BAPI-only flagship
WeightsOpen (Apache 2.0)Open (Apache 2.0)Not released (API only)
4-bit size35.2GB (Q4_K_M)17.1GB (Q4_K_M)Cannot run locally
Context1M tokensSee our separate article1M tokens (API)
Best forHaving memory to spare and wanting speed and long contextRunning on a 16-24GB GPUUsing an API with no local hosting

Within the Qwen family, Qwen3.8-27B has smaller weights and fits more easily on a GPU of 24GB or less. Qwen4-35B-A3B has larger weights, but each token needs only about 3B active parameters of compute, so generation tends to be faster once you have the memory (a general MoE property; we did not measure speed). If a 24GB GPU is your main machine, start with Qwen3.8-27B requirements and VRAM. For API use, see Qwen4-Max pricing and the 1M-token context.

License and caveats

- License: Apache-2.0. Commercial use, modification and redistribution are allowed, with the patent clause and the requirement to keep copyright notices and the license text. Read the full LICENSE file before use
- Tokenizer: the official tokenizer needs tiktoken, and loading in Transformers requires trust_remote_code=True. A Jinja-template version (tokenizer-compat/) is provided for compatibility, but the card warns it can produce different token IDs
- Video input: for long video, the card advises setting longest_edge in video_preprocessor_config.json to about 469,762,048. Adjusting frame counts in vLLM requires the --media-io-kwargs option
- Japanese quality: we found no Japanese evaluation in the official material; test on your own documents
- Engine support: it is a new architecture, so llama.cpp, Ollama and mlx-vlm builds are changing quickly. If it does not run, update to the latest version first

Troubleshooting

- Out of memory: lower the quantization one step, shorten the context, then move experts to the CPU
- Ollama uses a shorter context than expected: Ollama picks a default context from available VRAM. Check with ollama ps and set num_ctx if needed
- Output repeats itself: match the model card values (presence_penalty 0.0 in thinking mode, 1.5 in non-thinking). Too high mixes languages
- Thinking takes too long: set reasoning_effort to low or off
- Image input fails: llama.cpp may need the mmproj file for vision. Unsloth's repository includes mmproj-BF16.gguf and mmproj-F16.gguf (0.9GB each)

FAQ

Can Qwen4-35B-A3B run on a 24GB GPU (RTX 4090)?

Not by itself. Unsloth's Q4_K_M totals 35.2GB, over 24GB. Even the smallest IQ1_S is 21.3GB, leaving little room for context, with a large quality loss. Realistic options are llama.cpp's expert CPU offload with 32GB+ of RAM, or choosing a dense model such as Qwen3.8-27B for 24GB-or-smaller GPUs (all estimates).

How much VRAM does it need?

Weights are 35.2GB at Q4_K_M, 62GB at Q8_0 and about 113GB at BF16 (official file sizes), plus KV cache and workspace. Because only 10 layers use regular attention, the KV cache is about 2.7GB at 128K tokens and about 21.5GB at 1M tokens (our estimate, excluding the indexer and linear-attention state). For Q4_K_M, a 48GB GPU or a 64GB Mac is the usual target.

Can I use it commercially?

Yes. It is Apache-2.0, which allows commercial use, modification and redistribution, provided you keep the copyright notice and license text. Read the full LICENSE file before use.

What is the Ollama command?

ollama run qwen4 pulls the default tag (36-37GB). To pick Q4_K_M explicitly use ollama run qwen4:35b-a3b-q4_K_M (37GB); to use the Hugging Face GGUF directly use ollama run hf.co/unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_M. The library also has an MLX nvfp4 tag (36GB) and 114GB BF16 tags.

With 3B active parameters, does it run in the memory of a 3B model?

No. An MoE switches experts per token, so all 35B of weights must be held. Active parameters reduce compute per token, not required memory. To cut memory you can quantize more or move some weights to CPU or SSD.

Does it handle images and video?

Yes. The model card's task is image-text-to-text and includes video examples, and every Ollama tag accepts text and images. Video in vLLM needs frame settings, and long video increases token counts.

Can I use the 1M-token context on a home PC?

Possibly, but it is not practical. The KV cache alone is about 21.5GB (estimate), which with the 35.2GB Q4_K_M weights approaches 60GB. Most people should stay at 32K-128K and widen it only when a long document needs it.

References

株式会社オブライト

Oflight Inc. is a Tokyo-based IT company providing software development, digital signage, web development, network systems, and IoT/AR/VR technology services.

Feel free to contact us

Contact Us