This document outlines the configuration parameters for training a sequence-to-sequence model for various tasks such as machine translation, text summarization, and more.
Make sure you have the following libraries installed:
- torch >= 1.0
- pandas
- scikit-learn (needed for heatmap plot using wandb)
- tqdm >= 4.0
- wandb = 0.14.0 (If you want to plot attention heatmap using wandb plots as in latest version heatmap functionality is depriciated)
- argparse
You can install these dependencies using pip:
!pip install wandb==0.14.0 scikit-learn
Description: Specifies the size of the input embedding vector.
Description: Specifies the number of layers in the encoder network.
Description: Specifies the number of layers in the decoder network.
Hidden Size : [128, 256, 512, 1024]
Description: Specifies the size of the hidden state in the RNN cells.
Description: Specifies the type of recurrent cell to be used in the encoder and decoder.
Description: Specifies whether the encoder is bidirectional or not.
Description: Specifies the number of training examples in each batch.
Description: Specifies the learning rate for training the model.
Description: Specifies the number of training epochs.
Description: Specifies the dropout probability for regularization.
Description: Specifies the probability of using teacher forcing during training.
Description: Specifies whether you want attention mechanism to be used in the model.
Description: Specifies whether You want to run Train and Validation Dataset or want to run on Train and Test Dataset.
-
After satisfying above mentioned dependencies you are now need to following steps for ipynb file to run.
-
in main_1() function which is present in last cell of ipynb file you have to add dataset folder aksharantar_sampled path and make sure this path is unzipped and not the zip file path.
-
in main_1() function which is present in last cell of ipynb file you can choose language of your choice in Folder_name parameter by passing folder name
-
in main_1() function you can choose mode parameter value to be 'Normal' if you want to use Train and Validation dataset only and if you want to choose Train and Test dataset then assign 'Test' to mode parameter.
-
After implementing above steps you can run ipynb file sequencially from top cell number 1 to last cell and you can see the results according to sweeep config.
-
Commentes are also applied in each cell code to understand the code flow.
-
After satisfying above dependencies you can choose values of hyper parameters and and you can run code by passing as command line .
-
Description of each hyper parameters also mentioned above so based on that you can modify following command to run train.py script.