Transformer-based simulation of viscoelastic fluids