My 2.5 year old laptop can write Space Invaders in JavaScript now, using GLM-4.5 Air and MLX

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Local LLMs on consumer Macs now produce working code first-try, weakening the assumption that coding models require cloud APIs or datacentre hardware.

Read this as

Simon Willison ran a large Chinese-made AI model called GLM-4.5 Air on his two-and-a-half-year-old MacBook Pro with 64GB of memory. He asked it to write the classic video game Space Invaders in HTML and JavaScript, and the code it produced worked on the first attempt with no fixes. The model's weights normally take about 206GB of storage, but a shrunken 44GB version was made to fit consumer machines. This shows good coding AI can now run entirely on a personal laptop, not just in company datacentres.

GLM-4.5 Air, an MIT-licensed open-weight coding model from Z.ai, was run locally on a 64GB MacBook Pro M2 using a 44GB 3-bit quantized version, generating working Space Invaders code on the first attempt at about 25 tokens per second. The implication: capable local coding assistants are becoming viable on standard hardware, reducing dependence on paid cloud model APIs for some development work.

Willison ran mlx-community/GLM-4.5-Air-3bit (Ivan Fioravanti's 3-bit MLX quantization of Z.ai's 106B-parameter GLM-4.5 Air) on a 64GB M2 MacBook Pro, using the mlx-lm main branch after a commit adding glm4_moe support. It generated 4,193 tokens at 25.56 tokens/sec with 47.7GB peak memory (~48GB peak overall). The Space Invaders HTML/JS output worked unedited; the pelican-riding-a-bicycle SVG was mediocre. Limitation: leaving only ~16GB RAM for everything else.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

GLM-4.5 Air Z.ai MLX MacBook Pro M2 Claude Sonnet 4 Hugging Face

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.4a0

Datasette now lets developers add custom chart types more easily, expanding visualisation options for data projects.