Alibaba Drops Qwen4-35B-A3B as Its First Open-Weight Model With 1M Token Context
Alibaba's first open-weight Qwen4 model lands as a multimodal mixture-of-experts with a million-token context and ready-to-run GGUF builds.
Takeaways
- Alibaba released Qwen4-35B-A3B, the first open-weight Qwen4 model, under Apache 2.0.
- Sparse MoE: 35B total, ~3B active per token, 256 routed experts plus one shared expert.
- Native 1,048,576-token context, with text, image and video input in the same checkpoint.
- ggml-org GGUF build ships Q2_K, Q4_K_M and Q8_0 plus MTP speculative decoding sidecars.
- Alibaba claims it matches Qwen3.8-Flash on some tasks while activating only 3B parameters.
- Day-zero support in llama.cpp, vLLM, SGLang, MLX, Ollama, LM Studio and Transformers.
Alibaba’s Qwen team has released Qwen4-35B-A3B, the first open-weight model in the Qwen4 generation. The day-one GGUF package from ggml-org lets developers run quantized builds locally with llama.cpp. At publication, Hugging Face showed more than 1 million downloads, although its counter records file requests and can include repeat or automated traffic.
- Architecture: Sparse mixture of experts with 35 billion main parameters and roughly 3 billion to 3.8 billion active per token.
- Context: Up to 1,048,576 tokens.
- Inputs and output: Text, images, and video in; text out.
- License: Apache 2.0.
- Distribution: Hugging Face and ModelScope, including BF16, FP8, and quantized formats.
The downloadable base checkpoint gives developers direct access to the weights for local inference, profiling, quantization, fine-tuning, and self-hosted deployment. Its mixture-of-experts design routes each token through a small subset of the full parameter set, reducing per-token computation. Storage and memory requirements still reflect the broader model and its auxiliary components.
Inside the 35B label
Published parameter counts cover two pools. The main model contains about 35 billion parameters, with the model card using the rounded label “3B active” and the official Hugging Face description reporting about 3.8 billion activated per token. A separate Per-Layer N-gram Embedding table adds roughly 20.5 billion parameters, bringing the combined count to about 56 billion.
- Routed and shared experts: Each layer contains 256 routed experts plus one shared expert. A router selects a subset of the 256 for each token, while the shared expert processes every token.
- Per-Layer N-gram Embeddings: PLE supplies vectors for token sequences and mixes them into each layer. The GGUF implementation memory-maps and loads this table from disk as needed, reducing resident memory at the cost of greater dependence on storage performance and operating-system caching.
- Multi-Token Prediction: One additional MTP layer predicts several future tokens and can serve as a draft model for speculative decoding. llama.cpp verifies those drafts against the main model, with speed gains determined by draft acceptance rate and backend performance.
GGUF sizes leave different amounts of headroom
The ggml-org repository provides three primary quantizations. The MTP files are optional and consume additional memory when speculative decoding is enabled.
| Quantization | Model file | Optional MTP file | Practical target |
|---|---|---|---|
Q2_K |
27.9 GB | BF16, 3.76 GB | 32 GB unified memory without MTP, or a 24 GB GPU with CPU offload |
Q4_K_M |
32.9 GB | Q4_0, 1.09 GB |
48 GB-class systems; the recommended general-purpose build |
Q8_0 |
49 GB | Q8_0, 2.01 GB |
64 GB-class systems or deployments using CPU offload |
File size does not equal total runtime memory. llama.cpp also needs space for the KV cache, compute buffers, the vision projector, runtime overhead, and any MTP sidecar. Context length has the largest variable cost, so a system that loads the Q4 model may still lack enough memory for a large fraction of the advertised 1-million-token window.
The Q2_K build uses a mixed-precision recipe. Routed gate and up projections use Q2_K, routed down projections use Q4_K, and the gate and up tensors are calibrated with the repository’s pcuenq importance matrix. Embeddings, attention tensors, shared experts, and PLE remain at Q8_0; hyper-connection tensors that mix residual streams remain at BF16. This allocation preserves more precision for selected tensors than a uniform 2-bit conversion.
Launching with llama.cpp
A recent llama.cpp build with the qwen4_moe implementation can download and launch the Q4 model directly from Hugging Face:
llama-server -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M
llama-cli -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M
Those commands load the main text model. Speculative decoding requires the matching MTP file through llama.cpp’s draft-model option. Image processing requires the bundled Q8_0 mmproj file through the multimodal projector option. Video behavior depends on how the frontend samples and passes frames to the model.
The model page also lists launch paths for Ollama, LM Studio, Jan, vLLM, Docker Model Runner, Unsloth Desktop, Llama App, SGLang, MLX, Transformers, Inference Providers, and Inference Endpoints. Text, vision, video, long-context, and MTP support can arrive at different times across those runtimes, so deployment tests should cover the exact feature set in use.
Qwen4’s open tier starts below Max
Alibaba’s Qwen4-Max remains API-only. The company released it on November 16, 2026, with listed prices of $1.50 per million input tokens and $4.50 per million output tokens. Qwen4-35B-A3B is a smaller member of the same architecture family whose Apache-licensed weights can be downloaded and operated independently.
| Model | Access | Deployment | Listed cost |
|---|---|---|---|
| Qwen4-Max | API only | Alibaba-hosted | $1.50 input and $4.50 output per million tokens |
| Qwen4-35B-A3B | Downloadable weights | Self-hosted or third-party hosting | Infrastructure and operating costs |
Alibaba reports that Qwen4-35B-A3B matches the hundred-billion-parameter Qwen3.8-Flash in selected capabilities and beats several small and medium models across its benchmark suite, including the dense Qwen3.8-27B. Artificial Analysis lists the new model as the successor to Qwen 3.8 27B. Workload-level comparisons should control for quantization, context length, prompting, tool use, and serving configuration.
Three changes matter for local inference
- Long context reaches downloadable weights. The checkpoint declares a 1,048,576-token maximum. Usable context on a workstation will depend on KV-cache precision, available memory, backend support, and throughput requirements.
- Multimodal processing ships with the architecture. The model accepts text, images, and video and generates text. The GGUF package includes the separate vision projector needed by llama.cpp.
- Multiple runtimes supported the model at release. Initial tooling covers Transformers, llama.cpp, Llama App, vLLM, SGLang, MLX, hosted inference services, and checkpoints in BF16, FP8, MLX, and GGUF formats.
Deployment limits to account for
The 35B name excludes the 20.5 billion PLE parameters from the headline count. The BF16 release totals 113.6 GB across 33 safetensors shards, while the official FP8 build is about 60 GB. The Q4_K_M GGUF still occupies 32.9 GB before runtime allocations and optional components.
The million-token specification describes the model’s maximum supported sequence length. KV-cache memory and prompt-processing time grow with context, making the full window impractical on typical 48 GB workstations. Production deployments should benchmark representative prompt lengths and set a lower operational limit when latency or memory use becomes unacceptable.
The release includes weights and inference assets under Apache 2.0. Training data and training code are absent. Older llama.cpp binaries also lack the required qwen4_moe implementation and will fail to load the checkpoint, so deployments need a recent build and regression testing before rollout.
Workloads that justify the footprint
Teams running Qwen3-30B-A3B or Qwen3.8-27B can evaluate Qwen4-35B-A3B as an upgrade candidate for long-document analysis, coding agents with large histories, private multimodal workflows, and applications that currently use hosted APIs for extended context. The active-parameter count suggests manageable compute, although memory bandwidth, expert routing, PLE access, and context size will shape real throughput.
Systems with less than 24 GB of VRAM will generally need aggressive quantization and CPU offload. A 48 GB GPU or unified-memory machine can host the Q4 build at modest context lengths, while longer contexts and optional multimodal or MTP components benefit from 64 GB or more. Benchmarking the intended prompts, output lengths, and concurrency remains the reliable way to choose between this model, a smaller dense checkpoint, and a hosted API.