Precise and rapid simulation of a material's mechanical response is crucial in engineering. Conventional numerical schemes, such as finite element methods, face computational hurdles due to the intricate analysis required for path-dependent elastoplastic behavior. Accurately computing mechanical behavior under continuous loading necessitates tracking yield surface evolution through iterative mapping algorithms. This study introduces a short sequence machine learning approach to quickly predict the constitutive behavior of sandy materials and obtain the mechanical response of engineering materials under continuous loading. Initially, advanced constitutive models and their variants are employed to synthesize a dataset, accounting for variations in intrinsic features. The performance of various machine learning model frameworks is evaluated through mean absolute error percentage and maximum error percentage. The findings demonstrate that an incremental strategy machine learning constitutive model showed poor performance in predicting the mechanical behavior of granular materials. However, the full sequence strategy using Multilayer Perceptron(MLP) and long short-term memory(LSTM) machine learning models demonstrates the ability to learn and rapidly predict the irreversible, history-dependent phenomena in sandy materials. Notably, LSTM performs optimally when the time step is 4. This work offers valuable insights for enhancing the computational efficiency of numerical schemes.