GPU-accelerated intrinsic dimension estimators in PyTorch (port of scikit-dimension).
Project description
torchid
GPU-accelerated intrinsic dimension estimators in PyTorch. A port of scikit-dimension with batched/vectorized implementations and CUDA support.
Status: in-progress port. See CHECKLIST.md for progress.
Why
scikit-dimension is the reference library for intrinsic dimension (ID) estimation but
is CPU-only and relies heavily on per-point Python loops. torchid re-implements every
estimator using batched torch ops so the same methods run 10–200× faster on GPU while
producing outputs that match the reference library within documented tolerances.
Install
pip install torchid
For a CUDA-capable install, pick the PyTorch wheel that matches your driver, e.g.:
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install torchid
For running parity tests against scikit-dimension from a clone:
uv sync --group validation
Usage
import torch
from torchid.estimators import lPCA
X = torch.randn(10_000, 50, device="cuda")
est = lPCA().fit(X)
print(est.dimension_)
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 Distribution
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 torchid-0.1.0.tar.gz.
File metadata
- Download URL: torchid-0.1.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffd192a6c11f2cb8a4db7f455ee6cecd8fa7328a05b32dda30bbce6c23e8fdcc
|
|
| MD5 |
aeb9ad7d21a9420bb606c13ff031d764
|
|
| BLAKE2b-256 |
a2b7c2d5ef0300edf83fe20750f324df15b94ba9190cb749ecf4c06ea82d57ea
|
File details
Details for the file torchid-0.1.0-py3-none-any.whl.
File metadata
- Download URL: torchid-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa259813ce55eebb0eedf868f127a28a9064e35c7fb04d09204d6ac686e00b97
|
|
| MD5 |
70f790c640a28a0fe2849e2858502dad
|
|
| BLAKE2b-256 |
a75f2773b027ea069a6347c76c7ab6e2fe344d2b6ac83918937cdd19e63c725a
|