Partial atomic charge assignment is of immense practical value to force field parametrization, molecular docking, and cheminformatics. Machine learning has emerged as a powerful tool for modeling chemistry at unprecedented computational speeds given accurate reference data. However, certain tasks, such as charge assignment, do not have a unique solution. Herein, we use a machine learning algorithm to discover a new charge assignment model by learning to replicate molecular dipole moments across a large, diverse set of nonequilibrium conformations of molecules containing C, H, N, and O atoms. The new model, called Affordable Charge Assignment (ACA), is computationally inexpensive and predicts dipoles of out-of-sample molecules accurately. Furthermore, dipole-inferred ACA charges are transferable to dipole and even quadrupole moments of much larger molecules than those used for training. We apply ACA to dynamical trajectories of biomolecules and produce their infrared spectra. Additionally, we find that ACA assigns similar charges to Charge Model 5 but with greatly reduced computational cost.