Sketched matrix decompositions for PyTorch
Project description
skerch
: Sketched matrix decompositions for PyTorch
skerch
is a Python package to compute diagonal decompositions (SVD, Hermitian Eigendecomposition) of linear operators via sketched methods.
- Built on top of PyTorch, with natural support for CPU and CUDA interoperability, and very few dependencies otherwise
- Works on matrices and matrix-free operators of potentially very large dimensionality
- Support for sketched measurements in a fully distributed fashion via HDF5 databases
See the documentation for more details.
Installation and basic usage
Install via:
pip install skerch
The sketched SVD of a linear operator op
can be then computed simply via:
q, u, s, vt, pt = ssvd(
op,
op_device=DEVICE,
op_dtype=DTYPE,
outer_dim=NUM_OUTER,
inner_dim=NUM_INNER,
)
Where q @ u @ diag(s) @ vt @ pt
approximates linop
and the number of outer and inner measurements for the sketch is specified.
See Getting Started, Examples, and API docs for more details.
Developers
Contributions are most welcome under this repo's LICENSE. Feel free to open an issue with bug reports, features requests, etc.
The documentation contains a For Developers section with useful guidelines to interact with this repo.
Project details
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
File details
Details for the file skerch-0.6.0.tar.gz
.
File metadata
- Download URL: skerch-0.6.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b068f2c9a6885a06edda827a49a996a1246bfaf2c9bc2acfc1c4c9827cc1f2 |
|
MD5 | ead895e933baf511559340fefb855a0f |
|
BLAKE2b-256 | 3bbcc9ed5d5378c65b1ca0ac781d8a62914ea800b5fd75b3d0fa476ecd806d4d |
File details
Details for the file skerch-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: skerch-0.6.0-py3-none-any.whl
- Upload date:
- Size: 60.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b8dfc2c6b217cfe3f19252db35a57f8fac672a1671fdb8e096fdd082b5c7b7 |
|
MD5 | dfcdc02dce49a20978bf4e5d69302512 |
|
BLAKE2b-256 | 86718f1a6c9652f3d3f447f7a1bd31935f70e28258760ee15fc115dd63321739 |