We trained a Machine Learning Force Field (MLFF) for Li 3 N using an on-the-fly method, as implemented in VASP . This method generates a training dataset by performing hybrid AIMD + MLMD simulations, with first-principles ab initio steps performed only when local environments that differ significantly from the set of environments already stored as training data are encountered. Newly encountered local environments, and their associated energies, forces, and stresses, are stored in the training dataset. This on-the-fly method has proven to be successful at predicting the melting points of Al, Si, Ge, Sn, and MgO , as well as the phase transitions in hybrid perovskites .