The invention provides a
language model training method and device, a
text processing method and device, equipment and a medium, and relates to the technical field of
natural language processing, and the method comprises the steps: predicting a first probability matrix corresponding to each data unit in a sample text based on a teacher model; the first probability matrix comprises a probability value of each data unit belonging to each lexical element in the first
word list; according to the numerical value of each probability value in the first probability matrix, compressing the first probability matrix to obtain a second probability matrix corresponding to each data unit; performing alignment operation on the second
word list according to lexical elements corresponding to probability values in the second probability matrix to obtain a third
word list; and according to the third word
list and the second probability matrix, carrying out
distillation training on the student model to obtain a target
language model, thereby reducing the storage cost, improving the
distillation training efficiency, and enabling the target
language model trained according to the method to better adapt to different model architectures and
text processing scenes while keeping high performance.