The invention belongs to the field of
machine learning, discloses an expert parallelism
processing method and
system for a large
language model based on MoE, and realizes efficient
parallel processing of the MoE model by dynamically distributing expert quantization bit width and sparse mode, predicting and prefetching to-be-activated expert parameters, grouping tokens to generate task queues and dynamically configuring hardware accelerators. Firstly, an importance
score is calculated based on expert historical activation frequency,
weight distribution and a model structure, so that quantization precision and a sparse proportion are adaptively allocated, and resource waste and precision loss of a unified strategy are avoided; secondly, predicting an expert to be activated by using a current layer hidden state and a historical activation sequence, loading parameters to a special cache in advance, reducing high-bandwidth memory access, and relieving bandwidth peak scrambling; moreover, tokens are grouped through a token-expert mapping table, a task
queue is created, and dynamic configuration of a
systolic array is combined, so that the problem of expert heterogeneity after compression is solved, and efficient and parallel
hybrid precision matrix operation is ensured.