Black Friday week: local AI hardware on sale. See the list.
← All guides

How to Run Weight-Space Programming Locally: 192K Context

On 2 November 2026, MIT CSAIL researchers showed that GPT-6 Astra can name the game a small network was trained on, from its raw weights. A day later Simon Willison ran the same test with Qwen 3.8 27B on a laptop, and it named 3 of 4 games. The hard part on your own machine is not the 17GB model. It is the 104,838-token prompt and the 45,000 to 65,000 tokens of reasoning after it. Here are his measured token counts, the context and KV cache you need, what fits a 16GB, 24GB or 32GB card, and how long one question takes.

Jump to 10 sections
  1. Bottom Line
  2. What the Test Is
  3. The Receipts: Qwen 3.8 27B on a Laptop
  4. The Context Math
  5. What Fits Where
  6. How Long One Question Takes
  7. How to Run It
  8. The Honest Caveats
  9. Sources
  10. See Also

Bottom Line

  • Yes, a local model can do the read test. Qwen 3.8 27B named 3 of 4 games from raw weights in Simon Willison’s run on 3 November 2026. It failed on Freeway.
  • The prompt is the problem, not the model. Each prompt prints all 17,253 weights as text. That is 104,838 tokens before the model writes a word.
  • Set the context to 192K (196,608 tokens). Qwen then wrote 45,733 to 65,430 tokens. The largest run needed 170,268 tokens in total. The 8,192 default fails.
  • A 24GB card works with a q8_0 KV cache: 15.66 GiB of weights plus 6.38 GiB of cache is 22.03 GiB. An f16 cache needs a 32GB card.
  • One question takes 46 to 65 minutes on a laptop. Our estimate for an RTX 3090 is 27 to 38 minutes.

Output speed sets the wait on hour-long runs like this one. See the cards this matters for.

What the Test Is

“Sparks of Weight-Space Programming” is a blog post by Rikiya Takehi, Jayden Teoh, Alex Zhang and Omar Khattab of MIT CSAIL, published 2 November 2026. Its first experiment asks a model to read a network’s weights and name the game it plays.

Experiment 1, “which game”
GamesGrid versions of Breakout, Pong, Pac-Man and Freeway, 10×10 board, 5 actions
NetworkMLP 500 → 32 → 32 → 5, tanh, 17,253 weights, the same shape for all four games
TrainingPPO, 1 billion steps, best of 3 seeds per game
RuleNo tools, no code, one response. The game names are not given as options
Paper resultGPT-6 Astra named all four games
Promptsexp1_which_game/runs/<game>/prompt.txt in the RikiyaT/lm_understand-logs repo, about 115 KB each

Why the prompt is so long. Every weight is a number such as -0.356. Qwen’s tokenizer splits numbers into single digits, so -0.356 is six tokens: -, 0, ., 3, 5, 6. We counted the Pac-Man prompt with the Qwen3.8 tokenizer: 104,787 tokens. LM Studio reported 104,838, which includes the chat template.

The post has critics. Matthew Honnibal called it misleading, because it mixes reading weights with editing them through code. Sean Goedecke argued that the Qwen3.5-0.8B fix follows steps a human researcher would take. This page covers only the read test, which runs on one machine.

The Receipts: Qwen 3.8 27B on a Laptop

Simon Willison used the LM Studio Qwen3.8-27B-Q4_K_M.gguf file (16.81 GB) and his llm tool. The token counts below are from his published transcript. He did not name the laptop.

GameInput tokensOutput tokensReasoning tokensTotal contextTimeAnswerStated confidence
Pac-Man104,83845,73343,506150,57146m 12sPac-Man72%
Breakout104,86453,37250,188158,23652m 25sBreakout88%
Pong104,83865,43060,561170,2681h 4m 54sPong75%
Freewaynot publishednot publishednot published——“Pac-Man-like” (wrong)—
  • Average output speed: 16.5 to 17.0 tok/s, counting the prompt time. That is output tokens divided by wall time.
  • Qwen thinks much longer than a frontier model. On the Breakout prompt, Kimi K3.1 Pro through OpenRouter used 19,493 reasoning tokens and took 9m 41s. Qwen used 50,188, which is 2.6 times as many.
  • Each game is one run. Nobody has published repeat runs. The confidence values are the model’s own words, not a measured accuracy.

