{"id":47713505,"url":"https://github.com/rashomon-gh/solu","last_synced_at":"2026-04-02T18:42:59.047Z","repository":{"id":338818304,"uuid":"1159306830","full_name":"rashomon-gh/solu","owner":"rashomon-gh","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-22T00:39:27.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-22T14:51:30.137Z","etag":null,"topics":["activation-function-exploration","deeplearning","mechanistic-interpretability","pytorch"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/softmax-linear-unit/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rashomon-gh.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":"2026-02-16T15:17:38.000Z","updated_at":"2026-03-22T00:39:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rashomon-gh/solu","commit_stats":null,"previous_names":["rashomon-gh/solu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rashomon-gh/solu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashomon-gh%2Fsolu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashomon-gh%2Fsolu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashomon-gh%2Fsolu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashomon-gh%2Fsolu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rashomon-gh","download_url":"https://codeload.github.com/rashomon-gh/solu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rashomon-gh%2Fsolu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["activation-function-exploration","deeplearning","mechanistic-interpretability","pytorch"],"created_at":"2026-04-02T18:42:54.967Z","updated_at":"2026-04-02T18:42:59.039Z","avatar_url":"https://github.com/rashomon-gh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SoLU - Softmax Linear Unit\n\nThis repository packages an implementation of Sofmax Linear Unit, as proposed in [Softmax Linear Units](https://transformer-circuits.pub/2022/solu/index.html#section-3-2).\n\n## Module Structure\n\n```\nSoLU -\u003e SoLU, SoLULayer\n```\n\n\n## Performance Penalty Mitigation\n\nThe original paper talks about a performance penalty with softmax linear unit which can be mitigated with an additional Layer Norm. This mitigation has been applied in the `SoLULayer` module in this package. The activation function itself is in the `SoLU` module. \n\n## Example Usage\n\n### Installation\n\n```bash\npip install softmax-linear-unit\n```\n\n### Code import\n\n\u003e [!NOTE]\n\u003e `SoLU` and `SoLULayer` are `torch.nn` modules and hence can be used in any pytorch model definition.\n\n\n```python\nimport torch\nfrom SoLU import SoLULayer, SoLU\n\n\n@torch.no_grad()\ndef main():\n    # batch_size=2, seq_len=5, hidden_dim=4\n    x = torch.randn(2, 5, 4)\n\n    # Initialize the layer (SoLU + LayerNorm)\n    solu_block = SoLULayer(hidden_size=4)\n\n    # Forward Pass\n    output = solu_block(x)\n    print(output)\n    print(output.size())\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n****You can also check `main.py`****\n\n\n## Local Dev\n\n### Env\n\n```bash\n# make sure to have uv installed\n# also python 3.12.11\n\nuv sync\nsource .venv/bin/activate\n```\n\n### Ruff and Pre-Commit\n\nBy default, `pre-commit` will run `ruff` formatting with the `--fix` flag.\n\n\n\u003e [!NOTE]\n\u003e The pre-commit configuration can be found in the `.pre-commit-config.yaml` file.\n\n```bash\npre-commit install\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashomon-gh%2Fsolu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frashomon-gh%2Fsolu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frashomon-gh%2Fsolu/lists"}