All projects

Integer & embedded · Completed

int-llm Brainfuck

Bit-exact MicroGPT inference and complete 5,000-step training expressed in Brainfuck's eight commands.

At a glance

Evidence and scope

Repository measurements and recorded project results. Test and benchmark claims were inspected, not rerun during this catalog refresh. Physical line counts use the stated file scopes.

Generated inference
16.40 GBmicrogpt.bf: 16,395,194,474 bytes. Decimal GB; the repository publishes its generator, not the generated file.
Generated trainer
210.30 GBmicrogpt_train.bf: 210,300,828,662 bytes. Decimal GB; the repository publishes its generator, not the generated file.
Training gate
5,000 stepsThe recorded full run matched the transcript, wide checkpoint, F12 export, and independent F12 conversion.
Inference gate
122 stepsAll 20 sampled names and the raw-logit and sample hashes matched the rounded-wide F12 reference.
Reviewed sources · 2026-10-16 · 27c7c12bfa78

142 tracked files · 6 documentation files · 0 workflow files. Inventory includes data and vendored or generated files; workflow presence does not establish a passing run.

Download inventory and line-count file scopes

Executive summary

int-llm-brainfuck implements a small transformer using only Brainfuck's eight commands. Its published generators produce inference and training programs for a pinned machine with wrapping eight-bit cells. Fixed-point arithmetic, model loading, attention, sampling, gradient computation, and optimizer updates happen inside the generated program. A generic interpreter supplies execution and byte I/O. The completed experiment has recorded exact comparisons with the C oracle, including the full 5,000-step training run.

The generated inference file is 16.40 GB and the trainer is 210.30 GB, using decimal GB (1 GB = 1,000,000,000 bytes). The repository contains the generators and verification records; the generated .bf files are not committed.

What was built

  • A 16,395,194,474-byte inference program and a 210,300,828,662-byte trainer,
  • regenerated from the published source rather than stored in Git.

  • A pinned 4,194,304-cell Brainfuck machine, portable interpreter, and generic
  • Linux x86-64 ahead-of-time runner.

  • Integer primitives, model loaders, forward/backward computation, Adam,
  • gradient clipping, and checkpoint serialization.

  • Oracle fixtures, staged checks, negative controls, and sealed verification logs.

How it works

Q16.48 values occupy eight little-endian byte cells. Inference keeps stored weights as signed-int16 F12 codes and widens them for computation. Training retains wide parameters and optimizer state throughout; F12 rounding happens only when exporting the completed checkpoint. The runner may optimize generic Brainfuck operations but may not perform model-aware work or supply answers.

Evidence and validation

The recorded inference gate checks 20 generated names, 122 forward steps, and both output and raw-logit hashes. A deliberately corrupted checkpoint preserves the names but changes the logit hash, testing that the gate detects hidden drift.

The September 18, 2026 training record reports exact agreement on 5,000 loss lines, 20 samples, the 115,576-byte wide checkpoint, and the F12 checkpoint. An independent conversion also matches the F12 export. The full run used the generic native runner and took 409:29:53 including compilation. These are committed project records; this portfolio refresh did not repeat the long run.

Boundaries

The result is limited to the pinned small model and machine semantics. It does not establish useful throughput or general language-model quality. The full portable-interpreter training gate was not rerun. Generated programs require substantial disk space, and the training dataset is fetched separately.

Repository map and first run

Start with the small artifact and layout checks:

make bootstrap

Read README.md, SPEC.md, and the two reference/phase*-verification-results.log files before generating or running the large programs. The logs retain earlier failed attempts alongside the completed gates.