The Context Math

Qwen 3.8 27B has 64 layers. Only every fourth layer is full attention. The other 48 are Gated DeltaNet layers with a fixed-size state. So only 16 layers keep a cache that grows with the context.

2 (K and V) x 16 layers x 4 KV heads x 256 head dim = 32,768 values per token
f16:  2 bytes each      = 64 KiB per token
q8_0: 34 bytes per 32   = 34 KiB per token
q4_0: 18 bytes per 32   = 18 KiB per token

The layer and head counts are from the model’s config.json. The bytes are our arithmetic.

Contextf16 cacheq8_0 cacheq4_0 cache
8,192 (LM Studio default)0.5 GiB——
180,224 (176K)11.0 GiB5.84 GiB3.09 GiB
196,608 (192K)12.0 GiB6.38 GiB3.38 GiB
262,144 (native maximum)16.0 GiB8.50 GiB4.50 GiB

Why 192K and not 176K. The Pong run reached 170,268 tokens. 176K leaves fewer than 10,000 tokens of margin. A run that thinks longer than Pong stops before it answers.

What Fits Where

Totals are model file plus cache at 196,608 tokens. They leave out the compute buffers and the DeltaNet state, which we did not measure. Treat each total as a lower bound.

MachineGPU memoryFile + cacheTotalFits?
16GB card (RTX 5060 Ti 16GB, RTX 4060 Ti 16GB)16 GiBIQ3_XXS 11.47 GiB + q4_0 3.38 GiB14.85 GiBBarely. About 1.1 GiB left for buffers
24GB card (RTX 3090, RTX 4090)24 GiBQ4_K_M 15.66 GiB + q8_0 6.38 GiB22.03 GiBYes, about 2 GiB left
24GB card24 GiBQ4_K_M + f16 12.0 GiB27.66 GiBNo
RTX 509032 GiBQ4_K_M + f16 12.0 GiB27.66 GiBYes
RTX 509032 GiBQ6_K 20.89 GiB + q8_0 6.38 GiB27.27 GiBYes
32GB Mac24.96 GiB Metal limitQ4_K_M + q8_022.03 GiBYes, tight
36GB Mac27.00 GiB Metal limitQ4_K_M + f1627.66 GiBNo. Use q8_0
48GB Mac37.44 GiB Metal limitQ4_K_M + f1627.66 GiBYes

File sizes are from the Hugging Face API: LM Studio Q4_K_M 16.81 GB and Q6_K 22.43 GB, bartowski IQ3_XXS 12.32 GB. The Mac limits are the “recommended max working set” values that llama.cpp logs, collected on our MacBook page.

Our recommendation: a 24GB card with Q4_K_M and a q8_0 cache. It is the file Simon used, so your result compares with his. The 3-bit route on a 16GB card is a test of a different model quality, not a copy of his run.

How Long One Question Takes

Time is prompt tokens divided by prompt speed, plus output tokens divided by output speed.

The RTX 3090 rows use two published llama.cpp numbers for Qwen 3.8 27B at 4-bit: 767 tok/s prompt processing at 64K (Hardware Corner) and 31.0 tok/s output at 131K (sudoingX). With the built-in MTP draft head, sudoingX measured 41.3 tok/s at 131K. Details are on our Qwen 3.8 27B on RTX 3090 page.

RunSimon’s laptop (measured)RTX 3090 (estimate)RTX 3090 + MTP (estimate)
Pac-Man (45,733 out)46.2 min26.9 min20.7 min
Breakout (53,372 out)52.4 min31.0 min23.8 min
Pong (65,430 out)64.9 min37.5 min28.7 min

The estimates are best cases. Both published speeds come from shorter contexts than this test reaches. Output speed drops as the cache grows, because each new token reads the whole cache. Expect the real 3090 times to be longer than the table.

The prompt is the cheap part on a GPU. At 767 tok/s, 104,838 tokens take about 2.3 minutes. The output is 90% or more of the wait. So the card’s output speed, which follows memory bandwidth, decides how long you wait.

How to Run It

Option 1: LM Studio and the llm tool (Simon’s route)

  1. Download Qwen3.8-27B-Q4_K_M.gguf from lmstudio-community in LM Studio.
  2. Before you load the model, set the context length to 196608. The 8,192 default fails on this prompt.
  3. Load the model and start the local server.
  4. Install the plugin: llm install llm-lmstudio.
  5. Run one game. Simon raised the plugin timeout with an environment variable:
