Qwen4-35B-A3B on a 64 GB MacBook: Speed, Code and Logic Tests
I ran Alibaba's new Qwen4-35B-A3B on a MacBook Pro M5 with 64 GB in LM Studio and pitted it against Qwen3.8 27B and Gemma 4 26B on the same coding prompt. It was nearly as fast as Gemma and finished in 3 minutes what Qwen3.8 needed almost an hour for.
Alibaba's Qwen team released Qwen4-35B-A3B this week (the weights went up on Hugging Face on December 3–4, 2026). It's the first Qwen4 model with open weights, Apache 2.0, and it's built to run on your own machine. I downloaded it into LM Studio on my MacBook Pro M5 with 64 GB the day it came out and gave it the same coding task I gave the two models I already use: Qwen3.8 27B and Gemma 4 26B A4B.
Short version: Qwen4 ran at 58 tokens per second, almost as fast as Gemma, and produced a result close to Qwen3.8 27B's in about 3 minutes instead of 54, without its reasoning mode even kicking in. It also shipped one real bug, which it fixed on the first try when I showed it the error, and it answered all six of my logic questions correctly. Qwen3.8 27B fell for one of them.
What Qwen4-35B-A3B is
| Type | Mixture of experts (MoE), text + image + video input |
| Parameters | 35B total, about 3B active per token, plus a 20B n-gram embedding table and a 2B MTP head |
| Context | 1,048,576 tokens (1M) natively |
| Reasoning | Adjustable: xhigh, high (default), low, off |
| License | Apache 2.0 |
| LM Studio download | 21.5 GB GGUF, 22 GB RAM minimum |
The "35B" in the name undersells the file. The model card lists 35B MoE parameters plus a 20B n-gram embedding table, which is why a full-precision copy is so big. The good news for laptops is the "A3B" part: only about 3 billion parameters do work for each token, so it generates text at small-model speed while holding big-model knowledge.
It also uses a new hybrid attention design (mostly linear Gated DeltaNet layers, with a sparse attention layer every fourth block). That's what makes the 1M context realistic on paper. LM Studio warns that the 22 GB minimum doesn't mean a full 1M context fits, and on a 64 GB Mac you won't get anywhere near it.
How to run it
LM Studio (what I used): search for qwen4 in the model browser (or open the LM Studio model page) and download qwen/qwen4-35b-a3b. The default 4-bit GGUF is 21.5 GB. Update LM Studio and its runtime before you load it: the architecture is brand new, and day-one support usually keeps improving in the first weeks.
llama.cpp has day-one support. From the Hugging Face launch post:
llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M
MLX on Apple Silicon works through mlx-lm (text only for now):
mlx_lm.generate --model mlx-community/Qwen4-35B-A3B-4bit-text \
--prompt "Explain sparse attention like I am 5" --max-tokens 4096
Reasoning effort. Through an OpenAI-compatible API, pass it in the chat template arguments:
"chat_template_kwargs": {"reasoning_effort": "low"}
Use "off" to disable thinking completely. In mlx-lm the same setting goes in --chat-template-config '{"reasoning_effort": "low"}'.
Sampling. Qwen recommends temperature 1.0, top_p 0.95, top_k 20 with thinking on, and temperature 0.7, top_p 0.8, top_k 20, presence_penalty 1.5 with thinking off.
My test setup
- MacBook Pro M5, 64 GB unified memory
- LM Studio, GGUF 4-bit for all three models
- Qwen4-35B-A3B, reasoning effort set to high (the default). In my LM Studio setup no thinking block ever appeared, so in practice Qwen4 answered without reasoning in all tests below. More on that at the end.
- Qwen3.8 27B, reasoning medium. This is the model I use for harder tasks day to day (more on that in my Flint vs Qwen 3.8 27B setup)
- Gemma 4 26B A4B QAT, Google's quantization-aware 4-bit build, also an MoE model
Each model got the prompt once, in a fresh chat, with no follow-ups. I judged only the first answer.
Test 1: one prompt, one animated aquarium
I like this test because you can see the result. The prompt asks for a single HTML file with a canvas aquarium: at least 8 fish of 3 species with wagging tails, fish that turn at the glass and never sink into the sand, swaying seaweed, rising bubbles that pop at the surface, light rays, click-to-feed with fish that chase and eat the flakes, fish that flee from a fast mouse, a counter, 60 fps, and correct resizing.
Create a single self-contained HTML file (HTML + CSS + JavaScript in one file, no external libraries or assets) with an animated aquarium on a <canvas> that fills the browser window.
Requirements:
- At least 8 fish of 3 different species, drawn with canvas shapes (body, tail, fin, eye), each species with its own colors and size.
- Fish swim smoothly with natural motion: tails wag, they turn around at the glass instead of passing through it, and they never overlap the sand.
- Sandy bottom with a few rocks and 4-6 seaweed plants that sway gently.
- Bubbles rise from the bottom, wobble, and pop at the surface.
- Light rays slowly shimmering from the top.
- Click anywhere to drop fish food: flakes sink slowly, nearby fish swim to them and eat them (the flake disappears).
- Fish flee briefly if the mouse moves quickly near them.
- Show a small counter in a corner: number of fish and flakes eaten.
- Must run at 60 fps and resize correctly with the window.
Output only the complete HTML file.
The numbers:
| Model | Speed | Tokens generated | Time to finish |
|---|---|---|---|
| Gemma 4 26B A4B | 60 tok/s | 5,122 | about 1.5 min |
| Qwen3.8 27B | 12.6 tok/s | 40,523 | about 54 min |
| Qwen4-35B-A3B | 58.4 tok/s | 9,925 | about 3 min |
The token counts include any thinking. The HTML files themselves are only about 4,000 to 7,000 tokens each, so most of Qwen3.8's 40,523 tokens were reasoning, while Qwen4 (which didn't reason at all) spent most of its budget on the code. Qwen3.8 27B is also a dense model, so every one of its 27B parameters works on every token. Long thinking on a slow dense model is the combination that turns a coding prompt into an hour-long wait on a laptop.
Then I opened each file in a browser and clicked through every requirement.

