QDNAAdvisory and architecture for LLM inference and training platforms, on-premises or hybrid

Qwen3.8-Flash-Next on a Mac Studio M5 Ultra: 112 GB of weights, one million tokens

Alibaba released on 26 August 2026 a model of 180 billion parameters of which only six work on each token, and whose thirty-six of forty-eight layers accumulate no cache at all. Here is what it asks of a 512 GB Mac Studio M5 Ultra, and the throughput you can expect from it.

Mac Studio M5 Ultra
Short answer. In a 4-bit MLX conversion, Qwen3.8-Flash-Next takes a measured 111.6 GB, which leaves 400 GB free on a 512 GB machine. Its key-value cache costs only 24 KiB per token, so a one-million-token context fits in 24.6 GB. The constraint is therefore no longer memory but throughput, capped by arithmetic at around 320 tokens per second.

What this model actually is

The official model card states 125 billion parameters of which 6 billion are active per token, to which 51 billion n-gram embeddings are added, bringing the file to roughly 180 billion parameters in total. Those embeddings are not a compute layer but a lookup table of twenty million bigrams and trigrams placed at the second layer, which Qwen presents as a scaling axis demanding less computation than a mixture of experts would.

The repository's config.json gives the exact structure, and that structure drives the entire sizing exercise: forty-eight layers, of which thirty-six use Gated DeltaNet linear attention and only twelve use full attention, with two key-value heads of dimension 256. Routing activates ten experts out of five hundred and twelve on every token.

What it actually weighs under MLX

No conversion comes from the mlx-community organisation, which usually serves as the reference: the available versions are the work of individual contributors, which makes checking provenance a prerequisite before any production use. The sizes below are read from the published safetensors files rather than estimated.

ConversionWeights on diskFree on 512 GB
MLX 4-bit111.6 GB400 GB
MLX mixed 4 and 8-bit106.2 GB406 GB
MLX 6-bit with MTP158.1 GB354 GB
MLX 3-bit92.5 GB420 GB

The ratio between these sizes and the parameter count gives 0.62 byte per parameter at 4-bit, appreciably more than the 0.5 byte of a pure quantisation, the gap coming from quantisation scales and from layers kept at higher precision. It is this measured figure, and not the naive arithmetic, that must be carried into any throughput estimate.

Why context costs almost nothing

Only the twelve full-attention layers accumulate a key-value cache, the other thirty-six maintaining a recurrent state of fixed size. The calculation follows directly from two tensors, twelve layers, two key-value heads and a dimension of 256, which comes to 24 KiB per token in FP16 and half that, 12 KiB, in FP8.

The state of the linear layers occupies roughly 57 MB in total, and that value does not move with context length, which is precisely the point of linear attention. The table below draws the consequences for the two windows that matter in practice.

ContextFP16 cacheFP8 cache
262,144 tokens (native)6.4 GB3.2 GB
1,000,000 tokens (YaRN)24.6 GB12.3 GB

With 400 GB free after the 4-bit weights, the available memory would cover more than sixteen million tokens of FP16 cache. In other words the machine is not what bounds the context, the model is, since its native window stops at 262,144 tokens and only reaches a million through a YaRN extension.

The throughput you can expect

Generation rereads the active weights on every token, so speed depends first on memory bandwidth, which reaches 1.2 TB/s on the M5 Ultra. With 6 billion active parameters at 0.62 byte, each token requires reading about 3.7 GB, which places the arithmetic ceiling at around 320 tokens per second.

That number is a calculation rather than a measurement, and it should be read as such. A bandwidth ceiling is never reached in practice, real utilisation sitting closer to sixty or eighty per cent depending on engine and batch size. Prefill obeys a different logic anyway, bound by compute rather than by memory, as our article on prefill, decode and the KV cache sets out.

Three caveats to know before committing

The 512 GB configuration of the Mac Studio M5 Ultra is announced for the end of October 2026, which rules out any measurement today and explains why this article publishes calculations only. The entry machine stops at 96 GB, which is too little for this model whatever the quantisation retained.

What happens to the 51 billion n-gram embeddings is not documented on the MLX side. Qwen describes them as amenable to offloading, which suggests they are consulted by point lookup rather than traversed on every token, but no source confirms this for that software stack. Were MLX to keep them fully resident and reread them, the throughput ceiling would fall sharply.

Finally, the licence is qwen-community-1.0 rather than Apache or MIT, which makes reading its terms a prerequisite for any commercial use. Our comparison of open-weight models returns to this often-overlooked point.

Frequently asked questions

Does Qwen3.8-Flash-Next fit on a Mac Studio M5 Ultra?

Yes, provided you target the 512 GB configuration. The 4-bit MLX conversion weighs a measured 111.6 GB and leaves 400 GB free, while the 6-bit version rises to 158.1 GB. The 96 GB entry machine is not enough for any of these conversions.

How much context can be served?

The key-value cache costs only 24 KiB per token in FP16, because just twelve of forty-eight layers use full attention. A native 262,144-token context asks for 6.4 GB, and one million tokens ask for 24.6. Available memory would cover sixteen million tokens: the model window is what bounds this, not the machine.

What generation throughput should be expected?

The arithmetic ceiling sits at around 320 tokens per second, obtained by dividing the 1.2 TB/s of the M5 Ultra by the 3.7 GB reread on every token. That is a calculation rather than a measurement, and real throughput generally lands between sixty and eighty per cent of such a ceiling.

Are the MLX conversions trustworthy?

None comes from the mlx-community organisation that usually serves as the reference, and all are the work of individual contributors. Provenance must therefore be checked, checksums compared and output quality validated before any production commitment.

References

Size your machine

A call to test this calculation against your real workload, your context length and your number of users.

Book a call