tensi sees your tensors, and now you do too!
Hover any PyTorch tensor and see its shape, with named dimensions.
Install
Command line and CI: uv add --dev tensi-shapes (or pip install tensi-shapes).
tensi peek model.py # every tensor's shape
tensi check src/ # shape errors; exits 1 if any
What you annotate
tensi works most shapes out on its own: from b, t = idx.size(), from callers in the same file,
from einops patterns and layer sizes. What it can't see is the shape of data arriving from outside
the file, so it tells you exactly which inputs need one annotation, and what to write:
from jaxtyping import Shaped
def forward(self, idx: Shaped[torch.Tensor, "batch seq"]):
- One name per dimension, in order. A size name from
__init__(liken_embd) links that axis to the layer sizes, a number fixes a size, any other name is a new size. - In VS Code each such input has a blue hint with the line to write and a quick fix (Ctrl+. /
Cmd+.) that writes it, or annotates every input in the file at once; the status bar counts them,
and hovering a tensor with no shape says which input it depends on.
tensi peeklists the same. - No jaxtyping in your project? The quick fix imports it under
if TYPE_CHECKING:, so your code runs without it.Float,IntandBoolwork as well asShaped.
tensi says when a newer release is out and how to install it (checked at most once a day, never in CI; TENSI_NO_UPDATE_CHECK=1 turns it off).
Built on Pyrefly :)
Metadata
Release files for tensi-shapes 0.3.6
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 |
|---|---|---|---|---|
| tensi_shapes-0.3.6.tar.gz | 112.0 kB | With provenance | Details for tensi_shapes-0.3.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tensi_shapes-0.3.6-py3-none-any.whl | Python 3 | none | any | Details for tensi_shapes-0.3.6-py3-none-any.whl |
Total release size: 210.8 kB
Release files / tensi_shapes-0.3.6.tar.gz
| Download URL | tensi_shapes-0.3.6.tar.gz |
|---|---|
| Size | 112.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c192814c7d5571936c955b6d7f53b2727a00a924b9f7c98e720c6faf3eef5305
|
|
BLAKE2b-256 checksum How to use checksums |
2f368de9e3ba80e690a4467c2bac163b6f1bf1be715075ad57372fefecb88023
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / tensi_shapes-0.3.6-py3-none-any.whl
| Download URL | tensi_shapes-0.3.6-py3-none-any.whl |
|---|---|
| Size | 98.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94fb681e1e045443828d70e0c67c00814d9c0fdacc958056319293445728263d
|
|
BLAKE2b-256 checksum How to use checksums |
dfcff13d541a15996d20dcb6340bb7be1d4e92d363bd5a126796762b5314db05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for tensi-shapes 0.3.6
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
Both files in this release have been uploaded with provenance metadata.
Attestation for tensi_shapes-0.3.6.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 Nov 23, 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.