US 12,468,637 B2
Method and apparatus for providing artificial intelligence model swapping to support foundation models
Kishanthan Thangarajah, Kanata (CA); Shi Chang, Kanata (CA); Haoxiang Zhang, Kanata (CA); Boyuan Chen, Kanata (CA); and Ahmed E. Hassan, Kanata (CA)
Assigned to HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed by HUAWEI TECHNOLOGIES CO., LTD., Shenzhen (CN)
Filed on Jan. 31, 2024, as Appl. No. 18/428,056.
Prior Publication US 2025/0245171 A1, Jul. 31, 2025
Int. Cl. G06F 12/123 (2016.01)
CPC G06F 12/123 (2013.01) 16 Claims
OG exemplary drawing
 
1. A method for model selection for swapping between a first memory and a second memory, the method comprising:
sorting models in a first list, the first list including models loaded in the first memory, wherein sorting is based at least in part on a least recently used (LRU) of each model;
removing duplicate models, if any, from within a second list of models, the second list including models to be loaded into the first memory;
determining an eviction score of each of the models based at least in part on: a size of the particular model, a last time the particular model was used in the first list and an index position of the particular model in the second list;
selecting a model from the first list having a highest eviction score compared with other models in the first list; and
swapping the selected model from the first memory to the second memory.