LMSTUDIO_TIMEOUT=900 \
  llm -f https://raw.githubusercontent.com/RikiyaT/lm_understand-logs/refs/heads/main/exp1_which_game/runs/pacman/prompt.txt \
  -m lmstudio/qwen/qwen3.8-27b

llm logs then shows the token usage and the duration, the same fields as the table above.

Option 2: llama-server on a 24GB card

llama-server -m Qwen3.8-27B-Q4_K_M.gguf -ngl all -fa on \
  -c 196608 -ctk q8_0 -ctv q8_0 --parallel 1 -to 7200 --port 8080
  • -c 196608 is the 192K context. -ctk q8_0 -ctv q8_0 cuts the cache to about half. -fa on turns on flash attention.
  • --parallel 1 gives the whole context to one request. With more slots, the context is split between them.
  • -to 7200 raises the server read/write timeout. The default is 3,600 seconds, and the Pong run took 3,895 seconds on Simon’s laptop.

Send a prompt and print the token counts:

curl -s -O https://raw.githubusercontent.com/RikiyaT/lm_understand-logs/refs/heads/main/exp1_which_game/runs/pacman/prompt.txt
python3 - <<'EOF'
import json, urllib.request
body = {"messages": [{"role": "user", "content": open("prompt.txt").read()}]}
req = urllib.request.Request("http://localhost:8080/v1/chat/completions",
    data=json.dumps(body).encode(), headers={"Content-Type": "application/json"})
r = json.load(urllib.request.urlopen(req, timeout=7200))
print(r["choices"][0]["message"]["content"])
print(r["usage"])
EOF

Read the usage line. If prompt_tokens is near 104,800 and the answer is complete, the context was large enough. For the flags in more detail, see llama.cpp Flags Explained. For what a q8_0 cache costs in quality, see KV Cache Quantization: q8_0 vs q4_0.

The Honest Caveats

  1. Three correct answers from one run each is a small sample. Run each game more than once before you draw a conclusion about your own setup.
  2. Simon did not publish his cache type. A q8_0 cache over 170,000 tokens can change the result. We have not tested it.
  3. A 3-bit file is not the same experiment. IQ3_XXS fits 16GB, but its error against the full model is about five times that of Q4_K_M on bartowski’s Qwen3.8-27B card (KLD 0.0739 against 0.0139).
  4. The MTP speed-up changes the output text. One public test found that MTP output did not match normal decoding byte for byte. The answer can still be right, but the reasoning trace differs.
  5. Simon’s own view: “a sufficiently experienced human being armed with a notepad and a pencil could get there with enough effort.” He does not read the result as proof that models will soon edit their own weights.

Sources

See Also

Before you plan a long-context box, check the tested hardware list for current prices by tier.

Was this guide useful?

Read next

Can I Run Clover 35B-A3B Locally? (2026): 24GB, No Diffusion
Clover-35B-A3B is a diffusion LLM built on Qwen3.6-35B-A3B. Exact GGUF sizes, what fits 16GB and 24GB cards and Macs, measured speeds, and why llama.cpp runs it without diffusion today.
Can I Run Nanbeige4.3 33B Locally? (2026): Yes, on 24GB
Nanbeige4.3 33B is a dense 33B agent model. Exact GGUF sizes, why its KV cache is 3.25x Qwen3.8 27B's, what fits 24GB and 32GB cards and Macs, and measured DGX Spark speeds.
Can I Run Flint Locally? (2026): Yes, on a 24GB Card
Recursive's Flint is a 39.8B MoE with 2.5B active. Byte-exact GGUF sizes from 10.57 GiB to 74.16 GiB, the 28 KB/token cache math, and which quant fits 16GB, 24GB, 32GB GPUs and 32-64GB Macs.
Can I Run Sage-A1.5 Locally? (2026): Yes, on a 24GB GPU
Sage-A1.5 is a 35B Qwen3.6-based MoE with about 3B active. Byte-exact GGUF sizes from 12.34 to 66.19 GiB, the 20 KB/token cache math, and which quant fits 16-32GB GPUs and 32-64GB Macs.