{"id":18421941,"url":"https://github.com/spcl/sten","last_synced_at":"2025-09-08T10:32:42.804Z","repository":{"id":41185306,"uuid":"502200365","full_name":"spcl/sten","owner":"spcl","description":"Sparsity support for PyTorch","archived":false,"fork":false,"pushed_at":"2024-12-03T16:20:00.000Z","size":336,"stargazers_count":33,"open_issues_count":2,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-26T23:05:11.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spcl.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-06-10T22:54:54.000Z","updated_at":"2024-12-03T16:25:09.000Z","dependencies_parsed_at":"2024-11-06T04:29:12.836Z","dependency_job_id":"53e1cf06-750f-4a26-9d62-50ad6a99cef8","html_url":"https://github.com/spcl/sten","commit_stats":{"total_commits":73,"total_committers":4,"mean_commits":18.25,"dds":0.547945205479452,"last_synced_commit":"bcca4d9026a6ec377bca63d19ad9323c7f628997"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fsten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fsten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fsten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fsten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spcl","download_url":"https://codeload.github.com/spcl/sten/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232302271,"owners_count":18502114,"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","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-11-06T04:27:23.770Z","updated_at":"2025-01-03T06:47:01.998Z","avatar_url":"https://github.com/spcl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STen: An Interface for Efficient Sparsity in PyTorch\n\nSTen aims to solve the following questions that remained unanswered in the current implementation ([torch.sparse](https://pytorch.org/docs/1.11/sparse.html)) of sparsity in PyTorch 1.11.\n\n* How to incorporate a sparsifying strategy in the model and use it in runtime?​\n* How to keep sparsity level the same during training?​\n* How to enable full autograd support​?\n* How to enable custom sparse formats and operator implementations?\n\n## Examples\n\n* Check [build_from_scratch.ipynb](examples/build_from_scratch.ipynb) to see the example use of interface to build PyTorch module from scratch.\n* Check [modify_existing.ipynb](examples/modify_existing.ipynb) to see the example of converting existing dense PyTorch module to sparse.\n* Check [custom_implementations.ipynb](examples/custom_implementations.ipynb) to see the example of registering custom implementations for sparsifiers and operators that match specific formats of input and output tensors.\n\n## Quick start\n\n```\ngit clone https://github.com/spcl/sten.git\ncd sten\npython -m venv venv\nsource venv/bin/activate\npip install .\npython tests/test_api.py\n```\n\n## Installation\n\n```\npip install sten\n```\n\n## Code organization\n\nThe core implementation is located in [sten.py](src/sten/sten.py). Jupyter notebook examples are located in [examples](examples) directory. Even more examples can be found in form of tests in [tests](tests) directory. Tests can be run by calling `pytest` in the project root.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fsten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspcl%2Fsten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fsten/lists"}