{"id":13446307,"url":"https://github.com/kostyaev/sentence2vec","last_synced_at":"2025-03-21T06:31:07.029Z","repository":{"id":75108351,"uuid":"59758037","full_name":"kostyaev/sentence2vec","owner":"kostyaev","description":"Deep sentence embedding using Sequence to Sequence learning","archived":false,"fork":false,"pushed_at":"2017-01-04T10:11:07.000Z","size":105,"stargazers_count":22,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T09:53:43.560Z","etag":null,"topics":["cuda","sentence2vec","seq2seq","torch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/kostyaev.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}},"created_at":"2016-05-26T14:42:23.000Z","updated_at":"2023-08-20T09:34:35.000Z","dependencies_parsed_at":"2023-06-05T08:45:15.530Z","dependency_job_id":null,"html_url":"https://github.com/kostyaev/sentence2vec","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/kostyaev%2Fsentence2vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostyaev%2Fsentence2vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostyaev%2Fsentence2vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostyaev%2Fsentence2vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostyaev","download_url":"https://codeload.github.com/kostyaev/sentence2vec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244750587,"owners_count":20504087,"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":["cuda","sentence2vec","seq2seq","torch"],"created_at":"2024-07-31T05:00:50.969Z","updated_at":"2025-03-21T06:31:06.709Z","avatar_url":"https://github.com/kostyaev.png","language":"Jupyter Notebook","funding_links":[],"categories":["Papers","Model Zoo"],"sub_categories":["Recurrent Networks"],"readme":"#  Deep sentence embedding using Sequence to Sequence learning\n\n![screenshot](images/2d_pca_projection.png)\n\n## Installing\n\n1. [Install Torch](http://torch.ch/docs/getting-started.html).\n2. Install the following additional Lua libs:\n\n   ```sh\n   luarocks install nn\n   luarocks install rnn\n   luarocks install penlight\n   ```\n   \n   To train with CUDA install the latest CUDA drivers, toolkit and run:\n\n   ```sh\n   luarocks install cutorch\n   luarocks install cunn\n   ```\n   \n   To train with opencl install the lastest Opencl torch lib:\n\n   ```sh\n   luarocks install cltorch\n   luarocks install clnn\n   ```\n\n3. Download the [Cornell Movie-Dialogs Corpus](http://www.mpi-sws.org/~cristian/Cornell_Movie-Dialogs_Corpus.html) and extract all the files into data/cornell_movie_dialogs.\n\n## Training\n\n```sh\nth train.lua [-h / options]\n```\n\nUse the `--dataset NUMBER` option to control the size of the dataset. Training on the full dataset takes about 5h for a single epoch.\n\nThe model will be saved to `data/model.t7` after each epoch if it has improved (error decreased).\n\n## Getting a pretrained model\nDownload:\n\n1. The pretraned [model.t7](https://drive.google.com/file/d/0BwsDa5L6bdMpTC1GUEtPbWE2Zms/view?usp=sharing)\n2. Vocabulary [vocab.t7](https://drive.google.com/file/d/0BwsDa5L6bdMpQV9zOTRhZlNPWG8/view?usp=sharing)\n\nPut them into the `data` directory.\n\n## Extracting embeddings from sentences\nRun the following command\n```sh\nth -i extract_embeddings.lua --model_file data/model.t7 --input_file data/test_sentences.txt --output_file data/embeddings.t7 --cuda\n```\n\nTo visualize 2D projections of the embeddings refer to: [example.ipynb](https://github.com/kostyaev/sentence2vec/blob/master/example.ipynb)\n\n## Acknowledgments\nThis implementation utilizes code from [Marc-André Cournoyer's repo](https://github.com/macournoyer/neuralconvo)\n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostyaev%2Fsentence2vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostyaev%2Fsentence2vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostyaev%2Fsentence2vec/lists"}