Accelerating the inference of string generation-based chemical reaction models for industrial applications

Published: 17 Jun 2024, Last Modified: 16 Jul 2024ML4LMS PosterEveryoneRevisionsBibTeXCC BY-SA 4.0
Keywords: cheminformatics, reaction prediction, synthesis, transformers, efficient inference
TL;DR: We accelerate the inference of the SMILES-to-SMILES transformer by three times combining speculative decoding and chemical insights
Abstract: Template-free SMILES-to-SMILES translation models for reaction prediction and single-step retrosynthesis are of interest for industrial applications in computer-aided synthesis planning systems due to their state-of-the-art accuracy. However, they suffer from slow inference speed. We present a method to accelerate inference in autoregressive SMILES generators through speculative decoding by copying query string subsequences into target strings in the right places. We apply our method to the molecular transformer implemented in Pytorch Lightning and achieve over 3X faster inference in reaction prediction and single-step retrosynthesis.
Poster: pdf
Submission Number: 97
Loading