IP Library Granted Patent US 11,657,332
Granted Patent B2
US 11,657,332 · App. 16/900,561 · Granted May 23, 2023

Method for AI model transferring with layer randomization

Inventors: Yueqiang Cheng (Sunnyvale, CA); Hefei Zhu (Sunnyvale, CA)
Assignees: BAIDU USA LLC; KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
G06N20/10G06N5/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,657,332
App. No.
16/900,561
Granted
May 23, 2023
Kind
B2
Abstract

A method to transfer an artificial intelligence (AI) model includes identifying a plurality of layers of the AI model, the plurality of layers organized in a first ordered list. The method further includes randomizing the plurality of layers by reorganizing the first ordered list into a second ordered list, and transferring the plurality of layers of the AI model to a data processing accelerator in an order defined by the second ordered list.

Claims (40)

1. A method to transfer an artificial intelligence (AI) model, the method comprising:

identifying a plurality of layers of the AI model that are organized in a first ordered list,

wherein each one of the layers in the plurality of layers corresponds to one of a plurality of kernel functions and one of a plurality of kernel pointers, and

wherein the plurality of kernel

pointers point to positions of their corresponding layers in the first ordered list;

randomizing, by a processing device, the plurality of layers by reorganizing the first ordered list into a second ordered list based on performing a shuffle function on the first ordered list using a seed number;

updating the plurality of kernel pointers with new positions of their corresponding layers in the second ordered list; and

transferring, by the processing device, the plurality of layers of the AI model to a data processing accelerator in an order defined by the second ordered list.

2. The method of claim 1 , wherein the first ordered list corresponds to an execution order for the plurality of kernel functions associated with the plurality of layers.

3. The method of claim 1 , wherein the data processing accelerator is to generate an inference using the AI model by executing the plurality of layers in the order of execution of the first ordered list using the updated kernel pointers associated with the new position of each layer in the second ordered list.

4. The method of claim 1 , wherein updating the kernel pointers comprises:

identifying each of the plurality of layers in the second ordered list using the seed number.

5. The method of claim 1 , wherein the plurality of layers are stored in a plurality of layer containers and organized by the first ordered list, and wherein the randomizing moves at least one of the plurality of layers from a first one of the plurality of layer containers to a second one of the plurality of layer containers.

6. The method of claim 1 , wherein the plurality of kernel functions are located on the processing device and use the updated pointers to instruct the processing accelerator to execute the AI model in an order defined by the first ordered list.

7. A system to transfer an artificial intelligence (AI) model, the system comprising:

a memory; and

a processing device operatively coupled to the memory, the processing device to:

identify a plurality of layers of the AI model that are organized in a first ordered list,

wherein each one of the layers in the plurality of layers corresponds to one of a plurality of kernel functions and one of a plurality of kernel pointers, and

wherein the plurality of kernel pointers point to positions of their corresponding layers in the first ordered list;

randomize the plurality of layers by reorganizing the first ordered list into a second ordered list;

update the plurality of kernel pointers with new positions of their corresponding layers in the second ordered list based on performing a shuffle function on the first ordered list using a seed number; and

transfer the plurality of layers of the AI model to a data processing accelerator in an order defined by the second ordered list.

8. The system of claim 7 , wherein the first ordered list corresponds to an execution order for the plurality of kernel functions associated with the plurality of layers.

9. The system of claim 7 , wherein the data processing accelerator is to generate an inference using the AI model by executing the plurality of layers in the order of execution of the first ordered list using the updated kernel pointers associated with the new position of each layer in the second ordered list.

10. The system of claim 7 , wherein to update the kernel pointers the processing device is to:

identify each of the plurality of layers in the second ordered list using the seed number.

11. The system of claim 7 , wherein the plurality of layers are stored in a plurality of layer containers and organized by the first ordered list, and wherein the randomizing moves at least one of the plurality of layers from a first one of the plurality of layer containers to a second one of the plurality of layer containers.

12. The system of claim 7 , wherein the plurality of kernel functions are located on the processing device and use the updated pointers to instruct the processing accelerator to execute the AI model in an order defined by the first ordered list.

13. A non-transitory machine-readable storage medium storing instructions that, when executed by a processing device, perform operations comprising:

identifying a plurality of layers of an artificial intelligence (AI) model that are organized in a first ordered list, wherein each one of the layers in the plurality of layers corresponds to one

of a plurality of kernel functions and one of a plurality of kernel pointers, and wherein the

plurality of kernel pointers point to positions of their corresponding layers in the first ordered list;

randomizing, by a processing device, the plurality of layers by reorganizing the first ordered list into a second ordered list;

updating the plurality of kernel pointers with new positions of their corresponding layers in the second ordered list based on performing a shuffle function on the first ordered list using a seed number; and

transferring, by the processing device, the plurality of layers of the AI model to a data processing accelerator in an order defined by the second ordered list.

14. The non-transitory machine readable storage medium of claim 13 , wherein the first ordered list corresponds to an execution order for the plurality of kernel functions associated with the plurality of layers.

15. The non-transitory machine readable storage medium of claim 13 , wherein the data processing accelerator is to generate an inference using the AI model by executing the plurality of layers in the order of execution of the first ordered list using the updated kernel pointers associated with the new position of each layer in the second ordered list.

16. The non-transitory machine readable storage medium of claim 13 , wherein the plurality of layers are stored in a plurality of layer containers and organized by the first ordered list, and wherein the randomizing moves at least one of the plurality of layers from a first one of the plurality of layer containers to a second one of the plurality of layer containers.

17. The non-transitory machine readable storage medium of claim 13 , wherein the plurality of kernel functions are located on the processing device and use the updated pointers to instruct the processing accelerator to execute the AI model in an order defined by the first ordered list.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2021
From: BAIDU USA LLC
To: BAIDU USA LLC; KUNLUNXIN TECHNOLOGY (BEIJING) COMPANY LIMITED
Reel/Frame 057829/0213 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 12, 2020
From: CHENG, YUEQIANG; ZHU, HEFEI
To: BAIDU USA LLC
Reel/Frame 052931/0930 →
Continuity (1)
Related Publication 20210390462A1 · Dec 16, 2021