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.
Metadata
Release files for tynx 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| tynx-0.2.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for tynx-0.2.0-cp39-abi3-win_amd64.whl |
| tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details for tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl |
| tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details for tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl |
| tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
Total release size: 73.2 MB
Release files / tynx-0.2.0-cp39-abi3-win_amd64.whl
| Download URL | tynx-0.2.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 20.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
90b1c05abf6400a3c4cf1badbcf166c6bcf7e719e33ae700772e0f04bb826b34
|
|
BLAKE2b-256 checksum How to use checksums |
d5ace136702aada9acb57b96cef0add5697a2879cf4c72130f236ca3a89ddf58
|
| 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 Aug 11, 2026.
Transparency logRelease files / tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.7 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
592616fdef7ca31e8d30222466bec3753b1e347a5402fb228ee8e836f5663995
|
|
BLAKE2b-256 checksum How to use checksums |
0c940039a7b8ce23cbc70395e91aebd2567e6ffff764da31ef7b640435ae9656
|
| 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 Aug 11, 2026.
Transparency logRelease files / tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 17.3 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8965c02d8c2a3860fa70109a2e06e5e509ade8f5a50f8a363e4edec4fe386ecd
|
|
BLAKE2b-256 checksum How to use checksums |
3623074b6ff2148ba43ad9d38d2ccc0d8034f1522c93a5b60b79e1f3d06bbd2a
|
| 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 Aug 11, 2026.
Transparency logRelease files / tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 17.1 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
56ebd43a0b08397b87a985e44faf403a5b8f0806a2585d4920cc1d27159194fd
|
|
BLAKE2b-256 checksum How to use checksums |
281f463198adcee37cabab4c21e33538ae5847b5f1394dd93a7c426f14a78a69
|
| 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 Aug 11, 2026.
Transparency logSecurity for tynx 0.2.0
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 4 files in this release have been uploaded with provenance metadata.
Attestation for tynx-0.2.0-cp39-abi3-win_amd64.whl
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 Aug 11, 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.