Tasks / Language, code & music

Character-level model of Python code

Write a character-level MLP language model from zeros so that, from the eight previous characters, it predicts the next character of Python source. It is scored in bits per character on 33 Python files added to the CPython repository between August and November 2026.

Language, code & musicNetwork character-level MLP language model, 8-character context (Bengio et al. 2003 style)Weights 116,832Metric bits per characterBaseline 6.585Trained 2.117Agent time 60 minTrials 3 per agent

Opus 5.5 0.0%Sonnet 5.5 0.0%GPT-6.1 Sol 76.8%Haiku 5.5 37.8%DeepSeek V4.1 Flash 3.7%Kimi K3.1 Pro 42.2%MiMo V2.6 Pro 0.0%GLM-5.3 0.0%GPT-6 Astra 78.4%GPT-6 Luna 38.9%GPT-6.1 Terra 69.8%Gemini 4 Hydrogen 48.8%Gemini 4 Carbon 39.8%Wonder Full 1.0 45.6%GPT-6.2 Sol 81.3%GPT-6.2 Astra 84.6%

Data and scores

What the network reads (training examples)

# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
# Licensed to PSF under a Contributor Agreement.

from typing import Any, Callable, Tuple

# Type annotations
ParseFloat = Callable[[str], Any]
Key = Tuple[str, ...]
Pos = int

Fourteen lines of a training file from the CPython standard library.

Where the agents land

Opus 5.5Sonnet 5.5GPT-6.1 SolHaiku 5.5DeepSeek V4.1 FlashKimi K3.1 ProMiMo V2.6 ProGLM-5.3GPT-6 AstraGPT-6 LunaGPT-6.1 TerraGemini 4 HydrogenGemini 4 CarbonWonder Full 1.0GPT-6.2 SolGPT-6.2 Astra

one trialruled a rule break (counts 0)mean after rulings± 1 SE (trial to trial)

Score = the share of the way from the baseline (6.585) to the trained network (2.117), clipped to 0–100%. Each agent ran each task three times (new agents fewer while their runs finish).

Bits per character, mean over each agent's trials with a valid submission

Opus 5.5Sonnet 5.5GPT-6.1 SolHaiku 5.5DeepSeek V4.1 FlashKimi K3.1 ProMiMo V2.6 ProGLM-5.3GPT-6 AstraGPT-6 LunaGPT-6.1 TerraGemini 4 HydrogenGemini 4 CarbonWonder Full 1.0GPT-6.2 SolGPT-6.2 Astratrained networkbaseline

Lower is better. A mean beyond the axis is drawn at its edge; hover for its value.

How the agents worked

Trial

read fileswrite filesrun own codecheck the submissionother shell

Each mark is one tool call, placed at the minute it started; the grey band is the session, which the agent ends itself (limit 60 min). The median trial is the one with the middle graded score (before rulings) of the agent's trials with a valid submission. Kinds come from the tool and its program name only; the commands, code and reasoning are not published.

