Accurate electricity demand forecasting is crucial for ensuring the sustainability and reliability of power systems. Least square support vector machines (LSSVM) are well suited to handle complex non-linear power load series. However, the less optimal regularization parameter and the Gaussian kernel function in the LSSVM model have contributed to flawed forecasting accuracy and random generalization ability. Thus, these parameters of LSSVM need to be chosen appropriately using intelligent optimization algorithms. This study proposes a new hybrid model based on the LSSVM optimized by the improved bacterial foraging optimization algorithm (IBFOA) for forecasting the short-term daily electricity load in Peninsular Malaysia. The IBFOA based on the sine cosine equation addresses the limitations of fixed chemotaxis constants in the original bacterial foraging optimization algorithm (BFOA), enhancing its exploration and exploitation capabilities. Finally, the load forecasting model based on LSSVM-IBFOA is constructed using mean absolute percentage error (MAPE) as the objective function. The comparative analysis demonstrates the model, achieving the highest determination coefficient (R2) of 0.9880 and significantly reducing the average MAPE value by 28.36%, 27.72%, and 5.47% compared to the deep neural network (DNN), LSSVM, and LSSVM-BFOA, respectively. Additionally, IBFOA exhibits faster convergence times compared to BFOA, highlighting the practicality of LSSVM-IBFOA for short-term load forecasting.