firebrand
Compile small programs into transformer weights. No training required.
Describe a computation with bounded integers, and firebrand builds the attention heads and ReLU layers that execute it. Examples include GCD, Conway's Life, and an RV32IM interpreter used to run DOOM.
Install
Requires Python 3.11+.
pip install firebrand
The core package uses NumPy and runs on a CPU. The faster C decoder also needs
cc (GCC or Clang) and a writable cache directory on Linux or macOS.
Try it
from firebrand import Machine, compile_machine, history
countdown = Machine((history() - 1).relu(), lower=0, upper=31, halt_values=(0,))
model = compile_machine(countdown)
print(model.generate([5]))
# [5, 4, 3, 2, 1, 0]
history() reads the last token. This machine subtracts one, stops at zero,
and returns the prompt followed by the generated tokens.
You can also compile a restricted Python function with @program, using
bounded integer parameters such as Int[0, 60].
Learn more
- First program: compile and run GCD.
- Usage: integer bounds, saving models, backends, and development.
- Examples: memory, records, rendering, and more.
- DOOM: build and run the RISC-V demo.
Optional extras: pip install "firebrand[gpu]" for PyTorch and CUDA tools,
or pip install "firebrand[llm]" for Hugging Face export and the language-model bridge.
This is an alpha research library. Exact execution depends on the declared integer ranges and compiled context limit; arbitrary Python is not supported.
License
MIT.
Metadata
Release files for firebrand 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| firebrand-0.0.1.tar.gz | 150.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| firebrand-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 267.6 kB
Release files / firebrand-0.0.1.tar.gz
| Download URL | firebrand-0.0.1.tar.gz |
|---|---|
| Size | 150.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87e93490201b6cadb036bc62f4c9d0f491ba7c90f40754f79ad83fdf84bd8daa
|
|
BLAKE2b-256 checksum How to use checksums |
eab9da399c2526dba357529a33158b9f0cee5305f971786dd8313d70e42a667f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / firebrand-0.0.1-py3-none-any.whl
| Download URL | firebrand-0.0.1-py3-none-any.whl |
|---|---|
| Size | 117.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99c871fafbac65238173d9d1bf5c2bf75c8fd4441e7f6d3a01f01d746fc219d3
|
|
BLAKE2b-256 checksum How to use checksums |
821efa00eb8ffe9cff3aaa4ca94c280ebe50360446b6c0479e5f61f9c1869beb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency log