tynx
The ONNX runtime that trains. Python bindings for Tynx, a lightweight neural network runtime built on Burn.
Tynx loads ONNX models at runtime with no code generation step, runs on CPU and GPU through Burn backends, and is growing into a full eager training library with a PyTorch-shaped API.
This is an early alpha. The current training surface includes:
- eager float32 autograd plus int64 targets and boolean masks;
- authored
nnlayers, composable losses, SGD/Adam/AdamW, parameter groups, and checkpoints; - callable trainable ONNX models with stable parameters, multiple inputs/outputs, and structured trainability reports;
- Categorical and Normal distributions for deployed RL workloads;
- opt-in model and whole-training-step capture with native backward, optimizer, imported-model, and random-state replay;
- NumPy interchange and Flex CPU or WGPU execution from the same package.
The complete support table and differences from PyTorch/tinygrad are documented in the Python training API. Runnable examples cover authored training, imported fine-tuning, and captured PPO.
import tynx
x = tynx.Tensor([[1.0, 2.0], [3.0, 4.0]], requires_grad=True)
loss = (x @ x).sum()
loss.backward()
print(x.grad.tolist())
Opt-in capture records supported Tensor code on its first call and replays the graph wholly in Rust on matching calls. It may cover a forward or the complete backward/optimizer step:
@tynx.compile(fullgraph=True, static_argnames=("activation",))
def forward(x, activation="relu"):
return x.relu() if activation == "relu" else x.sigmoid()
The initial cache uses exact tensor signatures. Parameter value updates are read dynamically and do
not recompile; structural parameter changes and different declared static values select another
graph. Unsupported operations fall back for the whole function by default or raise with
fullgraph=True. Closure variables, globals, and arbitrary object attributes are frozen at trace
time, so changing values must be passed as Tensor inputs or declared static arguments.
Load an ONNX file for inference with Session, or request a slot-backed trainable model with
load(..., trainable="auto"):
session = tynx.Session("model.onnx")
print(session.inputs, session.outputs)
model = tynx.load("model.onnx", trainable="auto")
model.require_trainable()
License
MIT or Apache-2.0, at your option.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tynx-0.2.0-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: tynx-0.2.0-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 20.1 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b1c05abf6400a3c4cf1badbcf166c6bcf7e719e33ae700772e0f04bb826b34
|
|
| MD5 |
ce72a57b88ae20454d475afcdd24f0f1
|
|
| BLAKE2b-256 |
d5ace136702aada9acb57b96cef0add5697a2879cf4c72130f236ca3a89ddf58
|
Provenance
The following attestation bundles were made for tynx-0.2.0-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on blaind/tynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tynx-0.2.0-cp39-abi3-win_amd64.whl -
Subject digest:
90b1c05abf6400a3c4cf1badbcf166c6bcf7e719e33ae700772e0f04bb826b34 - Sigstore transparency entry: 2425490337
- Sigstore integration time:
-
Permalink:
blaind/tynx@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blaind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 18.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
592616fdef7ca31e8d30222466bec3753b1e347a5402fb228ee8e836f5663995
|
|
| MD5 |
f2b8d6e95bb054dfe49cc6f8eb9cec6f
|
|
| BLAKE2b-256 |
0c940039a7b8ce23cbc70395e91aebd2567e6ffff764da31ef7b640435ae9656
|
Provenance
The following attestation bundles were made for tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on blaind/tynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
592616fdef7ca31e8d30222466bec3753b1e347a5402fb228ee8e836f5663995 - Sigstore transparency entry: 2425490521
- Sigstore integration time:
-
Permalink:
blaind/tynx@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blaind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 17.3 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8965c02d8c2a3860fa70109a2e06e5e509ade8f5a50f8a363e4edec4fe386ecd
|
|
| MD5 |
e822cb70ddc8b5e473da6ba4a80ff779
|
|
| BLAKE2b-256 |
3623074b6ff2148ba43ad9d38d2ccc0d8034f1522c93a5b60b79e1f3d06bbd2a
|
Provenance
The following attestation bundles were made for tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on blaind/tynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
8965c02d8c2a3860fa70109a2e06e5e509ade8f5a50f8a363e4edec4fe386ecd - Sigstore transparency entry: 2425490421
- Sigstore integration time:
-
Permalink:
blaind/tynx@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blaind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 17.1 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56ebd43a0b08397b87a985e44faf403a5b8f0806a2585d4920cc1d27159194fd
|
|
| MD5 |
0b8378723537c8a57a993cc1903dba81
|
|
| BLAKE2b-256 |
281f463198adcee37cabab4c21e33538ae5847b5f1394dd93a7c426f14a78a69
|
Provenance
The following attestation bundles were made for tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on blaind/tynx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
56ebd43a0b08397b87a985e44faf403a5b8f0806a2585d4920cc1d27159194fd - Sigstore transparency entry: 2425490228
- Sigstore integration time:
-
Permalink:
blaind/tynx@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/blaind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7c88f5a25f43c862bb1f3cc142e22739e4f29a4b -
Trigger Event:
push
-
Statement type: