Last updated: December 5, 2026
Transformers 5.26, Hugging Face’s Python model library, was published on December 4, 2026 (UTC). It adds native Qwen4 and Qwen4 MoE classes, so Qwen4-35B-A3B loads from a regular pip install, plus Ai2’s Molmo3 with pointing and 3D outputs, WeatherNext 2, Liquid Codec and two breaking refactors.
Contents
- What changed in Transformers 5.26
- Release areas at a glance
- How to upgrade and run Qwen4-35B-A3B
- Molmo3 grounding: prompts and settings
- WeatherNext 2, Liquid Codec, kernels and attention
- Limitations and upgrade checklist
- Frequently asked questions
What changed in Transformers 5.26
Version 5.26.0 was released on GitHub on December 4 at 02:09 UTC (9:09 p.m. ET on December 3) (GitHub release), and the same version is on PyPI with a minimum of Python 3.11 (PyPI). It follows Transformers 5.24 and its cache argument rename.
The headline is model coverage. Five architectures arrive in one release:
- Qwen4. Gated DeltaNet plus Qwen Sparse Attention with GatedResidual connections and a dense SwiGLU feed-forward network.
Qwen4ForCausalLMhandles text andQwen4ForConditionalGenerationhandles images and video (Qwen4 docs). - Qwen4 MoE. The mixture-of-experts variant, with
Qwen4MoeForCausalLMandQwen4MoeForConditionalGeneration(release notes). This is the architecture behind the open-weight Qwen4-35B-A3B model, whose config declaresqwen4_moe(config.json). - Molmo3. Ai2’s open vision-language family for spatial and 3D grounding, with a grounding head that emits tokens instead of text coordinates (Molmo3 docs). Background on the models is in our Molmo 3 guide.
- WeatherNext 2 from Google DeepMind and Google Research, and Liquid Codec, the speech codec of Liquid AI LFM3-Audio (release notes).
Release areas at a glance
| Area | What 5.26 changes | What to do |
|---|---|---|
| New models | Qwen4, Qwen4 MoE, Molmo3, WeatherNext 2, Liquid Codec | Upgrade before loading these checkpoints |
| Breaking changes | Rotary embedding classes renamed with canonical parents; indexers refactored | Test code that imports or subclasses these internals |
| Kernels | mamba-ssm v6 and flash-attn4 v2 no longer need pip-installed einops; Atlas Gated DeltaNet kernels re-enabled for Qwen3.5/3.6/3.8 on GB10 and Strix Halo | Retest kernelized Mamba and Qwen3.x paths |
| Attention | Flash Attention allowed for Gemma 4 E2B and E4B; padded-key cross-attention fix | Re-enable Flash Attention on those Gemma 4 checkpoints |
| Dependencies | Python 3.11+, huggingface-hub 2.4 to below 3.0, tokenizers 0.23.1 to below 0.24, safetensors 0.8+, kernels 0.19.1 to below 0.20 | Update pinned requirements together |
Rows one to four come from the release notes (GitHub release); the dependency row comes from the package metadata (PyPI). Keep huggingface_hub current as well; our huggingface_hub 2.5 guide covers the latest Hub client changes.
How to upgrade and run Qwen4-35B-A3B
- Confirm Python 3.11 or newer with
python --version(PyPI). - Upgrade:
pip install -U "transformers==5.26.0". Pinning the exact version keeps CI and production in step. - Check the install:
python -c "import transformers; print(transformers.__version__)"should print 5.26.0. - Load the processor and model:
AutoProcessor.from_pretrained("Qwen/Qwen4-35B-A3B")andAutoModelForImageTextToText.from_pretrained("Qwen/Qwen4-35B-A3B", device_map="auto"). This follows the image-and-video pattern in the Qwen4 docs (Qwen4 docs). - Build a chat message whose content list holds
{"type": "image", "path": ...}and a text entry. For video, swap in{"type": "video", "path": "/path/to/video.mp4"}(Qwen4 docs). - Call
processor.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt"), move the inputs tomodel.device, then runmodel.generate(**inputs, max_new_tokens=...). - Decode only the new tokens by slicing off the prompt length, as the docs example does with
output_ids[:, inputs["input_ids"].shape[1]:].
For text-only work, use AutoModelForCausalLM with AutoTokenizer. The docs example uses the Qwen/Qwen4-27B checkpoint (Qwen4 docs); when we checked on December 5, the Hub listed only the 35B-A3B and its FP8 version publicly.
Settings that matter. The model card lists a native context of 1,048,576 tokens and thinking mode on by default (reasoning_effort="high", with xhigh, low and off available). For thinking mode it recommends temperature 1.0, top_p 0.95 and top_k 20; for non-thinking mode, temperature 0.7, top_p 0.80, top_k 20 and presence_penalty 1.5 (Qwen model card).
Molmo3 grounding: prompts and settings
Molmo3 decides its output type from the prompt. Pass return_dict_in_generate=True to generate(), then call processor.post_process_grounding() with target_sizes to get pixel coordinates and masks. Without target_sizes, coordinates are fractions between 0 and 1 (Molmo3 docs).
Prompt patterns from the docs, using the allenai/Molmo3-4B checkpoint:
- “Point to the cat’s eyes.” returns points.
- “Segment the cat.” returns a segmentation mask.
- “Point to the spoon and tell me how far each is from the camera.” returns points_3d with depth in meters.
- “Find the 3D boxes for cup.” returns camera data and boxes_3d.
- “Track the penguin on the left.” on a video returns video_tracks with timestamps and object IDs.
For multi-turn chats, convert each answer with processor.parse_response() and pass its grounding back so later turns can refer to earlier points. For batches, pass a list of conversations with processor_kwargs={"padding": True} (Molmo3 docs).
WeatherNext 2, Liquid Codec, kernels and attention
WeatherNext 2 produces ensemble forecasts in six-hour steps, with tropical cyclone diagnostics. Transformers supports the full 0.25° checkpoints and a lighter 1° Mini model, using community-converted weights. Liquid Codec turns 24 kHz audio into 12 codebooks of 2016 codes at 12.5 Hz and back, with right-padded batching and streaming decoding (release notes).
The attention fixes also matter for compiled inference. The deferred generate check now works for linear-attention and encoder-decoder models, which keeps them compatible with the default cudagraphs compile config (release notes). Gemma 4 checkpoints that use bidirectional attention over images still raise an error with Flash Attention.
Smaller fixes cover OpenVINO 2026.5 exports, Gemma 4 per-layer inputs under tensor parallelism, packed sequences in the Qwen3.8-Flash-Next n-gram shift, and Gemma3n sparse MLP synchronization (release notes). Teams using exporters should compare this with the exporters API introduced in Transformers 5.23.
Limitations and upgrade checklist
- Molmo3 decoding limits. With images or video, only greedy decoding and sampling work, with one sequence per prompt and
use_cache=True.post_process_grounding()does not decode 2D boxes and decodes masks for images only; answers cut off bymax_new_tokenslose the partial tag (Molmo3 docs). - Qwen4 tokenizer choice. Qwen recommends its reference tokenizer, which needs
tiktokenandtrust_remote_code=True. The Jinja template intokenizer-compat/is for backward compatibility, and its token IDs can differ (Qwen model card). - Production serving. Qwen strongly recommends SGLang, vLLM or TokenSpeed for production or high-throughput workloads (Qwen model card). Use Transformers for experiments, evaluation and custom code.
- Breaking internals. Search your code for custom
*RotaryEmbeddingsubclasses and indexer imports, and run tests before rolling out (release notes). - Pin together. Upgrade transformers, tokenizers, huggingface-hub and kernels in one change so the version ranges stay consistent.
Frequently asked questions
What is new in Transformers 5.26?
Version 5.26.0 adds five architectures: Qwen4, Qwen4 MoE, Ai2’s Molmo3, Google DeepMind’s WeatherNext 2 and Liquid AI’s Liquid Codec. It also ships two breaking refactors (rotary embedding classes and indexers), kernel updates, and attention fixes, including Flash Attention support for Gemma 4 E2B and E4B.
How do I install Transformers 5.26?
Run pip install -U “transformers==5.26.0” in an environment with Python 3.11 or newer, which is the minimum PyPI lists. The release also requires huggingface-hub 2.4 or later (below 3.0) and tokenizers 0.23.1 or later (below 0.24).
Can I run Qwen4-35B-A3B with Transformers?
Yes. Its config uses the qwen4_moe model type with the Qwen4MoeForConditionalGeneration architecture, which 5.26 adds. Load it with AutoProcessor and AutoModelForImageTextToText. Qwen recommends SGLang, vLLM or TokenSpeed for production serving.
Does Molmo3 support beam search in Transformers?
No. With images or videos, generate() supports greedy decoding and sampling with one sequence per prompt and use_cache=True. Beam search, num_return_sequences above 1, assisted decoding and use_cache=False raise an error, because the grounding head keeps per-sequence state.
What breaks when upgrading to Transformers 5.26?
The release marks two breaking changes: a cleanup that renames rotary embedding classes and gives them canonical parents, and a refactor of indexers. Code that imports or subclasses those internals should be tested before upgrading production environments.
Sources
- Release v5.26.0, huggingface/transformers (GitHub)
- transformers 5.26.0 (PyPI)
- Qwen4 (Transformers documentation)
- Molmo3 (Transformers documentation)
- Qwen/Qwen4-35B-A3B model card (Hugging Face)