AgentTrialMinutesTool callsOutput tokensList costClaude reviewerGPT reviewerRulingScore
Opus 5.51 median21.828136,029$4.54passflagrule break, scored 00.0% 79.4%
Opus 5.5225.536155,774$5.43flagflagrule break, scored 00.0% 80.3%
Opus 5.5323.720138,579$4.47flagflagrule break, scored 00.0% 77.9%
Sonnet 5.5136.571267,940$5.32flagflagrule break, scored 00.0% 76.2%
Sonnet 5.5230.952234,886$4.35flagflagrule break, scored 00.0% 77.8%
Sonnet 5.53 median39.972288,260$5.67flagflagrule break, scored 00.0% 76.9%
GPT-6.1 Sol1 median43.746107,749—passflagno rule break76.8%
GPT-6.1 Sol252.34894,910—passpassno rule break76.2%
GPT-6.1 Sol340.03077,870—passpassno rule break77.4%
Haiku 5.51 median8.26113,612$0.22flagflagrule break, scored 00.0% 55.2%
Haiku 5.528.910123,415$0.23passflagno rule break59.9%
Haiku 5.537.0994,395$0.17passpassno rule break53.4%
DeepSeek V4.1 Flash111.921136,263$0.20passpassno rule break11.0%
DeepSeek V4.1 Flash2 median22.042256,094$0.38passflagrule break, scored 00.0% 65.1%
DeepSeek V4.1 Flash334.659392,660$0.55passflagrule break, scored 00.0% 66.6%
Kimi K3.1 Pro152.54869,678$1.42passpassno rule break66.1%
Kimi K3.1 Pro229.57781,086$2.00passflagno rule break0.0%
Kimi K3.1 Pro3 median12.73045,277$0.69passflagno rule break60.4%
MiMo V2.6 Pro160.020192,324—passflagrule break, scored 00.0% 16.8%
MiMo V2.6 Pro260.07175,952—passflagno rule break0.0% no valid submission
MiMo V2.6 Pro3 median60.026202,342—passpassno rule break0.0%
GLM-5.3137.132169,783—flagflagrule break, scored 00.0% 60.0%
GLM-5.3222.02682,066—flagflagrule break, scored 00.0% 6.7%
GLM-5.33 median60.115214,777—flagflagrule break, scored 00.0% 51.4%
GPT-6 Astra1 median34.42373,390—passpassno rule break79.2%
GPT-6 Astra248.62477,979—passpassno rule break76.7%
GPT-6 Astra350.62678,598—passpassno rule break79.3%
GPT-6 Luna126.45279,819—passpassno rule break35.0%
GPT-6 Luna2 median10.2632,460—passpassno rule break39.6%
GPT-6 Luna318.42451,953—passpassno rule break42.2%
GPT-6.1 Terra124.72678,034—passpassno rule break67.2%
GPT-6.1 Terra2 median34.440100,075—passpassno rule break71.0%
GPT-6.1 Terra321.51868,180—passpassno rule break71.1%
Gemini 4 Hydrogen114.051175,596—passpassno rule break74.4%
Gemini 4 Hydrogen218.939268,267—passflagrule break, scored 00.0% 71.7%
Gemini 4 Hydrogen3 median15.031215,456—passpassno rule break72.0%
Gemini 4 Carbon144.343202,502—flagflagrule break, scored 00.0% 79.1%
Gemini 4 Carbon260.036207,438—passpassno rule break42.8%
Gemini 4 Carbon3 median50.149202,816—passpassno rule break76.6%
Wonder Full 1.01 median18.23875,365—passpassno rule break68.2%
Wonder Full 1.0230.04396,496—flagflagrule break, scored 00.0% 65.3%
Wonder Full 1.0351.874156,308—passpassno rule break68.6%
GPT-6.2 Sol1 median57.72996,205———no rule break82.2%
GPT-6.2 Sol252.64087,661———no rule break79.3%
GPT-6.2 Sol356.632109,542———no rule break82.5%
GPT-6.2 Astra1 median57.94594,386———no rule break84.8%
GPT-6.2 Astra256.22777,874———no rule break84.2%
GPT-6.2 Astra358.92269,698———no rule break84.9%

Reviewers: Claude Opus 5.5 and GPT-6.1 Sol each read the recorded session and judge only what it executed and the files it wrote, flagging training, fitting, running the network or computing statistics from examples; the column shows each one's first reading. A flag is evidence, not a ruling. The rulings for Opus 5.5, Sonnet 5.5, GPT-6.1 Sol, Haiku 5.5, DeepSeek V4.1 Flash, Kimi K3.1 Pro, MiMo V2.6 Pro, GLM-5.3, GPT-6 Astra, GPT-6 Luna, GPT-6.1 Terra, Gemini 4 Hydrogen, Gemini 4 Carbon, Wonder Full 1.0, GPT-6.2 Sol and GPT-6.2 Astra are the WeightBench 1.0 rulings (2026-11-13 to 2026-11-18), under the executed-steps-and-files rule: a ruled rule break scores 0. List cost is BenchFlow's list-price estimate for the session's tokens (for DeepSeek and Kimi, as Claude Code reports it); it is not recorded for Codex sessions on a ChatGPT login or for MiMo V2.6 Pro's, GLM-5.3's, Gemini 4 Hydrogen's, Gemini 4 Carbon's and Wonder Full 1.0's sessions.

