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

GLM-5.3-Flash on a Mac Studio M5 Ultra: 320 billion parameters within 512 GB

A model of 320 billion parameters fits on a desktop machine, at 8-bit and with no quantisation compromise, because thirty-four of its forty-five layers accumulate no cache. Here is the sizing, the context actually served and the calculated throughput.

Mac Studio M5 Ultra
Short answer. The 8-bit MLX conversion weighs a measured 334.1 GB and therefore fits within the 512 GB of the M5 Ultra, the 4-bit version dropping to 177.5 GB. The key-value cache costs only 11 KiB per token thanks to latent attention, so the native one-million-token window asks for just 11.8 GB. The generation ceiling sits at around 64 tokens per second at 8-bit, and 120 at 4-bit.

An architecture built for long context

The card published by Z.ai states 320 billion parameters in total for 18 billion active per token, under an MIT licence, which remains rare at this scale and permits commercial use as well as redistribution. The config.json supplies the rest, namely forty-five layers of which thirty-four use linear attention and eleven use MLA sparse attention, with routing to eight experts out of two hundred and eighty-eight plus one shared expert.

The decisive point for sizing lies in the kv_lora_rank value, set to 512. Latent attention does not store separate keys and values but a single compressed vector per layer and per token, which cuts the cache by an order of magnitude compared with classic attention. The window declared in the configuration reaches 1,048,576 tokens.

What it weighs under MLX

As with other models of this size, no conversion comes from the mlx-community organisation, and the available versions are published by individual contributors. The sizes below are read from the published files rather than derived from the parameter count.

ConversionWeights on diskFree on 512 GB
MLX 8-bit334.1 GB178 GB
MLX 4-bit177.5 GB334 GB

The 8-bit version faithfully reproduces the native FP8 format of the original weights, which makes it the quality reference, and it still leaves 178 GB for cache and system. The 4-bit version halves the footprint and doubles theoretical throughput, at the cost of a degradation that must be measured on your own tasks rather than assumed.

How much context actually fits

Only eleven layers carry a cache, and each of them stores no more than a latent of 512 values per token, which gives 11 KiB per token in FP16 and half that, 5.5 KiB, in FP8. Set against the declared window of more than a million tokens, the result is surprising.

ContextFP16 cacheFP8 cache
262,144 tokens3.0 GB1.5 GB
1,048,576 tokens (declared window)11.8 GB5.9 GB

Even at 8-bit, where the weights already consume 334 GB, the remaining 178 GB would cover close to sixteen million tokens of FP16 cache. The model window is therefore reached long before the machine limit, which overturns the intuition inherited from full-attention architectures, where long context was paid for in tens of gigabytes.

The throughput you can expect

The calculation follows the same rule as for any mixture-of-experts model, since only the active parameters are reread on every token. The measured sizes give 1.044 byte per parameter at 8-bit and 0.555 at 4-bit, which leads directly to the two ceilings set out below.

ConversionRead per tokenArithmetic ceiling
MLX 8-bit18.8 GB~64 tokens/s
MLX 4-bit10.0 GB~120 tokens/s

These values divide the 1.2 TB/s bandwidth of the M5 Ultra by the volume reread, and they are therefore calculations rather than readings. Observed throughput generally lands between sixty and eighty per cent of such a ceiling, and the gap between the two quantisations shows above all that the choice is between output quality and speed, not between fitting and not fitting.

Against Qwen3.8-Flash-Next

Both models target the same machine and adopt the same hybrid architecture idea, but they do not make the same trade. Qwen activates six billion parameters and tops out around 320 tokens per second, whereas GLM activates eighteen and tops out at 120 at 4-bit, the speed gap being paid for in reasoning capacity. Our dedicated article covers the first case, on Qwen3.8-Flash-Next served under MLX.

The caveats

The 512 GB configuration of the Mac Studio M5 Ultra is announced for the end of October 2026, which makes any measurement impossible today and explains why this article confines itself to calculations. The official model card is otherwise sparse in detail, since it publishes neither the layer count, nor the file sizes, nor the context window, all values we read from the repository configuration.

Frequently asked questions

Does GLM-5.3-Flash fit on a Mac Studio M5 Ultra?

Yes, in the 512 GB configuration. The 8-bit MLX conversion weighs a measured 334.1 GB and leaves 178 GB for cache and system, while the 4-bit version drops to 177.5 GB. Neither fits on the 96 GB entry machine.

What context length can be served?

The configuration declares a window of 1,048,576 tokens, and the corresponding cache costs only 11.8 GB in FP16, because just eleven of forty-five layers carry a cache and they store no more than a compressed latent of 512 values. Machine memory is therefore never the limiting factor.

Should the 4-bit or the 8-bit conversion be preferred?

The 8-bit version reproduces the native FP8 format of the original weights and serves as the quality reference, at a ceiling of 64 tokens per second. The 4-bit version doubles theoretical throughput and frees 156 GB of memory, but the quality loss must be measured on your own tasks before any commitment.

Under which licence is the model published?

The weights are under an MIT licence, which permits fine-tuning, commercial deployment and redistribution. That is a markedly more permissive licence than those chosen by several competing models of comparable size.

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