Artificial neural network (ANN) and random forest models for predicting rumen fill of cattle and sheep were developed. Data on rumen fill were collected from studies that reported body weights, measured rumen fill, and stated diets fed to animals. Animal and feed factors that affected rumen fill were identified from each study and used to create a dataset. These factors were used as input variables for predicting the weight of rumen fill. For ANN modelling, a three-layer Levenberg–Marquardt back-propagation neural network was adopted and achieved 96% accuracy in prediction of the weight of rumen fill. The precision of the ANN model’s prediction of rumen fill was higher for cattle (80%) than sheep (56%). On validation, the ANN model achieved 95% accuracy in prediction of the weight of rumen fill. A random forest model was trained using a binary tree-based machine-learning algorithm and achieved 87% accuracy in prediction of rumen fill. The random forest model achieved 16% (cattle) and 57% (sheep) accuracy in validation of the prediction of rumen fill. In conclusion, the ANN model gave better predictions of rumen fill compared with the random forest model and should be used in predicting rumen fill of cattle and sheep.