Gemma 4 26B was the fastest and the weakest. It covered the checklist, but the fish are simple ovals, they swim into the sand at the bottom, and the bubbles never pop at the surface. They just reset to the bottom.
Qwen3.8 27B produced the most polished file. A wavy sand line with pebbles, multi-blade seaweed, food that falls as a little cloud of flakes, a hint that fades out, fish whose eyes widen when startled. Everything I clicked through worked, with zero console errors. But I waited almost an hour for it.
Qwen4-35B-A3B produced the best-looking fish: proper clownfish with white bands, blue tangs with yellow tails, guppies with fan tails. Feeding worked, fish stayed out of the sand and turned at the glass, 60 fps. One requirement failed: the fish never fled from the mouse.
The bug Qwen4 made, and how it fixed it
The browser console showed the reason as soon as the mouse moved:
Cannot set property y of #<MouseEvent> which has only a getter
The model had written this in the mouse handler:
mouse.lastT = now; mouse.lastX = mouse.x = e.clientX; mouse.lastY = e.y = e.clientY;
mouse.y = e.clientY;
e.y is a read-only property of the browser event. The file runs in strict mode, so assigning to it throws an error. The handler stops right there on every mouse move, mouse.y is never set, and the flee check measures distance to a mouse that is still at its starting position, thousands of pixels off screen. Everything else in the file works, which is exactly why this kind of bug is easy to miss.
I pasted the console error back into the same chat, said the fish don't flee from the mouse, and asked it to fix that. Qwen4 returned a corrected file:
mouse.lastT = now;
mouse.lastX = e.clientX;
mouse.lastY = e.clientY;
mouse.x = e.clientX;
mouse.y = e.clientY;
I checked it the same way: no console errors, and a quick mouse sweep sent the nearby fish darting away. One prompt to build, one to fix, under 5 minutes in total. Its comment describing the old line was slightly off, but the fix itself was right.
The lesson isn't specific to Qwen4: always open the browser console on generated front-end code. A fast local model plus a 10-second look at the console beats a slow model you wait an hour for.
Test 2: six short logic questions
Next I asked each model six short questions, each in a new chat. Two are traps: a river-crossing puzzle where the boat is big enough for everything (a model that pattern-matches the classic puzzle answers 7), and an apples question that invites a pointless subtraction. The rest check letter counting, a date riddle, reading a cron schedule, and a small elimination puzzle.
1. A farmer needs to take a wolf, a goat and a cabbage across a river. His boat is big enough to carry the farmer and all three of them at once. What is the minimum number of crossings he needs?
2. I have 3 apples. Yesterday I ate 2 apples. How many apples do I have now?
3. How many times does the letter "r" appear in the phrase "strawberry raspberry"?
4. If the day after tomorrow is two days before Sunday, what day is today?
5. A cron job is scheduled as "*/15 9-17 * * 1-5". How many times does it run in one week?
6. Anna, Ben and Carl each own exactly one pet: a cat, a dog or a fish. Anna does not own the dog. Ben owns neither the cat nor the dog. Who owns the cat?
| Question | Correct answer | Qwen4-35B-A3B | Qwen3.8 27B | Gemma 4 26B |
|---|---|---|---|---|
| 1. Big boat | 1 crossing | 1 | 1 | 1 |
| 2. Apples | 3 | 3 | 1 (wrong) | 3 |
| 3. Letter "r" | 6 | 6 | 6 | 6 |
| 4. Day riddle | Wednesday | Wednesday | Wednesday | Wednesday |
| 5. Cron runs | 180 | 180 | 180 | 180 |
| 6. Pets | Anna | Anna | Anna | Anna |
All three spotted the big-boat trap instead of reciting the classic 7-crossing solution. All three read the cron expression correctly (4 runs an hour, hours 9 through 17 inclusive is 9 hours, 5 weekdays). The difference was the apples.
Qwen3.8 27B answered "you have 1 apple left" and even added "No trick here, yesterday is irrelevant." That's the confident kind of wrong that's worse than a hedge. Qwen4 got it right, though its explanation wandered a bit before landing on 3. Gemma got it right with a clean one-line reason.
The answers weren't perfect even when correct. On the day riddle, Gemma's explanation said "if tomorrow is Friday", which is the wrong step, although it still wrote Wednesday. Small slips like that are why I read the reasoning, not only the final line.
Remember that Qwen4 did all of this without reasoning. Six for six with thinking off is a good sign for quick everyday questions.
Should you switch?
For me, on a 64 GB MacBook, Qwen4-35B-A3B replaces Qwen3.8 27B for the jobs where I'd otherwise wait. It's four to five times faster per token, it got there without long thinking, the aquarium quality was close, and it beat Qwen3.8 on the logic questions. If you run local models through an agent or in VS Code, that speed difference is the difference between using the model and giving up on it. I described how I use local models in VS Code and where they still fall short in local AI vs Claude.
Gemma 4 26B is still a good choice when you need the smallest memory footprint and short answers fast, but on this prompt it cut corners.
What I'd still keep in mind:
- It's one day old. In my LM Studio setup the reasoning effort setting had no visible effect: no thinking block appeared. That's typical for a brand-new architecture, where runtimes and chat templates catch up over the first weeks. Update LM Studio and check that a thinking block shows up before you compare reasoning results.
- Once reasoning works,
highis the default. For quick edits,loworoffwill be faster. For bigger agent tasks, Qwen notes that lower effort can mean more retries. - Check what it writes. My test had one real bug that would have shipped if I hadn't opened the console.
If you serve models to other machines on your network, the same setup from my Mac Studio model server guide works with Qwen4: load it in LM Studio and point your clients at it.
FAQ
How much RAM do I need for Qwen4-35B-A3B? LM Studio lists 22 GB of system RAM as the minimum for the 21.5 GB 4-bit file. A 24 GB Mac can load the 4-bit file, but 32 GB or more leaves room for your other apps and a longer context.
Is Qwen4-35B-A3B faster than Qwen3.8 27B? On my MacBook Pro M5 it generated 58.4 tokens per second against 12.6 for Qwen3.8 27B. Qwen4 activates only about 3B parameters per token, while the 27B dense model uses all of them.
Can I turn off thinking? Yes. Set reasoning_effort to "off" (or enable_thinking=False) in the chat template arguments. The other levels are low, high (default) and xhigh.
Does it support images? Yes. The model accepts images and video as input and answers in text. Video support depends on the runtime you use.
Can I use it for commercial work? The weights are released under Apache 2.0, which allows commercial use.