Which environment are you using, GPU or?
I tried transformer, may be you need to use some data structure to compress the input data, I am looking for such data structure e.g., dictionary, any update from you will be appreciated.