A new volume-preserving transformer neural network architecture is introduced to accurately learn the dynamics of systems described by divergence-free vector fields.