A computer-implemented method for training a machine learning model for text generation, the method comprising:
- inputting text into the machine learning model;
- preprocessing the input text to obtain a plurality of character vector representations;
- encoding, using an encoder, each of the plurality of character vector representations to obtain a plurality of word vector representations;
- generating, using a backbone model, a plurality of predictive word vector representations based on the plurality of word vector representations;
- decoding, using a decoder, the plurality of predictive word vector representations to obtain a plurality of character-probabilities;
- and
- updating the machine learning model based the plurality of character-probabilities.