{"id":20623232,"url":"https://github.com/soskek/convolutional_seq2seq","last_synced_at":"2025-06-15T09:32:40.503Z","repository":{"id":113372414,"uuid":"92832142","full_name":"soskek/convolutional_seq2seq","owner":"soskek","description":"fairseq: Convolutional Sequence to Sequence Learning (Gehring et al. 2017) by Chainer","archived":false,"fork":false,"pushed_at":"2017-06-15T23:16:42.000Z","size":28,"stargazers_count":67,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T20:21:17.523Z","etag":null,"topics":["chainer","deep-learning","deep-neural-networks","machine-learning","seq2seq"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","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":"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}},"created_at":"2017-05-30T12:48:18.000Z","updated_at":"2025-02-23T11:47:03.000Z","dependencies_parsed_at":"2023-06-15T11:30:40.850Z","dependency_job_id":null,"html_url":"https://github.com/soskek/convolutional_seq2seq","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%2Fconvolutional_seq2seq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fconvolutional_seq2seq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fconvolutional_seq2seq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fconvolutional_seq2seq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soskek","download_url":"https://codeload.github.com/soskek/convolutional_seq2seq/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":["chainer","deep-learning","deep-neural-networks","machine-learning","seq2seq"],"created_at":"2024-11-16T12:26:25.246Z","updated_at":"2025-04-15T12:37:20.161Z","avatar_url":"https://github.com/soskek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Convolutional Sequence to Sequence Learning\n[Chainer](https://github.com/chainer/chainer/)-based Python implementation of a convolutional seq2seq model.\n\nThis is derived from Chainer's official [seq2seq example](https://github.com/chainer/chainer/tree/seq2seq-europal/examples/seq2seq).\n\nSee [Convolutional Sequence to Sequence Learning](https://arxiv.org/abs/1705.03122), Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, Yann N. Dauphin, arxiv, 2017. [blog post](https://code.facebook.com/posts/1978007565818999/a-%20novel-approach-to-neural-machine-translation/), [Torch code](https://github.com/facebookresearch/fairseq).\n\n## Requirement\n\n- Python 3.6.0+\n- [Chainer](https://github.com/chainer/chainer/) 2.0.0+ (this version is strictly required)\n- [numpy](https://github.com/numpy/numpy) 1.12.1+\n- [cupy](https://github.com/cupy/cupy) 1.0.0+ (if using gpu)\n- and their dependencies\n\n## Prepare Dataset\nYou can use any parallel corpus.  \nFor example, run `download_wmt.sh` which downloads and decompresses [training dataset](http://www.statmt.org/europarl/v7/fr-en.tgz) and [development dataset](http://www.statmt.org/wmt15/dev-v2.tgz) from [WMT](http://www.statmt.org/wmt15/translation-task.html#download)/[europal](http://www.statmt.org/europarl/) into your current directory. These files and their paths are set in training script `seq2seq.py` as default.\n\n## How to Run\n```\nPYTHONIOENCODING=utf-8 python -u seq2seq.py -g=0 -i DATA_DIR -o SAVE_DIR\n```\n\nDuring training, logs for loss, perplexity, word accuracy and time are printed at a certain internval, in addition to validation tests (perplexity and BLEU for generation) every half epoch. And also, generation test is performed and printed for checking training progress.\n\n### Arguments\n\n- `-g`: your gpu id. If cpu, set `-1`.\n- `-i DATA_DIR`, `-s SOURCE`, `-t TARGET`, `-svalid SVALID`, `-tvalid TVALID`:  \n  `DATA_DIR` directory needs to include a pair of training dataset `SOURCE` and `TARGET` with a pair of validation dataset `SVALID` and `TVALID`. Each pair should be parallell corpus with line-by-line sentence alignment.\n- `-o SAVE_DIR`: JSON log report file and a model snapshot will be saved in `SAVE_DIR` directory (if it does not exist, it will be automatically made).\n- `-e`: max epochs of training corpus.\n- `-b`: minibatch size.\n- `-u`: size of units and word embeddings.\n- `-l`: number of layers in both the encoder and the decoder.\n- `--source-vocab`: max size of vocabulary set of source language\n- `--target-vocab`: max size of vocabulary set of target language\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fconvolutional_seq2seq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoskek%2Fconvolutional_seq2seq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fconvolutional_seq2seq/lists"}