Holographic MIMO (HMIMO) is a promising technique for large-scale MIMO systems to enhance spectral efficiency while maintaining low hardware cost and power consumption. Existing alternating optimization algorithms can effectively optimize the hybrid beamforming of HMIMO to improve the system performance, while their high computational complexity hinders real-time application. In this paper, we propose a model-based deep neural network (MB-DNN), which leverages permutation equivalent properties and the optimal beamforming structure to jointly optimize the holographic and digital beamforming. Simulation results demonstrate that the proposed MB-DNN outperforms benchmark schemes and requires much less inference time than existing alternating optimization algorithms.