cd /news/machine-learning/show-hn-tynx-train-onnx-models-with-… Β· home β€Ί topics β€Ί machine-learning β€Ί article
[ARTICLE Β· art-93120] src=github.com β†— pub= topic=machine-learning verified=true sentiment=Β· neutral

Show HN: Tynx - train ONNX models with a PyTorch-shaped API (<20 MB whl)

Tynx, a new ONNX runtime with a PyTorch-shaped API for inference and training, has been released as a Python package under 20 MB. Written in Rust, it uses Burn/CubeCL and wgpu for GPU execution across operating systems and GPUs without extra libraries, and can compile to the browser. The project is early-stage, seeking feedback and use cases.

read1 min views1 publishedAug 12, 2026

Tynx is a small, self-contained ONNX runtime with a PyTorch-shaped API for inference and training.

The .whl is less than 20MB. GPU execution uses Burn/CubeCL + wgpu enabling it to run across OSes and GPUs, without requiring any extra libraries.

    $ pip install tynx

And API

    import tynx as tx
    model = tx.nn.Sequential(
      tx.nn.Linear(8, 16), 
      tx.nn.ReLU(), 
      tx.nn.Linear(16, 2)
    )

    optimizer = tx.optim.Adam(model.parameters(), lr=1e-3)

    loss = tx.nn.functional.cross_entropy(model(x), target)
    loss.backward()
    optimizer.step()

The runtime is written in Rust, and also can compile to the browser(PoC done).It’s early, I'd love for feedback and possible use cases & API expansion where this could be beneficial.

Comments URL: https://news.ycombinator.com/item?id=49268144

Points: 1

── more in #machine-learning 4 stories Β· sorted by recency
── more on @tynx 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-tynx-train-o…] indexed:0 read:1min 2026-08-12 Β· β€”