Heterogeneous execution planning for PyTorch on a single machine.
Profile → plan → simulate → compile → run across CPUs, GPUs, memory, and storage.
Install · Quick start · Benchmarks · When to use · Docs · Contributing
When a model approaches or exceeds accelerator memory, hand-written .to(device) maps and ad-hoc offload get fragile. TensorTorrent profiles the host, searches placements in a native Rust planner, simulates finalists, then compiles and runs the winner — trading PCIe/host bandwidth for capacity when that trade makes sense.
Benchmarks
Primarily aimed at models that approach or exceed accelerator memory. Small models that fit one GPU are usually faster in native PyTorch — planning/runtime overhead shows up there. Under memory pressure or beyond-VRAM, TensorTorrent can be competitive with host-offload runtimes.
Numbers below: RTX 3070 Ti Laptop (~7.66 GiB VRAM). Full tables, figures, raw JSON: benchmarks/evidence/ · methodology.
Qwen3-8B BF16 logits forward (seq_len=16, 16.38 GB params)
Fixed-shape forward only — not autoregressive generation.
| Approach | Median ms | Peak VRAM | Notes |
|---|---|---|---|
| GPU eager | — | — | infeasible (params > VRAM) |
| CPU eager | 4131 | 0 | ok |
| TensorTorrent auto | 1678 | 6.83 GB | transfer_evict · cosine 0.9997 · argmax 15/16 |
Accelerate (device_map=auto) |
1616 | 6.44 GB | tested config only |
DeepMLP 1.5× VRAM (12.35 GB params)
| Approach | Median ms | Peak VRAM | Notes |
|---|---|---|---|
| GPU eager | — | — | OOM |
| CPU eager | 446 | 0.08 GB | ok |
| TensorTorrent auto | 444 | 0.00 GB | chose CPU (direct_export_free) |
Accelerate (device_map=auto) |
807 | 5.38 GB | tested config only |
Fit-in-VRAM (native PyTorch wins)
| Workload | Eager ms | TensorTorrent ms | Peak VRAM |
|---|---|---|---|
| MLP 512×8 | 0.23 | 0.28 | 17 MB |
| Transformer 256 | 0.26 | 0.34 | 20 MB |
| MLP 2048×8 | 0.70 | 0.75 | 146 MB |
2× GPU / ROCm / XPU / autoregressive generation: SUPPORTED BUT UNMEASURED on this machine.
Install
pip install torch
pip install tensortorrent
Linux · Python 3.10–3.13 · PyTorch 2.4+. Source builds and CUDA/ROCm/XPU notes: Installation.
Quick start
import torch
import torch.nn as nn
import tensortorrent as tt
model = nn.Sequential(
nn.Linear(256, 1024),
nn.GELU(),
nn.Linear(1024, 256),
).eval()
x = torch.randn(32, 256)
compiled = tt.compile(model, example_inputs=(x,))
y = compiled(x)
torch.testing.assert_close(y, model(x), check_device=False)
print(compiled.explain())
Save/reload, objectives, and multi-module graphs: Quickstart.
When to use
Good fit: model does not fit one GPU · unequal devices · transfer cost matters · RAM/VRAM budgets · parameter streaming or activation spill · reproducible plans instead of hand-written device maps.
Not for: multi-node clusters · exhaustive placement search · “use every detected GPU” · replacing PyTorch kernels · treating discovery as production validation.
Full boundary: Product scope.
Docs
| Getting started | Install · Quickstart |
| Architecture | Overview · Planner · Runtime |
| Ops | Large models · Deployment · FAQ |
tensortorrent doctor
tensortorrent validate-hardware --output artifacts/validation_report.json
make check # from a source checkout
License
Apache License 2.0. See LICENSE.
TensorTorrent
Metadata
Release files for tensortorrent 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tensortorrent-0.3.4.tar.gz | 423.4 kB | With provenance | Details for tensortorrent-0.3.4.tar.gz |
Built distributions (wheels)
Total release size: 10.0 MB
Release files / tensortorrent-0.3.4.tar.gz
| Download URL | tensortorrent-0.3.4.tar.gz |
|---|---|
| Size | 423.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5daefb9980a8ac4bc049bb1065d3199bfbb2b832aa4ae751da0bfc145e2c43db
|
|
BLAKE2b-256 checksum How to use checksums |
9805376c47acd86d9074e498efc5dad0594dbf016eb907472ef3773d07edd89f
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tensortorrent-0.3.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d476a28a29cc90ac8363ece7835c480d958bff2079dfdbc9b50e2417969fc8c
|
|
BLAKE2b-256 checksum How to use checksums |
7a577e67397e1be8c4d7309e1ba0c1cefb431f11eb12008571eecf25dd88d7c5
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | tensortorrent-0.3.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
2e0da51fde84e885208f5000297817b7eb19fe0838873507b82344e6b7afcaf4
|
|
BLAKE2b-256 checksum How to use checksums |
1d7f724753105f2d2d7f68e59d94a6d62f0b75f34c2b702be3a8339e0ddac728
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tensortorrent-0.3.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2fd92c6303d1c841bcd25e68583098fe63eeef6bfdc003bee93c9fca192fe4a7
|
|
BLAKE2b-256 checksum How to use checksums |
4665c95be848c03e0619777c6ae4efa7119c7d5d1df328c05379e376da787149
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | tensortorrent-0.3.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
ae8fa1277a2836547720bd96941f9f0f91d080f7a620fe85d71d8ac8c95a7982
|
|
BLAKE2b-256 checksum How to use checksums |
f2d7488e5f992a9cc2a37f111b9e3e533c5d9094c572efd9089e5b0b17108cbf
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tensortorrent-0.3.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6c1e82dc29f7b9e5a3ef71a7165f3bc9e97c3d40ca1e1ee0362218efba6adb6b
|
|
BLAKE2b-256 checksum How to use checksums |
9b2d406d21c1cd063b9c30902f8384cb0e46d2477e99a366b9fb2dfff94aeedd
|
| 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 13, 2026.
Transparency logRelease files / tensortorrent-0.3.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | tensortorrent-0.3.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
80a3a333ac1dd6df0baab0dc1569347c4e2396e2db8cf3bdad389b671c618698
|
|
BLAKE2b-256 checksum How to use checksums |
7c88699d6ce54f121a19332a98ccd3c2e647626191cb2aeced8be44843f79ecc
|
| 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 13, 2026.
Transparency logSecurity for tensortorrent 0.3.4
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 7 files in this release have been uploaded with provenance metadata.
Attestation for tensortorrent-0.3.4.tar.gz
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 13, 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.