Ground Truth.
AI, checked against the source.

News · 2026-08-26

Qwen put a 20-million-entry n-gram table inside a model

Alibaba's Qwen team released Qwen3.8-Flash-Next, which it describes as an experimental preview of the architecture that will underpin Qwen4. The model has 125 billion parameters with only 6 billion active per token -- plus 51 billion parameters sitting in a lookup table of 20 million word pairs and triples. That table is the bet: Qwen is arguing that as AI accelerators stay starved for memory rather than compute, the cheapest place to add parameters is the place you can move off the GPU.

Key facts

The hook. N-grams are the oldest trick in language modelling -- count how often words follow other words, and predict from the counts. That approach was declared obsolete when neural networks arrived. Qwen just welded a 20-million-entry version of it into a frontier model and made it 51 billion parameters wide.

Background. Qwen's last flagship, Qwen3.8-Max, shipped as a paid API with no weights, and the smaller Qwen3.8-27B came with a restrictive contract. So the first question the open-weights community asked about this release was about the licence, not the architecture.

What they did. Four changes, all aimed at the same target. The attention stack pairs Gated DeltaNet blocks with a new Qwen Sparse Attention that selects context at the micro-block level rather than token by token, which is what cuts long-context latency. A Gated Residual mechanism adds four branches at bottleneck rank 320 with data-dependent read gates and per-branch write gates on widened residual streams. The training recipe applies the Muon and AdamW optimizers to different weight categories and, guided by refitted scaling laws, eliminates batch-size warmup entirely by starting at the target batch size.

And then the n-gram table. In Qwen's own words: "Embeddings provide a unique axis for parameter scaling that requires less computation and is more amenable to offloading than Mixture-of-Experts. By indexing with short n-grams, this approach makes parameter scaling highly efficient for memory-constrained accelerators without sacrificing quality."

How it works. A mixture-of-experts layer adds parameters by adding specialists, but a specialist has to actually run -- its weights must be on the GPU when its turn comes, and which one gets picked is unpredictable. An embedding table adds parameters by adding rows, and a row is retrieved, not computed. It is the difference between hiring more staff and buying a bigger filing cabinet. The cabinet can go in the next room; the staff cannot. Because a lookup is just an address, that 51-billion-parameter table can sit in system memory or on an SSD and be paged in as needed -- exactly the trick described in offloading and streaming weights.

The licence, answered. The Qwen Community License 1.0 grants the right to use, copy, modify, distribute, sublicense, sell, deploy, host, fine-tune and create derivative works. Two conditions: products with more than 100 million monthly active users or $20 million monthly revenue must display the model name prominently in the interface; and any licensee running a "Model as a Service" business -- giving third parties API or hosted-endpoint access -- or an "AI Work Assistant" business, defined as a product primarily for AI-assisted coding or office productivity, must obtain a separate licence first. Internal use is explicitly exempt. So the weights are genuinely open, with a carve-out aimed squarely at competitors, and it is a materially better deal than Qwen3.8-Max got.

Why it matters. The release hit 611 points and 197 comments on Hacker News within twelve hours, the hardest engagement number of the day, with a mod-pinned r/LocalLLaMA megathread reporting it outperforming DeepSeek V4 Flash at a fraction of the parameter count. Qwen frames the whole thing as a thesis rather than a product: "Sustainable progress toward artificial general intelligence (AGI) that benefits everyone demands architectural innovation."

The honest caveat. The name says Flash and the headline says 6 billion active parameters, and both make this sound small. It is not. Every one of the 512 experts and the entire n-gram table must be resident or paged; the official download is 360 GB in bf16. Low active-parameter counts buy throughput, not a smaller machine -- see why LLM inference is memory-bound. Practical local paths do exist: Unsloth's GGUF build ships a 2-bit variant at roughly 78.9 GB across three shards, with llama.cpp and vLLM instructions. And every comparison number in the model card is Qwen's own, including the column labelled Claude Opus 4.6 -- independent retests have not landed yet.


Primary source, verified: read the paper →

Key questions

What is an n-gram embedding and why put one in a transformer?

It is a lookup table keyed by short sequences of tokens -- pairs and triples -- that injects learned information about those sequences directly into the model at layer 2. Qwen uses it because a lookup table is pure memory rather than computation, so it can live in system RAM or on disk and be paged in, making it a much cheaper axis to scale than adding more experts.

Are the weights actually open, or is this API-only like Qwen3.8-Max?

The weights are downloadable under the Qwen Community License 1.0, which permits commercial use, hosting, fine-tuning and derivative works. Two conditions apply: very large products must display the model name in their interface, and anyone running a Model-as-a-Service or an AI coding/office-assistant business needs a separate licence from Qwen.

How big is the download and what does it take to run?

The official repository ships 360 GB of bf16 weights. Qwen publishes no VRAM requirement; computed from the shipped files, the weights alone occupy about 360 GB in bf16, which is a floor before cache and activations. Unsloth's 2-bit GGUF build is roughly 78.9 GB across three shards.
Cite this

APA

Ground Truth. (2026, August 26). Qwen put a 20-million-entry n-gram table inside a model. Ground Truth. https://groundtruth.day/news/qwen-put-a-20-million-entry-n-gram-table-inside-a-model.html

BibTeX

@misc{groundtruth:qwen-put-a-20-million-entry-n-gram-table-inside-a-model,
  title  = {Qwen put a 20-million-entry n-gram table inside a model},
  author = {{Ground Truth}},
  year   = {2026},
  month  = {aug},
  url    = {https://groundtruth.day/news/qwen-put-a-20-million-entry-n-gram-table-inside-a-model.html}
}

Topics: open-weights · architecture · china · mixture-of-experts · efficiency · models · licensing

Comments are replies to this story on Bluesky — reply with any Bluesky account to join in.