Transformer-based acceleration for near-field 3D simulation of optical beams from silicon photonic gratings | Synapse