TensorStudio is a compact C++ tensor and autograd engine with a Python API for learning, experimentation, and lightweight ML workloads.
Project description
TensorStudio
TensorStudio is a compact C++ tensor and autograd engine with a Python API for learning, experimentation, and lightweight ML workloads.
TensorStudio is experimental v0.1.1 software. It is CPU-only, eager-only, and intentionally small enough to read and modify.
Install
From a source checkout:
python -m pip install -U pip
python -m pip install -e ".[dev]"
Build source and wheel distributions:
python -m build
Quickstart
import tensorstudio as ts
x = ts.tensor([[1.0, 2.0], [3.0, 4.0]])
y = ts.ones((2, 2))
print((x + y).tolist())
print((x @ y).numpy())
Autograd
import tensorstudio as ts
x = ts.tensor([1.0, 2.0, 3.0], requires_grad=True)
loss = ((x * x).sum())
loss.backward()
print(x.grad.tolist()) # [2.0, 4.0, 6.0]
Neural Networks
import tensorstudio as ts
from tensorstudio import nn, optim
model = nn.Sequential(nn.Linear(1, 8), nn.Tanh(), nn.Linear(8, 1))
optimizer = optim.SGD(model.parameters(), lr=0.05)
criterion = nn.MSELoss()
x = ts.tensor([[0.0], [1.0], [2.0], [3.0]])
y = ts.tensor([[1.0], [3.0], [5.0], [7.0]])
for _ in range(50):
optimizer.zero_grad()
loss = criterion(model(x), y)
loss.backward()
optimizer.step()
print(loss.item())
Development
python -m pip install -e ".[dev]"
pytest
ruff check .
mypy python/tensorstudio
python -m build
The native extension is built with CMake, pybind11, scikit-build-core, and C++20.
Documentation
The documentation lives in docs/ and is configured with MkDocs:
python -m pip install -e ".[docs]"
mkdocs serve
mkdocs build
The docs cover tensor semantics, broadcasting, NumPy interop, autograd, neural network modules, training loops, CPU backend details, benchmarks, development, publishing, and the project roadmap.
Publishing
Releases are intended to be built by GitHub Actions. The publish workflow uses
PyPI trusted publishing through pypa/gh-action-pypi-publish; do not commit PyPI
API tokens.
Current Limitations
- CPU backend only
- Eager execution only
- No CUDA kernels or mixed precision
- No graph compiler or distributed training
- Limited dtype casting and no advanced indexing
- No sparse tensors
- Pickle serialization is for trusted TensorStudio objects only
Roadmap
- CUDA backend
- Graph/JIT mode
- Convolution ops
- Dataset utilities
- Model zoo examples
- ONNX import/export
- Improved memory allocator
- SIMD kernels
- Multithreaded ops
License
TensorStudio is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tensorstudio-0.1.1.tar.gz.
File metadata
- Download URL: tensorstudio-0.1.1.tar.gz
- Upload date:
- Size: 37.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
221dbf89c266508e21dc903343afbd72431907cf74a6780a7d2fae041be65a87
|
|
| MD5 |
a2ad1b2be8770502a9e27ba38fda96fb
|
|
| BLAKE2b-256 |
fd51513870c7908b5ba69128ee123f3dbf8e927ab8d86b9be0e25f95f2bcdcbe
|
File details
Details for the file tensorstudio-0.1.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 184.2 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14544576c6914133e5f5a97f7b7eb84594b0ecd6d502ad59c7cd855a0ff65291
|
|
| MD5 |
073411085397a6cf7d837410237f772d
|
|
| BLAKE2b-256 |
d1119f7116af7d2a572e36ebba9f15f0a32dd86e8790070b0e36b3b3965e49fb
|
File details
Details for the file tensorstudio-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 218.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653f77028127b6b319e38b269787a5bdee1cc27155d6dc54bb12a5c8455b9771
|
|
| MD5 |
74ce7b9fa11cd70009e6e1557a0610b3
|
|
| BLAKE2b-256 |
23da9cdff0375eb037227101f8c669221dfb6224ffe8f4836e37a03a6d18d498
|
File details
Details for the file tensorstudio-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 161.2 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e3a3c27ac1cc790911d4956168ad5ced8e6ea8b29b54b9c8250d68a7f30f570
|
|
| MD5 |
4244e9efad7153ee839d910c541df28a
|
|
| BLAKE2b-256 |
e3ec6488738e5157d657829b41a47f31a34bdd1ec53ca38f7c275d6a0478b32d
|
File details
Details for the file tensorstudio-0.1.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 184.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7d8795b600e061c75eb368b0c75bb284342bc6279c43f30317e30fffc58647a
|
|
| MD5 |
7d682fde607e3d9662804dc44a34534e
|
|
| BLAKE2b-256 |
655bcfb84556d327c6a8bb68087241e8df4d51c441a4b273e1071c22be1d08f1
|
File details
Details for the file tensorstudio-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 218.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11915efdc48daed055cc028bfdfca26fcff89e7f58be35cdfde305801d5ba796
|
|
| MD5 |
e04c9fefffad78fb211aa4903022e035
|
|
| BLAKE2b-256 |
54cdb2e5a6506351612763ff6d68dbfd3cc63c04b3be22e84ba9910325968f60
|
File details
Details for the file tensorstudio-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 161.0 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9533ea37359c21307def412c24088faeb2ac8e92034469552c58f9a9a93e806c
|
|
| MD5 |
f8df5cb1041e6a0b2672c66d5429664c
|
|
| BLAKE2b-256 |
bad74984679d03c1920a7cbf5003fe059f9f055ac3b0c594bf3c70d928c392b6
|
File details
Details for the file tensorstudio-0.1.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 179.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da60ba7e42c65954ef55c5d6f0531945e4e25540b8bfee665fdf1b6ee74e30d5
|
|
| MD5 |
8256a10daa4dfe15b79a947c4bbc5de7
|
|
| BLAKE2b-256 |
9e9732e92b4e7084e9a3890f7606626b22aabd9cab5a5e4cc21020e5ce6dcdb6
|
File details
Details for the file tensorstudio-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 212.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01fd9e0cfa1801fed136be036770e27ecd97bf2fd965e9860e20d4925df9e188
|
|
| MD5 |
03e4564282090b604141b66ab0b5e581
|
|
| BLAKE2b-256 |
d22be06cacb52352790f591f14147addcabe6942afa5c037e6e44517319da1a8
|
File details
Details for the file tensorstudio-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 158.4 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2303c6f17b5b7f5e87573577f572aa28da242d37e92fecc224b3c5001798a064
|
|
| MD5 |
f167cb0d2579e281c2af32d733675ec2
|
|
| BLAKE2b-256 |
227985c1f138e03a95a3dc2b788bf382698fbe6574ca8d7ed270320d8f9c2454
|
File details
Details for the file tensorstudio-0.1.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 178.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc548ac91fe40b4036928585d9c82de25da206c3dd6403e142889310a42a7ce
|
|
| MD5 |
8872c2e5494ed98dddc3263f3471dda3
|
|
| BLAKE2b-256 |
e0eceb4772f1a8e5a9abcc2b1733800c70f538b8bd182339a1b9e8ac97698c4a
|
File details
Details for the file tensorstudio-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 211.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
508357f3aeffe121b9ab1a5e626ff22faffa4c5794923f9576b610961cced21b
|
|
| MD5 |
9966f2ffe586fb57bc710d0626cd5db7
|
|
| BLAKE2b-256 |
e114e6be03e835f22ba1c2317b0cc5e714d979967d202958d824c70b5f6372da
|
File details
Details for the file tensorstudio-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: tensorstudio-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 156.6 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72bbc9f4ee082c130422b4683c4da4818c8c54920526f608b5757a2854eac81a
|
|
| MD5 |
5729d8b9a5c2ea0d472f24fcbaa23545
|
|
| BLAKE2b-256 |
3dffa51d16813456dcead67e4401d3ff0c66fc4873529363d767329c1676e8ce
|