This release is a pre-release and may not be stable for production use.
tinyjax
A tiny training engine for transformer LLMs — built as a learning artifact first, working trainer second.
If you know Python and numpy and have wondered what a "framework" like PyTorch or JAX actually does between your model definition and a running GPU kernel, this repo is for you. Every file, function, doc, and notebook is written for that reader.
What tinyjax is
- A minimal, JAX-shaped Python library that trains modern decoder-only transformer language models on CPU and NVIDIA GPU.
- Small enough to hold in one head: about 5–7k lines of library code, an unlimited number of lines of prose.
- Built chapter by chapter. Each chapter introduces one concept (arrays → tracing → jaxpr → autodiff → jit → vmap → transformer → training loop → mixed precision → data parallelism) and ships with code, docs, tests, and a runnable notebook.
What tinyjax is not
- A general-purpose array library (no image models, no encoder-decoder, no sparse ops).
- A production framework (no TPU, no full sharding, no cuDNN fused attention in v1).
- Trying to beat JAX on speed — targeting within 10–20 % of JAX on the same hardware is enough.
Start here
- New to training engines? Read
docs/00-what-is-a-training-engine.md. - Ready to walk through the whole thing? Follow
LEARNING_PATH.mdtop to bottom. - Ready to contribute? Read
CONTRIBUTING.mdfirst.
Install
tinyjax is a normal PEP 621 Python package. Once published on PyPI it will install with any standard tool.
Using uv (fast, recommended):
uv pip install tinyjax
Using pip:
python -m pip install tinyjax
For a local development checkout:
git clone https://github.com/gkatte/tinyjax
cd tinyjax
uv pip install -e ".[dev,docs]" # or: python -m pip install -e ".[dev,docs]"
pre-commit install
git config --local core.hooksPath .githooks
Requires Python >= 3.12. Runtime dependencies (numpy, ml_dtypes, jaxlib==0.10.2) are pulled automatically. See RELEASING.md for how releases are cut and docs/23-comparing-to-real-jax.md (lands with CH23) for why jaxlib is a pinned dependency.
Status
Under construction. The chapter roadmap lives in LEARNING_PATH.md; the currently-shipped chapters appear there with a check mark.
License
Metadata
Release files for tinyjax 0.1.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tinyjax-0.1.0.dev0.tar.gz | 21.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinyjax-0.1.0.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / tinyjax-0.1.0.dev0.tar.gz
| Download URL | tinyjax-0.1.0.dev0.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
288c7f939e109dadb1c54eae866aa19bf12908d885da7dd6a946c9ff0719fe19
|
|
BLAKE2b-256 checksum How to use checksums |
ab00c94fcdb2c42f02f4662576fa1819217a683ff177ab09d23660437a6c3408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 9, 2026.
Transparency logRelease files / tinyjax-0.1.0.dev0-py3-none-any.whl
| Download URL | tinyjax-0.1.0.dev0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2a4e359afdf6fc171bf7095744a1be4089553ff019097fc553335e50e1766f6
|
|
BLAKE2b-256 checksum How to use checksums |
a246fb47db6791e326773fee2fad95fa0f31fcd0b7394ac6cacbda0de823822f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 9, 2026.
Transparency logSecurity for tinyjax 0.1.0.dev0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tinyjax-0.1.0.dev0.tar.gz
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 Jul 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.