Qwen4-35B-A3B: Alibaba's new open model packs 1M tokens of context and runs on a Mac
Alibaba's Qwen team has released Qwen4-35B-A3B, the first open model of the new Qwen4 generation. It understands text, images and video, handles up to a million tokens in one go, and ships under the permissive Apache 2.0 license. Thanks to a trick that keeps part of the model on your SSD, it already runs on a Mac with 32 GB of RAM.

What's going on
Alibaba's Qwen team released Qwen4-35B-A3B on December 3 and 4, 2026. It's the first freely downloadable model of the new Qwen4 generation. Until now, the only Qwen4 model was the big flagship Qwen4-Max, which Alibaba launched in mid-November and offers exclusively through a paid API. Qwen4-35B-A3B, by contrast, has its weights up on Hugging Face and on ModelScope, the Chinese model platform. It's licensed under Apache 2.0, so you can download, modify and even use it commercially for free.
The model takes text, images and video as input and responds with text. It can process up to 1,048,576 tokens at once, roughly the equivalent of several thick books. Hugging Face worked with the Qwen team to make sure popular tools supported the model from day one: transformers, llama.cpp including the Llama App, vLLM, SGLang, MLX for Apple machines, and TRL for fine-tuning. Unsloth offers its own compressed versions and a desktop app.
How the model is built
The name gives away the essentials: 35B stands for around 35 billion core parameters, A3B for about 3 billion active parameters. Qwen4-35B-A3B is a Mixture-of-Experts (MoE) model. Think of it as a team of 256 specialists. For each word, a kind of gatekeeper calls on just 8 of them plus one permanent generalist. That's why the model only computes with a fraction of its size per token, and why it's fast. The Model Card lists 3 billion active parameters, while the Hugging Face blog puts it at around 3.8 billion.
Two more building blocks come on top. The bigger one is an n-gram embedding table with roughly 20 to 20.5 billion parameters. Picture it as a giant reference book of common two- and three-word combinations. According to Hugging Face, the model reads only 16 rows from it per token: eight for the last two tokens and eight for the last three. The table is meant to improve quality without making the GPU compute or store more. The second block is a small MTP head (multi-token prediction) with about 2 billion parameters. It guesses several words ahead, which the main model then only has to verify. Altogether, that brings the model to around 56 billion parameters.
The way the model reads text is new, too. Its 40 layers repeat the same pattern ten times:
- Three Gated DeltaNet layers: This form of "linear attention" keeps a fixed-size note while reading instead of remembering every single word. As a result, memory use barely grows with long texts.
- One Qwen Sparse Attention (QSA) layer: Here the model can look back at specific earlier spots in the text. A small indexer groups every four tokens into a block and selects up to 512 blocks, so at most 2,048 tokens per query.
According to Alibaba, this means the model needs far less space for the KV cache, the buffer that holds the conversation so far. Only that, Alibaba says, makes the million tokens practically usable. Also new is a "gated residual" with four parallel information streams per token, blended via learned gates. A vision transformer splits images into 16 × 16 pixel tiles. From videos, it samples two frames per second by default.
What the model is supposed to do well
Alibaba highlights three points, all of which so far come only from the company itself:
- Long agentic tasks: The model is supposed to reliably finish multi-step work over longer stretches, for example as a work assistant for office and knowledge work. An agent is an AI that operates tools on its own and carries out intermediate steps.
- Visual and creative coding: It's said to be better at web UIs, 3D modeling and game development.
- Token efficiency: Tasks should need fewer turns, and the model should think more concisely. The four thinking levels are said to be more clearly distinct.
You set the thinking level with the reasoning_effort parameter: xhigh for hard tasks, high as the default, low for quick answers and off for no thinking at all. Alibaba warns, though, that a lower level doesn't automatically get you to the finish line faster on agentic tasks:
While it may deliver faster responses per turn, it can also lead to insufficient analysis, more failures and repeated attempts, which can increase overall latency and token consumption.
Benchmarks: mostly vendor claims so far
The official Model Card shows the results only as a chart. The numbers aren't in the text, and Unsloth's page still says they're being "finalized". According to Alibaba, some scores come from independent sources: Terminal Bench 4.1, FrontierCode-AA 2.0, AA-Briefcase and AutomationBench-AA from Artificial Analysis, and APEX-Agents from the Mercor leaderboard. Work360, on the other hand, is an in-house test. Hugging Face writes that the model punches far above its weight class and matches or even beats the much larger Qwen3.8-Flash-Next on some tasks. According to a report on news.qq.com, it beats similarly sized models such as Inkling2 Mini and the dense Qwen3.8-27B on most tests. A dense model is one where all parameters are always involved in the computation. Independent third-party verification is still pending.
One example from the Hugging Face blog stands out. There, the model was trained with reinforcement learning (learning through rewards, here using GRPO) and a LoRA adapter to triage security alerts. A LoRA adapter is a small add-on layer you train instead of changing the whole model. On 12 held-out tasks from CyberDefense Bench, the base model solved 4, the adapter solved 6 after 50 training steps, and only 3 after 100 steps. As Unite.ai points out, the training reward kept rising, but performance on new tasks didn't. More training wasn't automatically better here.
What you need to try it
On paper, the model has 56 billion parameters, which is really too much for home use. The trick is the n-gram table. Since only 16 rows are needed per token, it can stay on the SSD and be read on demand. llama.cpp does this by default, and Unsloth calls the technique "Engram". According to the GGUF repository, that gives you the following numbers:
| Quantization | File size | RAM used | Suitable Mac |
|---|---|---|---|
| Q4_K_M (4-bit) | 36.0 GB | 21.9 GB | 32 GB |
| Q6_K (6-bit) | 51.0 GB | 29.2 GB | 48 GB |
| Q8_0 (8-bit) | 59.4 GB | 37.6 GB | 64 GB |
Quantization means the model's numbers are stored at lower precision. That saves space and costs only a little accuracy. Unsloth says its 3-bit variant runs in the Unsloth Desktop app with as little as 18 GB of RAM. In practice, that means:
- Memory: Roughly 20 to 24 GB of free VRAM (video memory) or RAM for the 4-bit version, plus about 36 GB of free space on a fast SSD.
- Mac: Apple Silicon machines with 32 GB of unified memory are enough for Q4. oMLX ships its own Metal kernels, can process images, and also offloads the table to the SSD. Support in the official mlx-lm is still in the works.
- Longer texts: Every additional token in the conversation history takes up memory. The full million tokens is therefore hardly realistic on home machines.
According to Hugging Face, the llama.cpp command is, for example, llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M. Adding --spec-type draft-mtp --spec-draft-n-max 3 turns on prediction via the MTP head. With three tokens guessed ahead, output ran 22 percent faster on an Apple M5. You'll find more guides on the Hugging Face blog and at Unsloth. According to the Model Card, the model is also available via Ollama.
Background: How open is Qwen still?
The release cools down a debate. On November 16, 2026, Alibaba unveiled its flagship Qwen4-Max: 2.4 trillion parameters, 71 billion of them active, at $1.50 per million input tokens and $4.50 per million output tokens. The weights for that model aren't available. A post on note.com criticized at the time that Qwen now mentions open models only as "coming soon" in a side note, and that the gap between what's open and what's strongest grows with every generation. Qwen3.7 had no open model at all. Qwen4-35B-A3B is now the first model in the new "Qwen4 open model series". YouTube videos hint at a 27B variant, but the sources don't officially confirm it.
Our take
For anyone who wants to run AI locally, Qwen4-35B-A3B is one of the most exciting models of the year. It combines text, images and video, offers a million tokens of context and comes with a permissive license. The 4-bit version runs on a well-equipped Mac or a 24 GB GPU. Its predecessor, Qwen3.6-35B-A3B, topped out at 262,000 tokens. Offloading the n-gram table to the SSD is a new approach that significantly lowers the hardware bar.
Still, plenty of questions remain. The benchmarks so far come from the vendor, some of them from an in-house test. How well the million tokens work in practice, meaning whether the model actually finds details in very long texts, still has to be shown in independent tests. The news.qq.com report also points out that fewer active parameters don't automatically mean lower costs. Memory, memory bandwidth and expert distribution remain bottlenecks, and "runs on one card" doesn't mean you can serve many users at once with it. For tinkerers, developers and companies that don't want to hand their data to a cloud, the model is nonetheless a strong new option.
Sources
- Hugging Face Trending huggingface.co
- Hugging Face Trending huggingface.co
- Hugging Face Blog huggingface.co
- unite.ai unite.ai
- note.com note.com
- news.qq.com news.qq.com
- Hugging Face Trending huggingface.co
- Hugging Face Posts huggingface.co
- Reddit r/LocalLLM reddit.com
- Reddit r/Qwen_AI vectorwire.ai
- Bing News (zh-TW) teepr.com
- Bing News (zh-HK) finance.sina.com.cn
- dev.to #ai dev.to
Try it yourself: Qwen4-35B-A3B
Explained step by step, no prior knowledge needed – on your own computer or free in your browser.
What can I do with it?
Qwen4-35B-A3B is an assistant that runs on your own computer. It answers questions, writes and explains code, analyzes images and, according to the vendor, can also understand video. Its biggest strength is the huge context window of up to a million tokens. That lets you process long documents, entire code projects or extensive notes in one go, as long as you have enough memory. The model can think before answering, and you set how long in four levels. Alibaba especially highlights multi-step agentic tasks and coding web UIs, 3D scenes and games. According to the vendor and Hugging Face, it performs at the level of the much larger Qwen3.8-Flash-Next. Independent benchmarks are still missing, though. It probably won't match the big cloud models, such as the top models from OpenAI or Anthropic, but in return all your data stays on your device.
Who is it worth it for?
The model is worth it for anyone with a Mac with at least 32 GB of memory or a GPU with around 24 GB who wants a strong, versatile assistant without the cloud. That goes especially for programmers, people working with long documents, and the privacy-conscious. With 8 to 16 GB of memory it gets tight, and a smaller model is the better choice. That said, Unsloth says its 3-bit variant runs with as little as 18 GB.
Ideas: What you can do with it
Give the model a lease, a user manual or a research report and have it list the key points, deadlines and risks. Thanks to the large context window, even lengthy texts fit, and because everything runs locally, confidential documents never leave your machine.
Describe a small browser game or a landing page, and the model writes you a ready-to-use HTML file. Open it in your browser and refine it step by step in the conversation. This kind of visual coding is exactly what Alibaba names as a strength.
Upload a photo of an invoice, a chart or an error message and ask what it shows or how to fix the problem. You can use it to transcribe tables from images or get math problems from a textbook explained.
Connect the model to tools like Qwen Code via llama.cpp's OpenAI-compatible server. It can then explain code, hunt down bugs and write functions without your source code ever going to the cloud.
Give the model a video, such as a recorded talk, and ask about its content or specific moments. According to the vendor, this works even for videos hours long, but it needs a lot of memory and the right video settings.
With TRL or Unsloth, you can fine-tune a small LoRA adapter for your task, such as triaging support tickets. The Hugging Face example shows, however, that you should always test the result on new tasks, because more training isn't automatically better.
What your computer needs
Which variant is right for me?
Many models come in several sizes or "quantizations." These are compressed versions: smaller and faster, but slightly less accurate. Rule of thumb: pick the largest variant whose memory requirement fits in your VRAM (video memory). The scripts below choose this for you automatically.
| Variant | Download | Needs approx. | Compatible graphics cards |
|---|---|---|---|
35b-a3b Default |
36 GB | 41 GB | e.g. 2× RTX 3090/4090 or RTX A6000 |
35b-a3b-q4_K_M |
37 GB | 42 GB | e.g. 2× RTX 3090/4090 or RTX A6000 |
35b-a3b-bf16 |
114 GB | 126 GB | servers only, with multiple data-center GPUs (e.g. 8× H100) |
According to the GGUF repository, Q4_K_M (36 GB file) uses about 21.9 GB of RAM and fits on a 32 GB Mac or a 24 GB GPU. That's the recommendation for most people. Q6_K (51 GB file, 29.2 GB used) is meant for 48 GB Macs, Q8_0 (59.4 GB file, 37.6 GB used) for 64 GB Macs. If you only have 18 to 24 GB, go for Unsloth's 3-bit Dynamic GGUF, which Unsloth says gets by with 18 GB. For servers with big GPUs, there are BF16 and FP8 versions that you run with vLLM or SGLang.
- The n-gram table with roughly 20 billion parameters stays on the SSD by default in llama.cpp. A fast NVMe SSD is therefore important, and you need enough disk space for the whole file (Q4: 36 GB).
- Q4_K_M uses about 21.9 GB of RAM, so it runs on a 32 GB Mac or a 24 GB GPU. Q6_K needs 29.2 GB, Q8_0 37.6 GB.
- Unsloth Desktop handles SSD offloading automatically and, according to Unsloth, gets the 3-bit version down to 18 GB of RAM.
- On Apple Silicon, the model runs with llama.cpp or oMLX. oMLX supports images, MTP and SSD offloading; support in the official mlx-lm is still in the works.
- Long context costs extra memory. The full million tokens is hardly usable on home machines, so start with shorter context lengths.
- Only about 3 to 3.8 billion parameters are active per token. That's why the model stays relatively snappy even with partial offloading.
Groß (56,4 B parameters, MoE): running entirely on the GPU takes a lot of VRAM (video memory). With MoE offloading, a regular graphics card plus plenty of RAM is enough (see table). Colab Free isn't enough.
How do I find out what my computer has?
- Windows: Press Ctrl + Shift + Esc → Task Manager → Performance tab → click GPU on the left. At the bottom you'll see Dedicated GPU memory (that's your VRAM). You'll find system memory under Memory.
- Mac: Apple menu at the top left → About This Mac. You'll see your chip (e.g. M2) and memory (e.g. 16 GB). On Apple chips, graphics and processor share this memory.
- Linux: Type
nvidia-smiin the terminal (shows your graphics card and its memory) andfree -hfor system memory.
Guide
Google Colab (in your browser, no installation)
Google Colab is a free service from Google. It gives you a computer with a graphics card in your browser for a few hours. All you need is a Google account. For this model: Colab Pro/Pro+ only – needs an A100 with 80 GB or an H100.
- Download the notebook. Click the button and save the file.
- Open Colab. Go to colab.research.google.com and sign in with your Google account.
- Upload the notebook. In the window that appears, click Upload on the left (or choose File → Upload notebook at the top) and select the file
colab.ipynb. - Turn on the GPU. In the top menu, go to Runtime → Change runtime type → under Hardware accelerator, select T4 GPU (with Colab Pro: L4 or A100) → Save.
- Start everything. Runtime → Run all (keyboard shortcut Ctrl + F9). If you see the warning “This notebook was not authored by Google,” click Run anyway.
- Wait. The cells run one after another. A green checkmark appears to the left of each cell when it's done. Installation and download take about 16 minutes here.
- Try it out. The result appears below the last cell. To test something else, change the text in the cell and run it again with Shift + Enter. The last cell starts a proper chat with an input field.
- Clean up. When you're done: Runtime → Disconnect and delete runtime. This saves your free quota.
Good to know: The free GPU is limited (usually a few hours per day). After about 90 minutes of inactivity, Colab disconnects, and you'll have to start everything over.
Windows 10 / 11
The easiest way is Ollama, a free program that launches AI models with a single command.
- Update your graphics driver (NVIDIA cards only): Install the NVIDIA app or the latest driver. For AMD cards, use the latest Adrenalin driver.
- Install Ollama. Download the file OllamaSetup.exe from ollama.com/download/windows, double-click it, and choose Install. Afterward, a small llama icon appears in the taskbar at the bottom right.
- Open a terminal window. Press the Windows key, type PowerShell and press Enter. A blue or black window opens.
- Start the model. Copy this command ("Copy" button), paste it into the window with a right-click, and press Enter:
The first time, Ollama downloads the model (36 GB (about 48 min at 100 Mbit/s)). After that, it's instant.ollama run qwen4:35b-a3b - Start typing. Once
>>> Send a messageappears, type your question and press Enter. Type/byeto end the chat.
Not enough memory? Pick a smaller variant from the table above, e.g. ollama run qwen4:35b-a3b.
Prefer automatic? A script that picks the right variant for you
- Download both files into the same folder: try_windows.ps1 demo.py
- Open the folder in File Explorer, right-click an empty spot and choose Open in Terminal.
- Paste this command and press Enter:
powershell -ExecutionPolicy Bypass -File try_windows.ps1
If needed, the script installs Ollama via winget, measures your VRAM (video memory) and downloads the matching variant.
macOS
Macs with an Apple chip (M1 to M5) are ideal. Older Intel Macs are very slow.
- Install Ollama. Download it from ollama.com/download/mac, open the file, and drag Ollama into your Applications folder. Launch Ollama once – a llama appears in the menu bar at the top.
- Open Terminal. Press Cmd + Space, type Terminal, and press Enter.
- Start the model. Paste the command (Cmd + V) and press Enter:
The first time, the model is downloaded (36 GB (about 48 min at 100 Mbit/s)).ollama run qwen4:35b-a3b - Start typing. Type your question and press Enter. Quit with
/bye.
Linux
- Check your GPU.
nvidia-smishould show your card. If it doesn't, install the driver on Ubuntu and restart:sudo ubuntu-drivers install - Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Start the model:
Exit withollama run qwen4:35b-a3b/bye. Useollama psto check whether the model is running on the GPU. - Or let it pick the right variant automatically:
bash try_linux.sh
Try it
Explain in three sentences what a Mixture-of-Experts model is.Write a Python function that merges two sorted lists into one sorted list, and explain each step.Here's a photo of what's in my fridge: What three dishes can I cook with it? (attach image)Build me a single HTML file with a small browser game where you steer a ball through a maze using the arrow keys.I'm pasting a 40-page contract below. List all notice periods and payment obligations with page numbers and flag any unusual clauses.
Tips for better results
- With thinking mode on, Alibaba recommends temperature=1.0, top_p=0.95, top_k=20, min_p=0 and presence_penalty=0.
- With thinking mode off, Alibaba recommends temperature=0.7, top_p=0.8, top_k=20 and presence_penalty=1.5.
- In llama.cpp, turn on MTP prediction with `--spec-type draft-mtp --spec-draft-n-max 3`. According to Hugging Face, that gives you about 22 percent more speed.
- For multi-step agentic tasks, don't rush to set it to low: too little thinking often leads to failed attempts that end up costing more time.
- For long videos, set longest_edge to 469762048 in video_preprocessor_config.json. The model then samples more frames per second.
If something goes wrong
The model uses a new architecture. Older versions of llama.cpp, Ollama or LM Studio can't load it, so make sure to update to the latest version.
The GGUF file is much larger than the RAM it uses because the n-gram table sits on the SSD. On a slow hard drive or a USB drive, the model gets noticeably slower.
With transformers, the bundled Qwen4 tokenizer requires `tiktoken` and `trust_remote_code=True`. The Jinja template in the tokenizer-compat folder is only a stopgap and may produce different token IDs.
For video input with transformers, you need torchcodec and ffmpeg installed.
If you get endless repetition, try raising presence_penalty to somewhere between 0 and 2. Values that are too high can cause language mixing, though.
By default the model thinks at the high level, which can take a long time for simple questions. With reasoning_effort=low or off, it answers faster.
“out of memory,” a crash, or your computer freezes
The model is too big for your VRAM (video memory). Pick a smaller variant from the table above and close other programs, especially games and browsers with lots of tabs.
It runs, but extremely slowly
Your CPU is probably doing the work instead of your graphics card. In Ollama, the PROCESSOR column of ollama ps shows how much runs on the GPU. If it says "100% CPU", update your graphics driver or pick a smaller variant that fits entirely into VRAM (video memory).
“ollama” or “python” is not found
Close the terminal window and open it again so it recognizes the newly installed program. For Python on Windows: reinstall it and check Add python.exe to PATH.
Windows: "Running scripts is disabled on this system"
Run the script with exactly the command above: powershell -ExecutionPolicy Bypass -File try_windows.ps1. This allows execution for this one time only.
Error message when loading the model (version, "trust_remote_code", unknown architecture)
Brand-new models often need the latest software version. With Ollama: update Ollama. With Python: pip install -U transformers in the activated environment. The Model Card usually lists the exact version.
Tokenstrom generates the scripts and notebook automatically. Please take a quick look before running them – they're plain, readable text. Mind the model's license: apache-2.0.
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.