Maths behind Generative AI