← Open Source
MaximumEntropy

Seq2Seq-PyTorch

Sequence to Sequence Models with PyTorch.

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
739
Stars
158
Forks
+0
This week
1
Contributors
Created 2017-01-23 · Updated 2026-09-07 · #14345 today
Top developers

MaximumEntropy/Seq2Seq-PyTorch is ranked 14,345 with 739 stars.

Same-category comparison

MaximumEntropy/Seq2Seq-PyTorch is ranked 14,345 among these 8 peers; tensorflow/io is ranked 14,344.

Same-category comparison
NameRankMetrics
Stable-Baselines-Team/stable-baselines3-contrib14,337
Language:
Python
Stars:
740
Forks:
244
Description:
Contrib package for Stable-Baselines3 - Experimental reinforcement learning (RL) code.
fill3d/fill14,340
Language:
TypeScript
Stars:
740
Forks:
42
Description:
Generative fill in 3D.
google-deepmind/alphadev14,341
Language:
Python
Stars:
740
Forks:
81
tensorflow/io14,344
Language:
C++
Stars:
740
Forks:
311
Description:
Dataset, streaming, and file system extensions maintained by TensorFlow SIG-IO.
lupantech/ScienceQA14,349
Language:
Python
Stars:
739
Forks:
68
Description:
Data and code for NeurIPS 2022 Paper "Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answering".
vita-epfl/CrowdNav14,361
Language:
Python
Stars:
738
Forks:
184
Description:
[ICRA] Crowd-aware Robot Navigation.
LuxDL/Lux.jl14,364
Language:
Julia
Stars:
737
Forks:
91
Description:
Elegant and Performant Deep Learning.
abacaj/fine-tune-mistral14,367
Language:
Python
Stars:
737
Forks:
63
Description:
Fine-tune mistral-7B on 3090s, a100s, h100s.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
Stars739
Forks158
Contributors1
Created date2017-01-23
Updated date2026-09-07
Stars in 1 day0
Stars in 7 days0
Rank14,345
Previous rank14,201
Rank change-144
7-day stars rank14,423
Previous 7-day stars rank14,433
7-day stars rank change10
Total stars rank14,241
Previous total stars rank14,212
Total stars rank change-29
CountryUSA
README summary

Sequence to Sequence models with PyTorch This repository contains implementations of Sequence to Sequence (Seq2Seq) models in PyTorch At present it has implementations for : Sequence to Sequence models A vanilla sequence to sequence model presented in consits of using a recurrent neural network such as an LSTM ( or GRU ( to encode a sequence of words or characters in a *source* language into a fixed length vector representation and then deocoding from that representation using another RNN in the *target* language

. An extension of sequence to sequence models that incorporate an attention mechanism was presented in that uses information from the RNN hidden states in the source language at each time step in the deocder RNN. This attention mechanism significantly improves performance on tasks like machine translation. A few variants of the attention model for the task of machine translation have been presented in The repository also contains a simpler and faster variant of the attention mechanism that doesn't attend over

the hidden states of the encoder at each time step in the deocder. Instead, it computes the a single batched dot product between all the hidden states of the decoder and encoder once after the decoder has processed all inputs in the target. This however comes at a minor cost in model performance. One advantage of this model is that it is possible to use the cuDNN LSTM in the attention based decoder as well since the attention is computed

after running through all the inputs in the decoder. Results on English - French WMT14 The following presents the model architecture and results obtained when training on the WMT14 English - French dataset. The training data is the english-french bitext from Europral-v7. 82 | 2h 50min | | Seq2Seq FastAttention | 18. 89 | 3h 45min | | Seq2Seq Attention | 22. 60 | 4h 47min | Times reported are using a Pre 2016 Nvidia GeForce Titan X Running To run, edit the config file and execute python nmt.

Frequently asked questions

How many stars and forks are recorded?

MaximumEntropy/Seq2Seq-PyTorch has 739 stars and 158 forks.

What is the repository rank?

MaximumEntropy/Seq2Seq-PyTorch is ranked 14,345.

What language and category are recorded?

MaximumEntropy/Seq2Seq-PyTorch has 739 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

MaximumEntropy/Seq2Seq-PyTorch is compared with tensorflow/io, ranked 14,344 with 740 stars.

README

Sequence to Sequence models with PyTorch

This repository contains implementations of Sequence to Sequence (Seq2Seq) models in PyTorch

At present it has implementations for :

* Vanilla Sequence to Sequence models

* Attention based Sequence to Sequence models from https://arxiv.org/abs/1409.0473 and https://arxiv.org/abs/1508.04025

* Faster attention mechanisms using dot products between the **final** encoder and decoder hidden states

* Sequence to Sequence autoencoders (experimental)

Sequence to Sequence models

A vanilla sequence to sequence model presented in https://arxiv.org/abs/1409.3215, https://arxiv.org/abs/1406.1078 consits of using a recurrent neural network such as an LSTM (http://dl.acm.org/citation.cfm?id=1246450) or GRU (https://arxiv.org/abs/1412.3555) to encode a sequence of words or characters in a source language into a fixed length vector representation and then deocoding from that representation using another RNN in the target language.

An extension of sequence to sequence models that incorporate an attention mechanism was presented in https://arxiv.org/abs/1409.0473 that uses information from the RNN hidden states in the source language at each time step in the deocder RNN. This attention mechanism significantly improves performance on tasks like machine translation. A few variants of the attention model for the task of machine translation have been presented in https://arxiv.org/abs/1508.04025.

The repository also contains a simpler and faster variant of the attention mechanism that doesn't attend over the hidden states of the encoder at each time step in the deocder. Instead, it computes the a single batched dot product between all the hidden states of the decoder and encoder once after the decoder has processed all inputs in the target. This however comes at a minor cost in model performance. One advantage of this model is that it is possible to use the cuDNN LSTM in the attention based decoder as well since the attention is computed after running through all the inputs in the decoder.

Results on English - French WMT14

The following presents the model architecture and results obtained when training on the WMT14 English - French dataset. The training data is the english-french bitext from Europral-v7. The validation dataset is newstest2011

The model was trained with following configuration

* Source and target word embedding dimensions - 512

* Source and target LSTM hidden dimensions - 1024

* Encoder - 2 Layer Bidirectional LSTM

* Decoder - 1 Layer LSTM

* Optimization - ADAM with a learning rate of 0.0001 and batch size of 80

* Decoding - Greedy decoding (argmax)
Model BLEU Train Time Per Epoch
Seq2Seq 11.82 2h 50min
Seq2Seq FastAttention 18.89 3h 45min
Seq2Seq Attention 22.60 4h 47min

Times reported are using a Pre 2016 Nvidia GeForce Titan X

Running

To run, edit the config file and execute python nmt.py --config

NOTE: This only runs on a GPU for now.

Nearby in the ranking
Similar items