AI 热点

Qwen4-35B-A3B 发布,支持 1M-token 多模态本地推理

Unite.AI更新于 12月4日 11:16

Qwen4-35B-A3B Brings 1M-Token Multimodal AI to Local Machines

AI 导读

阿里巴巴千问团队发布 Apache-2.0 许可的 Qwen4-35B-A3B,支持文本、图像和视频输入、文本输出及原生 1M-token 上下文窗口。模型约有 35B 主参数,每个 token 激活约 3.8B 参数,Q4_K_M 量化版在 llama.cpp 懒加载模式下需要 36.0 GB 存储和 21.9 GB 内存。Hugging Face 在 Apple Silicon M5 的 Q4 测试中报告,启用三个草稿 token 后生成速度提升 22%。

推荐理由

精选AI 评分 85

文章将量化内存门槛、推理框架与训练后评测并列呈现,可用于判断本地部署成本和微调收益。

主题

标签

正文

Hugging Face announced on December 4, 2026 that Alibaba’s Qwen Team had released Qwen4-35B-A3B under Apache-2.0. The model accepts text, images and video, produces text, and has a native one-million-token context window, alongside launch support across local and production inference frameworks.

The release combines about 35 billion main parameters with roughly 3.8 billion active parameters per token. A further 20.5 billion parameters form a per-layer n-gram embedding table, bringing the total to about 56 billion. Quantized versions and an option to read that table on demand rather than load it into RAM put the model within reach of some Mac computers.

Efficient Architecture for Long Contexts

The official model card describes 40 layers arranged as ten repetitions of three Gated DeltaNet layers followed by one Qwen Sparse Attention layer. Gated DeltaNet updates a fixed-size memory as each token arrives, while sparse attention groups tokens into blocks of four and selects up to 512 blocks, giving each query a budget of 2,048 tokens.

The mixture-of-experts system has 256 routed experts, activating eight plus one shared expert for each token. The embedding table performs 16 lookups per token for two- and three-token patterns. A vision transformer encodes images as patches and processes video sampled at two frames per second, feeding visual tokens into the text decoder. The design separates the work required for an individual token from the much larger total parameter count, although storage still depends on the full checkpoint.

Quantization Sets the Local Footprint

Support at launch includes transformers, llama.cpp and Llama App, vLLM, SGLang and MLX, with BF16, FP8, OMLX and GGUF checkpoint options. The Qwen Team recommends dedicated serving engines such as SGLang and vLLM for high-throughput production workloads, while llama.cpp and Apple Silicon options address local deployments.

The GGUF repository lists these requirements when llama.cpp’s default lazy mode keeps the n-gram embedding table on disk and reads it on demand instead of loading it into RAM:

Q4_K_M 36.0 GB 21.9 GB 32 GB Mac

Q6_K 51.0 GB 29.2 GB 48 GB Mac

Q8_0 59.4 GB 37.6 GB 64 GB Mac

An optional multi-token prediction head generates drafts for speculative decoding and is packaged separately to keep base-model downloads compact. Hugging Face reports that enabling three draft tokens increased generation speed by 22% in its Q4 quantization test on an Apple Silicon M5. For Apple Silicon, oMLX also supplies custom Metal kernels for sparse attention and gated residual connections, supports image input and multi-token prediction, and can offload the embedding table to SSD.

Reasoning effort can be set to xhigh, high, low or off, with high as the default. The Qwen Team cautions that lower effort does not always shorten multi-turn agent tasks: faster responses per turn can come with insufficient analysis, more failures and repeated retries, which may increase total latency and token consumption.

The announcement also describes a TRL training example for security-alert triage. vLLM samples several responses to each sanitized alert, and each earns a reward of 1 when its triage label and evidence citations match analyst criteria, or 0 otherwise. TRL’s asynchronous GRPO trainer then updates a LoRA adapter, with vLLM serving on one GPU and training on the other in the example Hugging Face Job.

On 12 held-out CyberDefense Bench tasks, the base model passed 4, the update-50 adapter passed 6 and the update-100 adapter passed 3. The update-50 checkpoint therefore performed best on this sample even as average training reward trended upward; additional training did not produce a corresponding improvement on those held-out tasks.

For local AI adoption, the release ties deployment feasibility to specific memory and framework choices, while its training example treats held-out task results as a separate measure from training reward.

来源

Unite.AI