My 2.5 year old laptop can write Space Invaders in JavaScript now (GLM-4.5 Air)
TL;DR Highlight
A 3-bit GLM-4.5 Air on a 64GB M2 MacBook wrote a working Space Invaders first try
Who Should Read
Backend or full-stack developer wondering whether a MacBook can run a local coding LLM
Core Mechanics
- GLM-4.5 Air is an open-weight model
- Z.ai released it under the MIT license, and its own benchmarks claim high coding scores even against models like Claude Sonnet 4.
- Even Air has 106 billion total parameters and is 205.78GB on Hugging Face.
- A 3-bit quant shrinks it to 44GB
- Ivan Fioravanti built an MLX 3-bit quantized version sized for 64GB machines.
- Quantization lowers weight precision to cut size.
- One prompt produced a working game
- The prompt was "Write an HTML and JavaScript page implementing space invaders".
- It worked first time with no further edits.
- Speed was fine but memory is tight
- It generated 4193 tokens at 25.564 tokens per second.
- Peak memory was 47.687GB, so many apps had to be closed.
- You need the latest mlx-lm main branch
- The author ran a main-branch build with glm4_moe support via uv.
- The model was mlx-community/GLM-4.5-Air-3bit, with 44GB of weights downloaded automatically.
- Most 2025 models target coding
- The author says that focus is clearly paying off.
- The same laptop he used two years ago now runs GLM 4.5 Air, Mistral 3.2 Small, Gemma 3, and Qwen 3.
Community Reactions
- Open models are about 6 months behind SotA, per one commenter
- They ran a live app on GPT-J for a month and found the quality abysmal.
- Being only 6 months behind now is described as astonishing.
- Counterpoint: Space Invaders is likely in the training data
- Commenters said this makes it weak evidence of real coding ability.
- One suggested just downloading an existing implementation from GitHub.
- A commenter compared models directly
- Claude Sonnet 4 failed to produce a working game on the same prompt, and Opus 4 worked but was worse than GLM.
- Another found the full-size model added an 80s font and more enemy detail.
- Qwen3-30B-A3B-Instruct-2507 missed on one shot
- The author ran it with 8-bit quantization using about 30GB of RAM.
- It did not produce a working game in a single shot.
How to Apply
- Run GLM-4.5 Air 3-bit on a 64GB Mac
- Run the code below with uv to download the 44GB model and send the same prompt.
- Check the printed speed and peak memory to judge if it's usable on your machine.
- Compare local vs API models on your own tasks
- Run 2-3 real code-generation tasks from your work through the same prompt.
- Compare first-try success against the API model you use now.
- Check free RAM and close apps first
- The model uses about 48GB, so close other apps on a 64GB machine.
- If RAM is short, start with a smaller model.
Try It
# Run in terminal (64GB Apple Silicon Mac, uv installed, ~44GB download)
uv run --with 'https://github.com/ml-explore/mlx-lm/archive/489e63376b963ac02b3b7223f778dbecc164716b.zip' python
# Paste into the open Python interpreter
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/GLM-4.5-Air-3bit")
prompt = "Write an HTML and JavaScript page implementing space invaders"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, verbose=True, max_tokens=8192)Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls
Related Resources
- https://simonwillison.net/2025/Jul/29/space-invaders/
- https://github.com/ml-explore/mlx-lm
- https://huggingface.co/mlx-community/GLM-4.5-Air-3bit
- https://simonwillison.net/2025/Jul/29/qwen3-30b-a3b-instruct-2507/
- https://claude.ai/share/dc9eccbf-b34a-4e2b-af86-ec2dd83687ea
- https://claude.ai/share/5ddc0e94-3429-4c35-ad3f-2c9a2499fb5d
- https://peterc.org/img/aliens.png