Metadata-Version: 2.4
Name: tynx
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Summary: A lightweight neural network runtime for inference and training
Keywords: onnx,machine-learning,neural-network,inference,training,burn
License-Expression: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Issues, https://github.com/blaind/tynx/issues
Project-URL: Repository, https://github.com/blaind/tynx

# tynx

**The ONNX runtime that trains.** Python bindings for [Tynx](https://github.com/blaind/tynx), a
lightweight neural network runtime built on [Burn](https://github.com/tracel-ai/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. What works in this release:

- eager tensors with autograd: arithmetic, matmul, activations, reductions, `backward()`,
  `.grad`, `no_grad()`;
- `Parameter` values for building trainable modules;
- loading ONNX models and inspecting their inputs and outputs.

Model execution from Python, NumPy interop, layers, and optimizers land in upcoming releases.
See the [repository](https://github.com/blaind/tynx) for the roadmap, benchmarks, and the Rust
API.

```python
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())

session = tynx.Session("model.onnx")
print(session.inputs, session.outputs)
```

## License

MIT or Apache-2.0, at your option.

