Alibaba has just released Qwen4-35B-A3B, and we have gone through its architecture, the published benchmarks and the inference options. The model has about 35 billion parameters in its main network but uses around 3 billion per token. On top of that it adds an N-gram memory of about 20 billion parameters and an auxiliary multi-token prediction (MTP) component.
It is multimodal (text, images and video), offers 1,048,576 tokens of native context and is released under the Apache 2.0 license. The weights are on Hugging Face.
What is new is not only the benchmarks. Alibaba has changed how the model keeps information, how it retrieves pieces of a long context and how representations flow between layers. We can also start looking at deployment: there is already an NVFP4 quantization and documentation for engines such as SGLang and vLLM.
A 35B MoE that activates about 3B per token
The name 35B-A3B sums up how its Mixture-of-Experts (MoE) architecture works. The model stores many experts but does not run all of them for every token. In each layer, a router picks 8 of 256 experts, plus a shared one that always takes part. That way it can draw on a large network without doing all of its operations at every step.
Three figures need to be kept apart: 35B is roughly the parameter count of the main network; A3B is the parameters activated per token, in Alibaba's naming; and the N-gram memory adds about 20.5B parameters that are looked up like a table, not computed like a dense layer. The official card also lists around 2B in the MTP component. That is why the full set of weights is well above those 35B.
The model has 40 layers, a hidden size of 2,048 and this pattern, repeated ten times:
Gated DeltaNet → MoE → Gated DeltaNet → MoE → Gated DeltaNet → MoE → Qwen Sparse Attention → MoE.
Put another way: 30 layers use Gated DeltaNet and ten use Qwen Sparse Attention. Four residual streams run through the network. The N-gram memory comes in on top of that, and only at the second layer of the model.
How Qwen4-35B-A3B works
| Component | What it does |
|---|---|
| Gated DeltaNet 30 layers, 3 in every 4 | Keeps a fixed-size recurrent state: its memory does not grow with every token like a conventional KV cache. |
| QSA (Qwen Sparse Attention) 10 layers, 1 in every 4 | An indexer picks 512 blocks or 2,048 tokens for each attention operation. That is not the context limit, which is 1,048,576 tokens. |
| MoE All 40 layers | 256 routed experts: the router picks 8 per token, and 1 shared expert always runs. |
| Gated Residual Between all layers | Four activation streams connected by read and write gates. They are neither experts nor KV caches. |
| N-gram memory Layer 2 only | A table of ~20.5B parameters. Alibaba describes it as more amenable to offloading than the experts. |
| MTP Beside the output, not one of the 40 | An auxiliary layer that proposes extra tokens. |
In one sentence: MoE cuts the operations of the expert layers; Gated DeltaNet and QSA change the cost of handling context; N-gram adds capacity through memory lookups. They are different mechanisms.
Gated DeltaNet and Qwen Sparse Attention: two ways of using context
In a conventional attention layer, tokens can look directly at earlier positions. That flexibility is useful, but it gets expensive as the context grows. During prefill, full attention costs grow quadratically with sequence length; during generation, the key-value cache (KV cache) grows with every token processed.
Qwen4-35B-A3B combines two mechanisms to bring that cost down.
Gated DeltaNet: keeping history in a recurrent state
Gated DeltaNet (GDN) keeps a state that is updated with every token. The size of that state is set by the architecture and does not have to grow with the length of the conversation, as a conventional KV cache does. It is an efficient way to process long sequences.
It has a limitation: squeezing a lot of information into a fixed-size state can make it harder to recover an exact detail from thousands of tokens back. For example, the definition of a function that appeared at the start of an agent's session.
Qwen Sparse Attention: looking up specific blocks
Qwen Sparse Attention (QSA) covers part of that need. Instead of computing attention over every earlier position, it uses an indexer that finds the most relevant pieces of the history and computes attention over those.
In Qwen4-35B-A3B, the published configuration sets a budget of 512 blocks or 2,048 tokens for the attention operation. The indexer works on compressed representations so that searching for those blocks does not eat up the savings.
This does not mean the model only takes 2,048 tokens of context. Its native context is still over a million. The 2,048 is the budget of positions selected for one sparse attention operation.
The combination repeats across the 40 layers: three GDN, one QSA. The first ones process the history through recurrent states and the second one retrieves specific positions when it needs them.
For coding agents, or assistants that work over long documents, this combination is promising. The test that matters will be measuring whether the model reliably finds information buried in long contexts, not just checking that it accepts a million tokens.
Gated Residual: four streams instead of one
In a conventional Transformer, layers add their results to a single shared residual stream. Gated Residual widens that path to four parallel streams. Each layer can read a combination of them and spread its updates through gates that control how much it writes to each stream.
A simple way to see it: the network does not have to keep mixing everything into one representation. It can keep different kinds of signal apart and combine them across many layers.
The official configuration confirms four branches and projections with a bottleneck rank of 256. In the Qwen3.8-Flash-Next card, Alibaba presents it as a way to gain expressiveness between layers while keeping training stable and adding little inference cost.
These four streams are not four MoE experts or four KV caches. They are different states and operations. We also do not know yet how much of the 35B's quality comes from Gated Residual on its own: there are no specific ablation experiments.
N-gram Embedding: 20.5B parameters that work as memory
The model adds an embedding table with 10 million entries of dimension 2,048, which comes to about 20.48 billion parameters. It is looked up from local combinations of tokens, such as bigrams and trigrams, and its results come in at the second layer.
The difference from a dense layer matters. A table lookup retrieves a few entries without multiplying all of its parameters for every token. That adds capacity with relatively few arithmetic operations, although storage and memory transfers still cost resources.
The table is about 41 GB in BF16 or 20.5 GB in FP8 for the values alone, before any metadata. Alibaba describes it as more amenable to offloading than the MoE experts, so it can be kept in host RAM with the needed entries brought in. That eases the pressure on VRAM, but it means bandwidth and prefetch matter too.
It is one of the reasons why "35B-A3B" alone does not tell you how much memory you need to run it.
MTP and reasoning effort
Qwen4-35B-A3B includes an auxiliary Multi-Token Prediction (MTP) layer. A compatible engine can use it to propose tokens ahead and verify them with the main model. If it accepts several tokens per iteration, generation can speed up; the gain depends on the acceptance rate and the cost of verification.
It also has configurable reasoning levels: off, low, high and xhigh. To compare models or estimate costs, the level used has to be stated: two runs at different efforts can use very different numbers of tokens.
Benchmarks: where it wins and where it is still behind
Alibaba has published results against Qwen3.8-Flash-Next, Qwen3.8-27B and Inkling2 Mini. The comparison shows gains in some coding and automation tasks, but not an overall win over the larger Flash-Next model.
| Benchmark | Qwen4-35B-A3B | Qwen3.8-Flash-Next | Qwen3.8-27B |
|---|---|---|---|
| DeepSWE v1.1 | 61.8 | 58.7 | 42.2 |
| NL2Repo | 51.7 | 48.1 | 42.3 |
| Terminal-Bench 4.1 | 21.2 | 24.2 | 5.6 |
| FrontierCode-AA 2.0 | 16.1 | 27.1 | 14.9 |
Source: Alibaba's launch comparison, published as an image in the model card.
The 35B beats Flash-Next on DeepSWE and NL2Repo, but loses on Terminal-Bench and, by a wide margin, on FrontierCode. That difference matters: a smaller model can be competitive at certain jobs without replacing the larger one everywhere.
Artificial Analysis gives it 25 points on its Intelligence Index v5.0.2. When we checked on 4 December 2026 it also showed about 218 tokens/s of output speed and $0.55 per task on the index. Those are measurements of Alibaba's API, the only provider it lists, and they can change with the provider and over time. They should not be read as local NVFP4 speed.
How much memory it takes in NVFP4
Now we do have a specific checkpoint to look at the quantization. RadixArk has published an NVFP4 build that uses NVFP4 W4A4 for the routed experts, FP8 for the N-gram table and keeps the other sensitive components at their original precision.
Published checkpoint size
That is about 59% less storage. It is a checkpoint figure, not the VRAM a running instance uses.
Memory also has to be set aside for caches, recurrent states, activations and buffers. On top of that, part of the weights, above all the N-gram table, can live in system RAM. That opens the door to deployments on a smaller GPU, but it can add transfer costs and limit performance. We cannot promise a given context size or concurrency without measuring them.
A technical note: RadixArk's NVFP4 checkpoint does not quantize the KV cache. If a runtime offers an NVFP4 KV cache, that is an extra optimization to configure and evaluate separately.
RadixArk published tests where the NVFP4 build scored 197/200 on a GSM8K subset against 198/200 for BF16, and 53/60 on AIME 2025 for both. The samples are small; they work as a first check, not as proof that all of the quality is kept.
Qwen4-35B-A3B vs Qwen3.6-35B-A3B
The most useful comparison for anyone already serving the previous 35B is Qwen3.6-35B-A3B. Both use 40 layers, 256 routed experts with eight selected plus one shared, and an MoE backbone of similar size. What changes is the rest of the architecture.
| Feature | Qwen3.6-35B-A3B | Qwen4-35B-A3B |
|---|---|---|
| MoE backbone | ~35B | ~35B |
| Active per token | ~3B stated | ~3B stated |
| Layers | 40 | 40 |
| Attention | 3 GDN + 1 Gated Attention | 3 GDN + 1 QSA |
| Gated Residual | Not documented | 4 streams |
| N-gram memory | Not documented | ~20.5B extra |
| Native context | 262,144 | 1,048,576 |
| License | Apache 2.0 | Apache 2.0 |
The native context is four times larger, although Qwen3.6 could be extended to 1,010,000 tokens with YaRN. In exchange, Qwen4 adds an N-gram memory that has to be stored and looked up. That is why we should not assume the new model is cheaper to serve just because both say A3B.
The comparison still to be done is a practical one: same GPU, same quantization level, same workload, and measurements of speed, memory, concurrency and cost per task. The benefit of the architectural changes has to be separated from what new kernels or speculative decoding bring.
The new all-round Qwen
- The same size as Qwen3.6, four times the context. Both are around 35B parameters with about 3B active. The difference is the native million tokens and the mix of GDN and QSA that makes it manageable.
- The N-gram memory decides how it is deployed. It is 20.5B parameters that are looked up, not computed. Where they live shapes the hardware and the latency.
- It does not win everywhere. On repository-level coding (DeepSWE, NL2Repo) it is ahead of Qwen3.8-Flash-Next; on Terminal-Bench and FrontierCode, it is not.
- It is usable from day one. Apache 2.0 license and a 46.9 GB NVFP4 checkpoint that, in the few tests published, keeps practically all of the original's quality.
Try it on the Helmcode API
Qwen4-35B-A3B is now available on the Helmcode API and, like the rest of the Qwen models, with unlimited tokens on every plan. We serve it from our European infrastructure, with no logs kept.
- Endpoint
- https://api.helmcode.com/v1
- Model
- qwen4-35b-a3b
- Format
- OpenAI-compatible API
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.helmcode.com/v1",
api_key="YOUR_KEY",
)
response = client.chat.completions.create(
model="qwen4-35b-a3b",
messages=[{"role": "user", "content": "Hello"}],
)