Machine performance modeling and optimization have emerged as crucial steps for process enhancement and efficiency. This study explored machine learning to model and optimize the cassava grating chamber of cassava grater for the quality production of gari. This domain remains unexplored thus far. A total of 196 graters were studied. Key variables studied included tooth diameter (TD), tooth height (TH), inter-tooth spacing (ITS), drum speed (DS), clearance (C), and moisture content of cassava (MC). Geometric mean diameter (GMD) represented mash quality. Feature importance rankings emphasized TH (0.488784), C (0.243284), TD (0.112682), ITS (0.103547), DS (0.036261), and MC (0.015442) in determining particle size (GMD) of grated mash. Machine learning models efficiently interpreted these attributes, including gradient boost regressor, linear regression, neural network, and random forest. The gradient boost regressor was the best predictive model, achieving 95.34% accuracy, RMSE (0.3291), and MAE (0.2303). The study provides a GMD predictive equation and optimized parameters for specific gari size production, offering valuable insights for tailored machinery in the cassava grating activity.