Weights: written by hand against trained

Opus 5.5trial 1 (median)
63% of weights non-zero
96 of 96 character embeddings used
Opus 5.5 first-layer weights 1
Sonnet 5.5trial 3 (median)
66% of weights non-zero
96 of 96 character embeddings used
Sonnet 5.5 first-layer weights 1
GPT-6.1 Soltrial 1 (median)
53% of weights non-zero
96 of 96 character embeddings used
GPT-6.1 Sol first-layer weights 1
Haiku 5.5trial 1 (median)
26% of weights non-zero
96 of 96 character embeddings used
Haiku 5.5 first-layer weights 1
DeepSeek V4.1 Flashtrial 2 (median)
60% of weights non-zero
96 of 96 character embeddings used
DeepSeek V4.1 Flash first-layer weights 1
Kimi K3.1 Protrial 3 (median)
76% of weights non-zero
96 of 96 character embeddings used
Kimi K3.1 Pro first-layer weights 1
MiMo V2.6 Protrial 3 (median)
32% of weights non-zero
96 of 96 character embeddings used
MiMo V2.6 Pro first-layer weights 1
GLM-5.3trial 3 (median)
12% of weights non-zero
96 of 96 character embeddings used
GLM-5.3 first-layer weights 1
GPT-6 Astratrial 1 (median)
53% of weights non-zero
96 of 96 character embeddings used
GPT-6 Astra first-layer weights 1
GPT-6 Lunatrial 2 (median)
14% of weights non-zero
96 of 96 character embeddings used
GPT-6 Luna first-layer weights 1
GPT-6.1 Terratrial 2 (median)
18% of weights non-zero
96 of 96 character embeddings used
GPT-6.1 Terra first-layer weights 1
Gemini 4 Hydrogentrial 3 (median)
56% of weights non-zero
96 of 96 character embeddings used
Gemini 4 Hydrogen first-layer weights 1
Gemini 4 Carbontrial 3 (median)
48% of weights non-zero
96 of 96 character embeddings used
Gemini 4 Carbon first-layer weights 1
Wonder Full 1.0trial 1 (median)
48% of weights non-zero
96 of 96 character embeddings used
Wonder Full 1.0 first-layer weights 1
GPT-6.2 Soltrial 1 (median)
53% of weights non-zero
96 of 96 character embeddings used
GPT-6.2 Sol first-layer weights 1
GPT-6.2 Astratrial 1 (median)
57% of weights non-zero
96 of 96 character embeddings used
GPT-6.2 Astra first-layer weights 1
Trained network100% of weights non-zero
96 of 96 character embeddings used
Trained network first-layer weights 1

The character embedding: 16 dimensions (rows) for the 96 characters (columns). Each agent's median trial is drawn. Each panel is scaled to its own largest weight: red is positive, blue negative, empty is zero.

Files

wbp-d-pycode

WeightBench 1.0 · task version 0.3.0 · 11 files

Download .tar.gz (9.0 KB)
Agent sandbox
60 minutes, 2 CPUs, 4 GB memory, no network besides the agent's model API
Archive
sha256 6d91b2c3da02ddf223963e6e9036b3bd9d3e3fc789abcb858ee8e239ea73d4dd
Digest with withheld files
sha256:e3d7ac3706568f17d3162ffbdfdcbc3b9b3ad9bfc550a247d0420f39bd930fc8
Digest in git
sha256:24b26a20d6809a739a30e0c1e7c5ed8abcc0906986e8dc74360a8cd941d1be1c

The folder as the agents ran it, minus the withheld files (the held-out test data and the trained network's weight file). Files over 1 MB are in the download only. How to run it: Run a task.