Skip to main content

Sketched matrix decompositions for PyTorch

Project description

Skerch Logo

skerch: Sketched matrix decompositions for PyTorch

Installation Documentation CI Coverage
PyPI - Downloads Documentation Status GitHub Actions Workflow Status Coverage Status

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

skerch-0.4.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

skerch-0.4.0-py3-none-any.whl (60.8 kB view details)

Uploaded Python 3

File details

Details for the file skerch-0.4.0.tar.gz.

File metadata

  • Download URL: skerch-0.4.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for skerch-0.4.0.tar.gz
Algorithm Hash digest
SHA256 473e4caa99cf0bcf99d5e1cb45041da82098f652aa0deb7f6a3124fc35ff666f
MD5 99ce63613f6c380ce4efafc93ff99263
BLAKE2b-256 7b94ea77a78f51a805a4683b5b8fe781735ef4f02a351fa275a98594850b8d89

See more details on using hashes here.

File details

Details for the file skerch-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: skerch-0.4.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

Hashes for skerch-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 421c6e851db5358f3611062b0e6fd2a88415bc3e4254296b75121f15605d21bf
MD5 91a66d57574abf68e6c29ee785b9805e
BLAKE2b-256 21401fcee44093cdf666fe1d170c64f15fa2b9a79c6641022f7406f54fb061e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page