{"id":20623234,"url":"https://github.com/soskek/efficient_softmax","last_synced_at":"2025-04-15T12:37:24.753Z","repository":{"id":113372552,"uuid":"106991049","full_name":"soskek/efficient_softmax","owner":"soskek","description":"BlackOut and Adaptive Softmax for language models by Chainer","archived":false,"fork":false,"pushed_at":"2017-10-20T05:00:55.000Z","size":45,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T20:21:18.270Z","etag":null,"topics":["adaptive-softmax","blackout","chainer","rnn-language-model","rnnlm","softmax"],"latest_commit_sha":null,"homepage":"","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/soskek.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":"2017-10-15T07:03:17.000Z","updated_at":"2024-07-10T15:07:22.000Z","dependencies_parsed_at":"2023-06-15T11:45:12.362Z","dependency_job_id":null,"html_url":"https://github.com/soskek/efficient_softmax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fefficient_softmax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fefficient_softmax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fefficient_softmax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fefficient_softmax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soskek","download_url":"https://codeload.github.com/soskek/efficient_softmax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072827,"owners_count":21208253,"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":["adaptive-softmax","blackout","chainer","rnn-language-model","rnnlm","softmax"],"created_at":"2024-11-16T12:26:25.345Z","updated_at":"2025-04-15T12:37:24.748Z","avatar_url":"https://github.com/soskek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Efficient Softmax Approximation\n\nImplementations of Blackout and Adaptive Softmax for efficiently calculating word distribution for language modeling of very large vocabularies.\n\nLSTM language models are derived from [rnnlm_chainer](https://github.com/soskek/rnnlm_chainer).\n\nAvailable output layers are as follows\n\n- Linear + softmax with cross entropy loss. A usual output layer.\n- `--share-embedding`: A variant using the word embedding matrix shared with the input layer for the output layer.\n- `--adaptive-softmax`: [Adaptive softmax](http://proceedings.mlr.press/v70/grave17a/grave17a.pdf)\n- `--blackout`: [BlackOut](https://arxiv.org/pdf/1511.06909.pdf) (BlackOut is not faster on GPU.)\n\n### Adaptive Softmax\n\n- Efficient softmax approximation for GPUs\n- Edouard Grave, Armand Joulin, Moustapha Cissé, David Grangier, Hervé Jégou, ICML 2017\n- [paper](http://proceedings.mlr.press/v70/grave17a/grave17a.pdf)\n- [authors' Lua code](https://github.com/facebookresearch/adaptive-softmax)\n\n### BlackOut\n\n- BlackOut: Speeding up Recurrent Neural Network Language Models With Very Large Vocabularies\n- Shihao Ji, S. V. N. Vishwanathan, Nadathur Satish, Michael J. Anderson, Pradeep Dubey, ICLR 2016\n- [paper](https://arxiv.org/pdf/1511.06909.pdf)\n- [authors' C++ code](https://github.com/IntelLabs/rnnlm)\n\n# How to Run\n\n```\npython -u train.py -g 0\n```\n\n## Datasets\n\n- PennTreeBank\n- Wikitext-2\n- Wikitext-103\n\nFor wikitext, run `prepare_wikitext.sh` for downloading the datasets.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fefficient_softmax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoskek%2Fefficient_softmax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fefficient_softmax/lists"}