On further testing, it seems that files used to create the dataset maybe the issue. I created a dataset by manually entering in the file names to be used for validation and test split. Any file which is not the default file used to create the dataset tends to throw OOM error. In other words only
train.de, val.de, train.en, val.en
are the files that can be loaded and trained on.
Lastly It doesn’t matter if we create the vocab or it’s created automatically with the creation of dataset.