{"id":15284533,"url":"https://github.com/invrs-io/jeig","last_synced_at":"2025-12-30T02:12:04.210Z","repository":{"id":255214434,"uuid":"813717884","full_name":"mfschubert/jeig","owner":"mfschubert","description":"Faster eigendecompositions for jax","archived":false,"fork":false,"pushed_at":"2025-08-26T17:48:01.000Z","size":168,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-26T23:14:08.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfschubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-11T15:47:40.000Z","updated_at":"2025-08-26T17:47:53.000Z","dependencies_parsed_at":"2024-08-28T17:20:11.832Z","dependency_job_id":"a76ebd44-643b-4d14-b430-e59cb183c78e","html_url":"https://github.com/mfschubert/jeig","commit_stats":{"total_commits":28,"total_committers":3,"mean_commits":9.333333333333334,"dds":0.3214285714285714,"last_synced_commit":"0fa7210b8e2ad86e221032c4b07b08c54c66687c"},"previous_names":["mfschubert/jeig"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/mfschubert/jeig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Fjeig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Fjeig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Fjeig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Fjeig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfschubert","download_url":"https://codeload.github.com/mfschubert/jeig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Fjeig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231099,"owners_count":25245687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-30T14:58:05.411Z","updated_at":"2025-12-30T02:12:04.204Z","avatar_url":"https://github.com/mfschubert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jeig - Eigendecompositions wrapped for jax\n[![Continuous integration](https://github.com/invrs-io/jeig/actions/workflows/build-ci.yml/badge.svg)](https://github.com/invrs-io/jeig/actions)\n[![PyPI version](https://img.shields.io/pypi/v/jeig)](https://pypi.org/project/jeig/)\n\n## Overview\n\nThis package wraps eigendecompositions as provided by jax, cusolver, magma, numpy, scipy, and torch for use with jax. Depending upon your system and your versions of these packages, you may observe significant speed differences. The following were obtained using jax 0.8.0 on a system with 28-core Intel Xeon w7-3465X and NVIDIA RTX4090.\n\n![Speed comparison](https://github.com/invrs-io/jeig/blob/main/docs/speed.png?raw=true)\n\n## Install\njeig can be installed via pip,\n```\npip install jeig\n```\nThis will also install torch. If you only need torch for use with jeig, then the CPU-only version could be sufficient and you may wish to install manually as described in the [pytorch docs](https://pytorch.org/get-started/locally/).\n\n## Example usage\n\n```python\nimport jax\nimport jeig\n\nmatrix = jax.random.normal(jax.random.PRNGKey(0), (1, 2048, 2048)).astype(complex)\n\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"cusolver\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"lapack\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"magma\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"torch\"))\n```\n```\n1.31 s ± 43 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n5.44 s ± 379 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n11.1 s ± 937 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n4.93 s ± 92.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n```\n\nThe default torch backend has good performance when performing batched eigendecomposition on many-core CPUs.\n\n```python\nmatrix = jax.random.normal(jax.random.PRNGKey(0), (8, 2048, 2048)).astype(complex)\n\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"cusolver\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"lapack\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"magma\"))\n%timeit jax.block_until_ready(jeig.eig(matrix, backend=\"torch\"))\n```\n```\n10.4 s ± 116 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n48.1 s ± 6.74 s per loop (mean ± std. dev. of 7 runs, 1 loop each)\n1min 33s ± 1.49 s per loop (mean ± std. dev. of 7 runs, 1 loop each)\n7.18 s ± 91.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n```\n\n## Credit\nThe torch implementation of eigendecomposition is due to a [comment](https://github.com/google/jax/issues/10180#issuecomment-1092098074) by @YouJiacheng.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvrs-io%2Fjeig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvrs-io%2Fjeig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvrs-io%2Fjeig/lists"}