advanced multipolar polarizable potentials. The potential functions defined in DMFF are easy to be extended and recombined to form new advanced force fields. The implementation of forces and virial tensors can be largely simplified, so the MD validation of complex force fields can be performed with much less efforts. Based on the differentiable force field engine, a variety of object functions can be used for force field optimization, including energies, forces, and macroscopic properties such as free energies and ensemble averaged quantities. It is demonstrated that using DMFF, both bottom-up and top-down force field optimizations can be performed in an automatic fashion. Parameters can be obtained with better performances in both bulk organic liquid simulations and FEP calculations. Therefore, DMFF serves as an excellent tool for the development of next-generation molecular force fields.