Transformer models are gauge invariant: A mathematical connection between AI and particle physics