MoE batch reasoning method and system based on priority differential cache
Патент · CN B
Полный текст
The invention belongs to the technical field of computers and artificial intelligence, and discloses a MoE batch reasoning method and system based on priority differential cache, wherein the method comprises the steps of identifying global thermal experts with higher activation frequency of each layer, residing the global thermal experts in a high-priority cache during initialization, and establishing a priority list of each layer of experts; in the reasoning stage, selecting an expert set to be activated at the current layer, dynamically updating expert priority scores according to the activation and multiplexing behaviors of the experts, transferring and replacing the experts among the high-level cache, the medium-level cache and the low-level cache according to the priority scores and the cache threshold, predicting the expert set to be activated at the next layer according to the current layer gating result and the historical activation track, and asynchronously loading the expert set to the low-level cache during the current layer calculation so as to realize the time overlapping of calculation and communication. The invention can reduce the expert migration times, improve the cache hit rate and throughput rate, obviously optimize the utilization rate of the video memory and has good expansibility and universality.