Skip to main content

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 nn layers, 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tynx-0.2.0-cp39-abi3-win_amd64.whl (20.1 MB view details)

Uploaded CPython 3.9+Windows x86-64

tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl (18.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl (17.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ ARM64

tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl (17.1 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

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

Hashes for tynx-0.2.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 90b1c05abf6400a3c4cf1badbcf166c6bcf7e719e33ae700772e0f04bb826b34
MD5 ce72a57b88ae20454d475afcdd24f0f1
BLAKE2b-256 d5ace136702aada9acb57b96cef0add5697a2879cf4c72130f236ca3a89ddf58

See more details on using hashes here.

Provenance

The following attestation bundles were made for tynx-0.2.0-cp39-abi3-win_amd64.whl:

Publisher: release.yml on blaind/tynx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tynx-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 592616fdef7ca31e8d30222466bec3753b1e347a5402fb228ee8e836f5663995
MD5 f2b8d6e95bb054dfe49cc6f8eb9cec6f
BLAKE2b-256 0c940039a7b8ce23cbc70395e91aebd2567e6ffff764da31ef7b640435ae9656

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tynx-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8965c02d8c2a3860fa70109a2e06e5e509ade8f5a50f8a363e4edec4fe386ecd
MD5 e822cb70ddc8b5e473da6ba4a80ff779
BLAKE2b-256 3623074b6ff2148ba43ad9d38d2ccc0d8034f1522c93a5b60b79e1f3d06bbd2a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tynx-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56ebd43a0b08397b87a985e44faf403a5b8f0806a2585d4920cc1d27159194fd
MD5 0b8378723537c8a57a993cc1903dba81
BLAKE2b-256 281f463198adcee37cabab4c21e33538ae5847b5f1394dd93a7c426f14a78a69

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

4 files

0.1.0

3 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page