Our model is built in such a way that it learns about biological activity of molecules implicitly, from pairs of molecules used for training. It was known that transformer models can learn general rules of composition of relevant organic molecules without explicitly using information on their stability; here, we extend such an approach to generating biologically active molecules. This approach is not the only possible solution. As examples of alternatives, we can mention Ref , where a separate LSTM model was trained to prioritize SMILES coming from a generative model, and Ref , where a transformer model is trained to optimize logP and other easily computable properties (but not biological activity) of generated molecules. Note also that transfer learning or fine tuning of a generative chemical model on molecules active against the given target 8 is not necessary, as we show in this work. We could speculate that one of the reasons for success was the use of SELFIES to represent molecules in the input to and output from a transformer model, because nearly any SELFIES corresponds to a meaningful chemical structure. SMILES encoding is still more popular, but a random SMILES string is highly unlikely to represent a molecule, and special efforts have to be undertaken to train the model property. Interestingly, papers using SMILES representation in generative chemistry always have a separate section devoted to the demonstration of the validity of generated molecules. By contrast, SELFIES-based generative models do not have to learn formal grammar rules first. Only a small fraction of SELFIES generated by ML models in this work were chemically insensible, and the reasons for it were the following: generated SELFIES were empty strings; generated molecules contained non-flat multi-cycle aromatic systems; or generated molecules contained fragments (e.g., -O-O-F) hardly acceptable in drug molecules. However, such issues rarely occurred (less than 1% of all cases) and were all rejected by simple filters.