Large language model (llm) training method and apparatus, device, and storage medium
Патент · US A1
Полный текст
Provided are a large language model (LLM) training method and apparatus, a device, and a storage medium. The method includes: acquiring a corpus data training set to be trained, and selecting corpus data from the corpus data training set; predicting the corpus data by using an LLM, obtaining a prediction result, calculating a current loss value based on the prediction result, saving the current loss value, and calculating a current preset loss value based on the saved current loss value; and determining whether the current loss value is less than the current preset loss value; if yes, skipping updating model parameters of the LLM; if not, updating the model parameters of the LLM and the current preset loss value based on the current loss value, re-selecting corpus data from the corpus data training set, and continuing to update the model parameters of the LLM until a trained LLM is obtained.