Ab initio molecular dynamics (AIMD) simulations have become an important tool used in the construction of equations of state (EOS) tables for warm dense matter. Due to computational costs, only a limited number of system state conditions can be simulated, and the remaining EOS surface must be interpolated for use in radiation-hydrodynamic simulations of experiments. In this work, we develop a thermodynamically consistent EOS model that utilizes a physics-informed machine learning approach to implicitly learn the underlying Helmholtz free-energy from AIMD generated energies and pressures. The model, referred to as PIML-EOS, was trained and tested on warm dense polystyrene producing a fit within a 1% relative error for both energy and pressure and is shown to satisfy both the Maxwell and Gibbs–Duhem relations. In addition, we provide a path toward obtaining thermodynamic quantities, such as the total entropy and chemical potential (containing both ionic and electronic contributions), which are not available from current AIMD simulations.