Alibaba Readies Qwen4-27B, a Transformers Code Change Shows

Code to run Alibaba’s Qwen4 model family was merged into Hugging Face’s Transformers library on Thursday, and its documentation names a “Qwen/Qwen4-27B” checkpoint, a GitHub pull request shows.

The change adds two families, a dense Qwen4 and a Qwen4 MoE, both able to take image and video inputs. It added 6,977 lines across 24 files and was merged 31 minutes after it was opened.

The model itself was not publicly available on Hugging Face at the time of writing. For Alibaba’s Qwen4-Max, see our Qwen4-Max explainer.

Business Pill: A few take most

An evergreen Business Engineer explainer. It teaches the general idea only and does not discuss the companies in this story.

The key insight: Hugging Face Transformers merged support for Alibaba’s Qwen4 and Qwen4 MoE on 3 Dec; the docs name a Qwen/Qwen4-27B checkpoint that was not yet public.

What the Code Shows

Pull request #51678, titled “Add qwen4”, was opened at 12:32 UTC and merged at 13:03 UTC on 3 December. Its description reads: “As per title cc @JJJYmmm @bozheng-hit”.

The Qwen4 documentation says: “Qwen4 uses Gated DeltaNet and Qwen Sparse Attention with GatedResidual connections and a dense SwiGLU feed-forward network.”

Its usage examples load the checkpoint “Qwen/Qwen4-27B” for text generation and for image and video inputs. The documentation says the model was contributed to Transformers on 3 December.

Lines of code added by huggingface/transformers pull request #51678, by component. Data: GitHub.
Lines of code added by huggingface/transformers pull request #51678, by component. Data: GitHub.

The MoE Family

The second family, Qwen4 MoE, “uses the mixture-of-experts and per-layer embedding architecture” described in its Qwen4-Exp documentation, according to the Qwen4 MoE page.

The default configuration sets 512 experts with 10 active per token. A code comment describes the per-layer n-gram embedding as “~45B == 90 GiB”. Defaults are not necessarily the values of a released checkpoint.

Bar chart of the Qwen4 MoE default configuration: 512 experts per MoE layer, 10 active per token.
Qwen4 MoE default configuration values in Transformers. Data: configuration_qwen4_moe.py, GitHub.

Where the Code Went

Of the 6,977 lines added, 2,699 are the MoE model code and 2,168 the dense model code. Configurations take 573 lines and documentation 182, by our count of the pull request’s files.

The Structural Read

As we read it, library support means developers could run the model as soon as any weights are published.

As we read it, shipping a dense and an MoE family together suggests Alibaba is again targeting both single-GPU and larger deployments.

Three Implications

FOR DEVELOPERS Transformers can now load Qwen4 and Qwen4 MoE model classes, per the merged code.

FOR ALIBABA Its documentation points to a 27B checkpoint, Qwen/Qwen4-27B, not yet public.

FOR OPEN-MODEL RIVALS Both Qwen4 families accept text, image and video inputs, per the documentation.

What Is Not Established

The pull request does not give a release date, benchmark results or a licence for the weights. The 27B name comes from documentation examples, and the checkpoint was not public on the Hugging Face Hub when we checked.

For Alibaba’s earlier Qwen4 releases, see our piece on the Qwen4-Max preview.

Business Engineer Framework

The AI Supercycle

The Business Engineer map of who builds, finances and captures value in AI.

Read the Map of AI →

The Bottom Line

Hugging Face’s Transformers library can now load Qwen4, and its docs point to a 27B model. The checkpoint was not public when we checked.

97,000+ executives read Business Engineer for the AI strategy frameworks cited by ChatGPT, Claude, and Perplexity.

A note on sourcing. Everything here is from the merged pull request in huggingface/transformers, its documentation and configuration files, read on 3 Dec 2026. The Hugging Face Hub returned no public page for Qwen/Qwen4-27B at about 14:40 UTC. Our arithmetic: 13:03 – 12:32 = 31 minutes; configurations 245 + 328 = 573 lines; documentation 119 + 59 + 4 = 182 lines. TestingCatalog flagged the change on X at about 14:04 UTC.

Sources: GitHub, huggingface/transformers pull request #51678 ‘Add qwen4’, merged 3 Dec 2026 · Hugging Face Transformers documentation, Qwen4 model page (qwen4.md) · Hugging Face Transformers, configuration_qwen4_moe.py

Scroll to Top
FourWeekMBA