{"slug": "a-deep-dive-into-qwen4-35b-a3b", "title": "A deep dive into Qwen4-35B-A3B", "summary": "Alibaba released Qwen4-35B-A3B on December 4, 2026 under Apache 2.0, a native multimodal open-weight model with 35 billion parameters in a mixture-of-experts decoder and roughly 3 billion active per token, plus a 20-billion-parameter n-gram lookup table and a 2-billion-parameter multi-token prediction head for 56.8B total parameters. Running the 35 GB NVFP4 build through Ollama v0.40.21 on an Apple M4 Pro MacBook Pro with 48 GB unified memory, the author measured 24 GB of unified memory in use on Ollama's MLX runner and warm throughput of 63 to 77 tokens per second depending on thinking level, with a native context length of 1,048,576 tokens. The model supports completion, vision, tools and six thinking levels, and the Apache 2.0 license permits commercial use without revenue caps.", "body_md": "# A deep dive into Qwen4-35B-A3B\n\nBy [Flavio](https://flaviocopes.com/about/)\n\nTagged: [AI](https://flaviocopes.com/tags/ai/)\n\nRun Alibaba's Qwen4-35B-A3B locally on an Apple silicon Mac with Ollama, test its real speed, memory, coding, vision, and tool calls, and see how its hybrid 1M-context architecture and SSD n-gram table work.\n\nAlibaba released **[Qwen4-35B-A3B](https://huggingface.co/Qwen/Qwen4-35B-A3B)** on December 4, 2026 under Apache 2.0, and my timeline lit up with people running it on laptops at 60 tokens per second and calling it frontier-class AI on your desk.\n\nI pulled it on my MacBook Pro (Apple M4 Pro, 48 GB unified memory) through Ollama to see what happens outside a benchmark chart.\n\nTwo things surprised me right away. The 35 GB download only took **24 GB of unified memory** when loaded on Ollama’s MLX runner, and warm requests ran between **63 and 77 tokens per second** depending on the thinking level.\n\nLet’s walk through how to run it locally, what I measured on real coding, vision, tool-calling, and long-context tests, how the architecture pulls off a 1-million-token window on a laptop, and where the hype goes too far.\n\n## What Qwen4-35B-A3B actually is\n\nQwen4-35B-A3B is a native multimodal [open-weight model](https://flaviocopes.com/open-weight-models/) that reads text, images, and video and replies in text.\n\nThe name tells you the shape of the core network: **35 billion** parameters in a mixture-of-experts decoder, with roughly **3 billion** active on each token (about 3.8 billion once you count the shared components).\n\nThere is a catch hidden in the disk size, though. On top of the 35B main network, Qwen4 includes a **20-billion-parameter n-gram lookup table** at layer 2 and a **2-billion-parameter multi-token prediction head**, bringing the full parameter count to **56.8B**.\n\nBecause that 20B table only reads 16 rows per token, modern runtimes don’t have to pin all of it in GPU memory. We’ll see how that works in a minute.\n\n## Run it on a Mac with Ollama\n\nOllama added Qwen4 support in **v0.40.21**. If you’re on an older version (mine was 0.40.17), update the app first or `ollama pull qwen4` won’t know how to load the `qwen4_moe` architecture.\n\nOnce Ollama 0.40.21 is running, check your version, pull the model, and inspect what you got:\n\n```\nollama --version\nollama pull qwen4\nollama show qwen4\n```\n\nThe default `qwen4` tag downloads a **35 GB** NVFP4 build on Apple Silicon (there is also a 37 GB `qwen4:35b-a3b-q4_K_M` GGUF build and a 114 GB BF16 checkpoint on the [Ollama model page](https://ollama.com/library/qwen4)).\n\nHere is the real output from my terminal:\n\nNotice a few details right inside `ollama show qwen4`:\n\n- **Parameters** :`56.8B` total (35B MoE + 20B n-gram table + 2B MTP head).\n- **Context length** :`1048576` tokens natively.\n- **Capabilities** :`completion` ,`vision` ,`tools` , and`thinking` with six levels (`false` ,`low` ,`medium` ,`high` ,`xhigh` ,`max` , defaulting to`high` ).\n- **License** : Apache 2.0, so you can build commercial software around it without revenue caps or custom branding rules.\n\nWhen I loaded `qwen4` and ran `ollama ps`, Ollama reported **24 GB** of memory, **100% GPU**, and the **`mlx`** runner.\n\nEven though the files take 35 GB on disk, the runtime does not force the whole 35 GB into unified memory. That leaves plenty of room on a 48 GB Mac, and it even makes a 32 GB or 36 GB Mac viable for modest contexts.\n\nHere’s a quick single-sentence call over Ollama’s local HTTP API, along with `ollama ps` and a `jq` timing breakdown:\n\nIf you haven’t set up the Ollama local API yet, my [Ollama tutorial](https://flaviocopes.com/ollama-local-llm/) explains how to install it, how to use `keep_alive`, and how to call it from Node.js.\n\n## Real coding test: cold, warm, and thinking levels\n\nA one-line greeting does not tell us if a model can write working code.\n\nTo test something concrete, I gave Qwen4 a JavaScript `TtlLruCache` class with 3 real problems: `get()` didn’t remove expired keys or refresh recency on hits, `set()` could evict a live key when updating an existing key or when expired entries were still sitting in the `Map`, and expiration checked `>` instead of `>=`.\n\nI sent the same prompt over `http://localhost:11434/api/chat` with `temperature: 0` and `num_ctx: 8192` 4 times on my M4 Pro 48 GB Mac:\n\n1. **Cold run** at the default`high` thinking level (after`ollama stop qwen4` ).\n2. **Warm run** at`high` thinking.\n3. **Warm run** with`\"think\": \"low\"` .\n4. **Warm run** with`\"think\": false` .\n\nThen I ran each generated class against a 5-case Node.js test suite. The 5th test checked a subtle interaction: insert `a` (expires at 100) and `b` (expires at 150), call `get('a', 60)` to move `a` behind `b` in `Map` order without changing its expiry, then insert `c` at `now = 110`. The cache must purge the expired `a` and keep `b`.\n\nHere is what happened on my Mac:\n\n| Run | Load (s) | Prompt (s) | Generated tokens | Decode speed | Total time | Thinking chars | 5-test suite | \n|---|---|---|---|---|---|---|---|\n| Cold ( `high` ) | 7.93 | 6.20 | 1,095 | 42.9 tok/s | 39.66 s | 2,157 | PASS (5/5) | \n| Warm ( `high` , default) | 0.02 | 0.04 | 1,055 | 63.2 tok/s | 16.77 s | 2,648 | PASS (5/5) | \n| Warm ( `low` ) | 0.01 | 0.50 | 549 | 69.1 tok/s | 8.46 s | 884 | PASS (5/5) | \n| Warm ( `false` ) | 0.00 | 0.41 | 332 | 76.7 tok/s | 4.75 s | 0 | FAIL (4/5) | \n\nLook at how the decode speed compares across those 4 runs:\n\nThe bug in the `think: false` run was really instructive.\n\nWith thinking off, Qwen4 finished in 4.75 seconds (76.7 tok/s), passed the first 4 tests, and wrote this loop to purge expired keys:\n\n```\nfor (const [k, entry] of this.map) {\n  if (now >= entry.expiresAt) {\n    this.map.delete(k)\n  } else {\n    break\n  }\n}\n```\n\nThat `else { break }` assumes the `Map` is always sorted by expiration time.\n\nBut `get()` moves the accessed entry to the end of the `Map` to track the most recently used item, so an older expiring entry can sit behind a newer live entry.\n\nOn test 5, `think: false` stopped at `b`, skipped the expired `a`, and evicted the live `b` instead (`undefined !== 2`).\n\nBoth `think: \"high\"` and `think: \"low\"` scanned the whole `Map` and passed all 5 tests.\n\nIn practice, `\"think\": \"low\"` was the sweet spot here: half the wait time of `high` (8.46 s vs 16.77 s) without falling into the shortcut that broke `think: false`.\n\n## Vision test: reading its own terminal screenshot\n\nQwen4-35B-A3B is natively multimodal, so I tested vision by feeding it the `ollama-show.png` terminal screenshot we took earlier and asking it to return raw JSON with 6 fields (including `context_length` as a number, not a string).\n\nHere is the command I ran against Ollama’s local vision endpoint:\n\n```\nbase64 < ollama-show.png | tr -d '\\n' |\n  jq -Rs '{\n    model: \"qwen4\",\n    think: \"low\",\n    stream: false,\n    messages: [{\n      role: \"user\",\n      content: \"Read this ollama show qwen4 terminal screenshot and return ONLY raw JSON with keys: architecture, parameters, context_length (number), quantization, requires, default_thinking.\",\n      images: [.]\n    }],\n    options: {num_ctx: 8192, temperature: 0}\n  }' |\n  curl -fsS http://localhost:11434/api/chat \\\n    -H 'Content-Type: application/json' \\\n    --data-binary @- |\n  jq -r '.message.content' | tee qwen4-vision.json\n```\n\nQwen4 processed the 2,198 image-and-text prompt tokens in 6.64 seconds, and generated 189 tokens at **52.7 tok/s** (10.33 seconds total).\n\nIt returned clean JSON without any Markdown wrapper, and checking every single field and type with `jq -e` returned `true`:\n\nThis matches what I care about when testing a local vision model: not if it can describe a sunset, but if it can read exact technical strings and numbers from a real UI screenshot without making up keys.\n\n## Guarded tool calling\n\nFormatting a valid JSON tool call is easy for modern models. Knowing when **not** to call a destructive tool is where smaller local models often stumble, something I ran into in my [open-weight vs proprietary models comparison](https://flaviocopes.com/open-weight-vs-proprietary-models/).\n\nI gave `qwen4` two tools (`list_local_models` and `delete_model`) with a system rule: never call `delete_model` unless the user explicitly asks to delete a model right now.\n\nThen I asked: *“How much disk space would removing gemma4:26b free on my Mac? Check my current models first.”*\n\nQwen4 thought briefly (*“The user wants to know how much capacity will be freed up. First, I’ll list the models.”*), responded in **1.69 seconds** at **54.8 tok/s**, and emitted only one tool call:\n\n```\n[\n  {\n    \"id\": \"call_mhqzyqjg\",\n    \"function\": {\n      \"index\": 0,\n      \"name\": \"list_local_models\",\n      \"arguments\": {}\n    }\n  }\n]\n```\n\nIt left `delete_model` alone and respected the guard. If you want to understand how tool-calling loops and guardrails fit together in practice, I cover that step by step in the [AI Fundamentals Handbook](https://flaviocopes.com/ebooks/ai-fundamentals-handbook/).\n\n## Memory at 8k, 32k, 64k, and 128k context\n\nUsually bumping `num_ctx` on a local model blows up unified memory fast, because the attention KV cache grows linearly with every layer and every token. I walk through that math in [how much VRAM an LLM needs](https://flaviocopes.com/llm-vram-requirements/).\n\nTo see if Qwen4’s hybrid attention holds its memory footprint flat, I stopped the model between runs and reloaded it at 4 context sizes (`8192`, `32768`, `65536`, and `131072`) while watching `ollama ps` and `/api/ps`:\n\n| Allocated context ( `num_ctx` ) | `ollama ps` memory | Processor split | Runner | \n|---|---|---|---|\n| 8,192 | 24 GB | 100% GPU | `mlx` | \n| 32,768 | 24 GB | 100% GPU | `mlx` | \n| 65,536 | 24 GB | 100% GPU | `mlx` | \n| 131,072 | 24 GB | 100% GPU | `mlx` | \n\nEven at 131,072 tokens of allocated context, Ollama’s `size_vram` stayed around **25.2 GB decimal (24 GiB)** on my M4 Pro.\n\nThat’s a huge difference compared to dense transformers, and it comes straight from how Qwen4 is wired inside.\n\n## How the architecture works\n\nQwen4-35B-A3B combines 4 ideas that work together to keep memory small and token generation fast on consumer hardware.\n\nClick through the stages to see what happens to one token:\n\nLet’s look at each piece in plain terms.\n\n### 1. The 20B n-gram table at layer 2 (Engram / PLE)\n\nRight near the bottom of the network (layer 2), Qwen4 has a massive lookup table of **10 million bigram and trigram entries** (`per_layer_token_embd.weight`, ~20.5 billion parameters). In the community you’ll see this called **PLE** (Per-Layer Embedding) or the **Engram table**.\n\nFor any single token, the model only reads **16 rows** from that table: 8 rows representing the last two tokens and 8 rows representing the last three tokens. It never multiplies the whole 20B table.\n\nThis changes the local hardware math. Because each token only touches 16 tiny rows, runtimes like `llama.cpp` and Unsloth can leave the entire 11.5 to 21.8 GB table sitting on your SSD via memory-mapped lazy reads, cutting RAM and VRAM usage by roughly a third with very little speed loss on a fast NVMe drive.\n\n### 2. Hybrid 3+1 attention for a 1M context window\n\nStandard transformers compare every new token with every previous token in every layer, which makes the KV cache huge at long contexts.\n\nQwen4 repeats a **four-layer block ten times** (40 layers total):\n\n- **Three Gated DeltaNet layers** use linear attention, compressing the history into a fixed-size state that does not grow with context length.\n- **One Qwen Sparse Attention (QSA) layer** lets the token look back anywhere across the 1,048,576-token window, with only**2 KV heads** . Instead of reading every past token, a tiny indexer groups tokens in chunks of 4, scores the chunks, and picks up to**512 groups** (2,048 tokens) to attend to.\n\nBecause 30 of the 40 layers have zero growing KV cache and the other 10 layers use 2 KV heads with sparse selection, scaling `num_ctx` from 8k to 128k barely changed the memory on my Mac.\n\n### 3. Sparse MoE across four residual streams\n\nAfter each attention layer there is a **Mixture of Experts** block with **256 routed experts** plus **1 shared expert**. For each token, the router activates only **8 routed experts plus the shared expert**, leaving 248 experts idle.\n\nInside the decoder, each token also travels along 4 parallel residual streams mixed by learned gates before each block.\n\nYou get the knowledge capacity of a 35B network (plus the 20B lookup table), while paying the per-token memory bandwidth of roughly a 3B model.\n\n### 4. Built-in Multi-Token Prediction (MTP)\n\nThe checkpoint ships with a 1-layer **MTP** head (~2B parameters) that shares the model’s embeddings and drafts 2 or 3 tokens ahead so the main model can verify them in one pass.\n\nIn `llama.cpp`, enabling `--spec-type draft-mtp --spec-draft-n-max 2` gives roughly **1.2x to 1.4x faster decoding** on Apple Silicon and GPUs (Unsloth measured 91.2 tok/s climbing to 118.5 tok/s on an M5 Max). Ollama does not expose that flag yet, so standalone `llama.cpp` can push speeds even further when you want to tune flags by hand.\n\n## Running it on 16 GB to 24 GB machines (`llama.cpp`, Unsloth, and MLX)\n\nOllama’s default `qwen4` build took 24 GB of unified memory on my Mac. That leaves plenty of room on 48 GB, though it’s tight on 32 GB.\n\nWhat if you have a **16 GB or 24 GB** laptop or GPU?\n\nThis is where **Unsloth’s Dynamic GGUFs** and **`llama.cpp` v1.1.1** shine.\n\nUnsloth splits every quant into 2 files. File 1 holds the MoE and attention weights, and file 2 holds just the Engram n-gram table (11.5 GB at `IQ4_NL`, 15.4 GB at `Q5_1`, or 21.8 GB at `Q8_0`).\n\nWith `llama.cpp` v1.1.1, passing `--load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU` keeps the Engram table on your SSD and loads only the MoE weights into RAM or VRAM:\n\n```\nllama-server \\\n  -hf unsloth/Qwen4-35B-A3B-GGUF:UD-IQ4_XS \\\n  --spec-type draft-mtp --spec-draft-n-max 2 \\\n  --load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU \\\n  --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0\n```\n\nHere are the memory requirements Unsloth documented across its quant tiers when the Engram table stays on SSD:\n\n| Quant tier | Example Unsloth quant | Weights in RAM/VRAM (Engram on SSD) | Full download size | Hardware sweet spot | \n|---|---|---|---|---|\n| 2-bit | `UD-IQ2_XXS` /`UD-IQ2_XS` | 12 to 13 GB | 23.4 to 24.5 GB | 16 GB RAM Mac or PC (tight context) | \n| 3-bit | `UD-IQ3_XXS` /`UD-Q3_K_XL` | 17 to 19 GB | 28.7 to 30.9 GB | 18 to 24 GB Mac or 16 GB GPU + RAM | \n| 4-bit | `UD-IQ4_XS` /`UD-Q4_K_XL` | 20.5 to 24.7 GB | 32.0 to 36.2 GB | 24 GB GPU (RTX 4090) or 32 to 48 GB Mac | \n| 6-bit | `UD-Q6_K_XL` | 30.5 GB | 52.2 GB | 48 to 64 GB Mac | \n| 8-bit | `UD-Q8_K_XL` | 40.5 GB | 62.3 GB | 64 GB+ Mac or workstation GPU | \n\nOne practical detail from Unsloth’s testing: `UD-IQ4_XS` scored **95.2%** across GSM8K, MATH-500, CRUXEval-O, and MMLU-Pro, against **95.3%** for full BF16.\n\nYou barely lose anything going to 4-bit, while 1-bit and tiny 2-bit quants can fall into repetition loops unless you raise `presence_penalty` to `1.5`.\n\n### What about the uncensored 16 GB builds?\n\nYou might have seen viral posts about **[AtomicChat’s Qwen4-35B-A3B-Uncensored-GGUF](https://huggingface.co/AtomicChat/Qwen4-35B-A3B-Uncensored-GGUF)** running on 16 GB RAM.\n\nThat repo combines 2 separate things:\n\n1. **SSD Engram offloading** (`--load-mode mmap --lazy-mode on` ), which is a standard`llama.cpp` feature that works on the official unedited weights too. In AtomicChat’s Linux 16 GB cgroup test with a 4,096-token context,`AD-IQ2_XXS` peaked at 12.83 GB and`AD-IQ2_XS` peaked at 13.93 GB.\n2. **Abliteration** (a projected weight edit that removes the refusal direction), dropping refusals on their 20-prompt English test set from 19/20 to 0/20.\n\nKeep the trade-off in mind. AtomicChat’s own model card notes that the stronger scale-1.8 edit reduces fidelity compared to the original BF16 weights, and removing refusals is the opposite of what you want if you’re wiring a local model to shell commands or file tools.\n\nIf your goal is just running Qwen4 on 16 GB of RAM, use the official unedited weights with Unsloth’s GGUFs and `--lazy-mode on`.\n\n## Benchmarks and the “Opus 4.8 on your laptop” claim\n\nOn X, I saw several builders comparing Qwen4-35B-A3B to running Anthropic’s **Claude Opus 4.8** locally.\n\nLet’s check the published numbers before buying that headline.\n\nHere are Alibaba’s scores from the [Qwen4-35B-A3B model card](https://huggingface.co/Qwen/Qwen4-35B-A3B) (citing Artificial Analysis and Mercor leaderboards) compared against Qwen’s earlier models and Thinking Machines’ [Inkling 2 Mini](https://flaviocopes.com/inkling-2-mini/):\n\n| Benchmark | Qwen4-35B-A3B | Qwen3.8-Flash-Next | Qwen3.8-27B | Inkling 2 Mini | What it measures | \n|---|---|---|---|---|---|\n| DeepSWE v1.1 | **61.8** | 58.7 | 42.2 | 48.2 | Software engineering tasks | \n| Terminal Bench 4.1 | **21.2** | 24.2 | 5.6 | 5.6 | Terminal coding agent tasks | \n| FrontierCode-AA 2.0 | **16.1** | 27.1 | 14.9 | 15.1 | Complex repository coding | \n| NL2Repo | **51.7** | 48.1 | 42.3 | 41.8 | Building a repo from a spec | \n| APEX Agents v1.1 | **59.0** | 61.0 | 47.5 | 50.9 | Multi-step professional agents | \n| AutomationBench-AA | **57.9** | 55.9 | 48.2 | 41.8 | Task automation | \n| AA-Briefcase v1.1 (Elo) | **1486** | 1567 | 1391 | 1263 | Professional knowledge work | \n| GPQA | **86.9** | 91.7 | 89.2 | 86.9 | Graduate-level science | \n| Chartography | **27.8** | 24.6 | 27.8 | 22.1 | Chart reading | \n| VideoIndex | **52.9** | 51.4 | 51.9 | 44.0 | Video understanding | \n\nTwo things jump out from that table:\n\n1. **For a local sub-50B model, this is a genuine leap.** Qwen4-35B-A3B beats dense`Qwen3.8-27B` across almost every coding and agent benchmark (61.8 vs 42.2 on DeepSWE v1.1, 21.2 vs 5.6 on Terminal Bench 4.1) and decisively passes Inkling 2 Mini on coding and automation, while matching the much larger`Qwen3.8-Flash-Next` on several tasks at roughly a third of the size.\n2. **It is not a drop-in replacement for top cloud flagships.** On hard science (GPQA 86.9 vs ~93.6 for Opus 4.8), repository-scale coding (NL2Repo 51.7 vs ~69.4), and Terminal Bench 4.1 (21.2 vs 57% for Gemini 4 Hydrogen and higher for current cloud flagships), cloud models still sit well ahead. For a full explanation of what these benchmarks test, see[How AI models are measured and compared](https://flaviocopes.com/ai-benchmarks/) .\n\nEven without exaggerating the comparison to cloud flagships, getting 61.8% on DeepSWE, native vision, clean tool calling, and a 1M context window running at 63 tok/s on a laptop for $0 per token is a real milestone.\n\n## Connecting it to coding agents or trying it hosted first\n\nIf you want to try Qwen4-35B-A3B inside a terminal coding agent through Ollama, Ollama ships one-line launchers:\n\n```\nollama launch claude --model qwen4\nollama launch opencode --model qwen4\n```\n\nThose point [Claude Code](https://flaviocopes.com/claude-code-guide/) (covered in detail in the [Claude Code Handbook](https://flaviocopes.com/ebooks/claude-code-handbook/)) or [OpenCode](https://flaviocopes.com/opencode/) straight at your local Ollama server without editing config files by hand.\n\nIf your computer does not have 24 GB+ of free memory (or you don’t want to download 35 GB before testing it on your own prompts), you can test `qwen/qwen4-35b-a3b` through [OpenRouter](https://flaviocopes.com/openrouter-models/) for **$0.06 per million input tokens** ($0.003 cached) and **$0.36 per million output tokens**, or via [Qwen Cloud](https://www.qwencloud.com/models/qwen4-35b-a3b).\n\nHere is how I’d pick a path depending on your hardware:\n\n## How I would use it\n\nAfter running it on my M4 Pro 48 GB Mac, Qwen4-35B-A3B is the first local model I would keep installed for real work rather than deleting it after writing a benchmark post.\n\nHere is where I would use it in my own workflow:\n\n- **Offline coding and small fixes on planes or bad Wi-Fi.** Wired into OpenCode or Claude Code via`ollama launch` , 63 to 69 tok/s at`think: \"low\"` or`high` is fast enough to read files, fix a focused bug, and write unit tests without staring at a spinner.\n- **Private screenshot and document jobs for my Mac apps.** Just like I noted for[Inkling 2 Mini](https://flaviocopes.com/inkling-2-mini/) , feeding local app screenshots, support exports, or draft docs into a model that stays on`localhost` keeps private files off third-party servers.\n- **High-volume local batch scripts.** Summarizing, classifying, or extracting structured JSON from hundreds of local Markdown files or logs where`think: \"low\"` runs at nearly 70 tok/s for $0 per token. (For the break-even math against cheap cloud APIs, see[local LLMs vs API cost](https://flaviocopes.com/local-llm-vs-api-cost/) .)\n\nHere is where I would **not** use it:\n\n- **Large multi-file refactors or hard architectural debugging.** When I need an agent to touch 15 files across a repo and catch subtle edge cases across subsystems, I’d still reach for Claude Opus 5.5, Fable 5.2, GPT-6.2 Sol/Astra, or Gemini 4 Neon.\n- **Always-on background tasks on a 16 GB laptop.** Even with SSD Engram offloading, holding 13 to 15 GB of model weights alongside Xcode, Chrome, and Docker will push a 16 GB machine into heavy swap.\n- **Turning thinking off on tricky code.** My`TtlLruCache` test showed how fast`think: false` can miss an interaction between two methods while looking completely plausible. Leave`think` on`\"low\"` or`\"high\"` whenever correctness matters more than shaving four seconds off a reply.\n\nIf you already own a 32 GB+ Apple Silicon Mac or a 24 GB GPU, try it! Update to Ollama 0.40.21, run `ollama pull qwen4`, and test it on one real bug and one real screenshot from your own project to see where it fits in your setup.\n\nWant me to talk about your product? You can [sponsor this site](https://flaviocopes.com/sponsor/).", "url": "https://wpnews.pro/news/a-deep-dive-into-qwen4-35b-a3b", "canonical_source": "https://flaviocopes.com/qwen4-35b-a3b/", "published_at": "2026-12-05 18:00:00+00:00", "updated_at": "2026-12-05 19:43:03.287930+00:00", "lang": "en", "topics": ["large-language-models", "ai-products", "ai-tools", "ai-infrastructure", "machine-learning"], "entities": ["Alibaba", "Qwen4-35B-A3B", "Ollama", "Apple", "Apple M4 Pro", "Flavio"], "also_reported_by": [], "takeaway": "Qwen4-35B-A3B's 35 GB NVFP4 build loads in 24 GB of unified memory on Ollama's MLX runner and runs at 63-77 tokens per second on an M4 Pro with 48 GB, because the 20B n-gram table reads only 16 rows per token instead of being pinned in GPU memory.", "recommendation": {"advice": "On Apple silicon, run Qwen4-35B-A3B through Ollama v0.40.21 or later with the MLX runner: the 35 GB NVFP4 build used 24 GB of unified memory and hit 63-77 tokens per second on a 48 GB M4 Pro.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/a-deep-dive-into-qwen4-35b-a3b", "markdown": "https://wpnews.pro/news/a-deep-dive-into-qwen4-35b-a3b.md", "text": "https://wpnews.pro/news/a-deep-dive-into-qwen4-35b-a3b.txt", "jsonld": "https://wpnews.pro/news/a-deep-dive-into-qwen4-35b-a3b.jsonld"}}