Chemformer is based on the BART language model, which uses both the encoder and decoder stacks of the Transformer. This makes it very suitable for sequence-to-sequence tasks such as reaction prediction and molecular optimisation. The BART model can also easily be applied to discriminative tasks by using only the encoder stack.