{"id":19156223,"url":"https://github.com/kyegomez/localsoftmax","last_synced_at":"2025-05-07T07:40:49.674Z","repository":{"id":197120537,"uuid":"698042766","full_name":"kyegomez/LocalSoftmax","owner":"kyegomez","description":"My own implementation/experiments with a local softmax","archived":false,"fork":false,"pushed_at":"2024-03-11T16:55:40.000Z","size":221,"stargazers_count":6,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T20:16:53.894Z","etag":null,"topics":["artificial-intelligence","artificial-intelligence-algorithms","artificial-neural-networks","attention-mechanism","softmax","softmax-layer"],"latest_commit_sha":null,"homepage":"https://discord.gg/qUtxnK2NMf","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyegomez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["kyegomez"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-09-29T02:55:21.000Z","updated_at":"2024-07-01T23:08:16.000Z","dependencies_parsed_at":"2024-11-09T08:35:43.007Z","dependency_job_id":"2171fc13-b136-489e-ab74-94cbfeb1f61f","html_url":"https://github.com/kyegomez/LocalSoftmax","commit_stats":null,"previous_names":["kyegomez/localsoftmax"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Paper-Implementation-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLocalSoftmax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLocalSoftmax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLocalSoftmax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyegomez%2FLocalSoftmax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyegomez","download_url":"https://codeload.github.com/kyegomez/LocalSoftmax/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252835788,"owners_count":21811595,"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":["artificial-intelligence","artificial-intelligence-algorithms","artificial-neural-networks","attention-mechanism","softmax","softmax-layer"],"created_at":"2024-11-09T08:33:39.397Z","updated_at":"2025-05-07T07:40:49.652Z","avatar_url":"https://github.com/kyegomez.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"readme":"[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# LocalSoftmax\nLocal Softmax parallelize the softmax computation by splitting the tensor into smaller sub-tensors and applying the softmax function on each of these smaller tensors independently. In other words, we want to compute a \"local\" softmax on each chunk of the tensor, instead of on the entire tensor.\n\n# Appreciation\n* Lucidrains\n* Agorians\n\n\n\n# Install\n`pip install local-sfmx`\n\n\n## Usage\n```python\nimport torch\nfrom local_sfmx import local_softmax\n\ntensor = torch.rand(10, 5)\nresult = local_softmax(tensor, 2)\nprint(result)\n```\n\n# Algorithm\nfunction LocalSoftmax(tensor, num_chunks):\n    split tensors into `num_chunks` smaller tensors\n    for each smaller tensor:\n        apply standard softmax\n    concatenate the results\n    return concatenated tensor\n\n# License\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Flocalsoftmax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyegomez%2Flocalsoftmax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyegomez%2Flocalsoftmax/lists"}