General machine learning model, and model file generation and parsing method

US11726754B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11726754-B2
Application numberUS-202217849650-A
CountryUS
Kind codeB2
Filing dateJun 26, 2022
Priority dateJun 8, 2018
Publication dateAug 15, 2023
Grant dateAug 15, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Disclosed are a general machine learning model generation method and apparatus, and a computer device and a storage medium. The method comprises: acquiring task parameters of a machine learning task (S 1201 ); performing classification processing on the task parameters to obtain task instructions and model parameters (S 1202 ); aggregating the task instructions and the model parameters according to a data type to obtain stack data and heap data (S 1203 ); and integrating the stack data and the heap data to obtain a general machine learning model (S 1204 ). By means of the method, compiled results of a corresponding general model in the running of an algorithm can be directly executed, which avoids repetitive compilation, thus greatly improving the efficiency of machine learning algorithm implementation and shortening the time from compilation to obtaining execution results.

First claim

Opening claim text (preview).

The invention claimed is: 1. A method for processing a machine learning task, the method comprising: acquiring task parameters of a machine learning task; processing task parameters to obtain shareable data and unshareable data, wherein the shareable data refers to data shared among cores in a multi-core platform, and the unshareable data refers to data that is not shared among cores in the multi-core platform; arranging the shareable data to obtain a heap data block, and arranging the unshareable data to obtain a stack data block; and packing the heap data block and the stack data block to obtain a general-purpose machine learning model; wherein the shareable data comprises shareable model parameters processed by the task parameters and task instructions; the shareable model parameters include model parameter static data that does not change during running of the machine learning task and model parameter dynamic data that changes during the running of the machine learning task; arranging the shareable data to obtain a heap data block comprising: packing and integrating task instructions and model parameter static data to obtain a successive static data block; packaging and integrating the model parameter dynamic data to obtain a successive dynamic data block; and packing and integrating the successive static data block, the successive dynamic data block to obtain the heap data block; obtaining data attributes of input data, data attributes of output data, and data attribute of intermediate result temporary space of the model parameters; storing in a storage space of the input data and in a storage space of the output data as the sharable data, and storing the intermediate result temporary space as unshareable data. 2. The method of claim 1 , wherein the task parameters comprise parameters referring to an operation structure of the machine learning task, the method further comprising: compiling the machine learning task according the task parameters of the machine learning task to obtain task instructions, wherein the task instructions are shared data. 3. The method of claim 1 , wherein the task parameters comprise computation parameters referring to required data during running the machine learning task, the method further comprising: processing the task parameters to obtain model parameters; classifying the model parameters according to data attributes to obtain unshareable model parameters and the shareable model parameters, wherein the unshareable model parameters are part of the unshareable data, and the shareable model parameters are part of the shareable data. 4. The method of claim 3 , wherein classifying the model parameters according to the data attributes to obtain the unshareable model parameters and the shareable model parameters further comprises: determining storage space of the input data according to a data size of the input data included in the data attributes of the input data; determining storage space of the output data according to a data size of the output data included in the data attributes of the output data; determining storage space of the intermediate result temporary space according to a data size of the intermediate result temporary space included in the data attributes of the intermediate result temporary space. 5. The method of claim 4 , wherein the shareable model parameters include model parameter static data that does not change during running of the machine learning task and model parameter dynamic data that changes during the running of the machine learning task, and arranging the shareable data to obtain the heap data block further comprises: wherein the successive static data block comprises the model parameter static data and the task instructions arranged in successive; and wherein the successive dynamic data block comprises the model parameter dynamic data arranged in successive. 6. The method of claim 5 , wherein arranging the unshareable data to obtain the stack data block further comprises: arranging the unshareable data according to layout information of the stack data to obtain the stack data block, wherein the stack data block comprises the unshareable model parameters. 7. The method of claim 1 , wherein the task parameters comprise hardware parameters, the hardware parameters are classified as the shareable data, the hardware parameters comprise at least one of hardware platform information and hardware configuration parameters. 8. The method of claim 1 , further comprising: compressing and/or encrypting the general-purpose machine learning model to generate a secondary model. 9. The method of claim 1 , wherein at least one general-purpose machine learning model is included in a general-purpose machine learning model file, and the general-purpose machine learning model file further comprises a model directory, the method further comprising: calculating a storage offset of the general-purpose machine learning model; generating the model directory according to the general-purpose machine learning model and the storage offset of the general-purpose machine learning model; and generating the general-purpose machine learning model file according to the general-purpose machine learning model and the model directory. 10. The method of claim 9 , wherein generating the general-purpose machine learning model file according to the general-purpose machine learning model and the model directory further comprises: obtaining a file header and a file tail of the general-purpose machine learning model file; and generating the general-purpose machine learning model file according to the file header, the model directory, the general-purpose machine learning model, and the file tail. 11. The method of claim 9 , wherein calculating the storage offset of the general-purpose machine learning model further comprises: obtaining a size of storage space occupied by each general-purpose machine learning model and a count of the general-purpose machine learning model; obtaining a storage order of the general-purpose machine learning model; and calculating a storage offset of each general-purpose machine learning model according to the size of the storage space occupied by each general-purpose machine learning model, the count of the general-purpose machine learning model, and the storage order of the general-purpose machine learning model. 12. The method of claim 9 , wherein generating the general-purpose machine learning model file according to the general-purpose machine learning model and the model directory further comprises: creating an identification code of the general-purpose machine learning model file; and generating the general-purpose machine learning model file according to the identification code, the general-purpose machine learning model, and the model directory. 13. The method of claim 9 , wherein generating the general-purpose machine learning model file according to the general-purpose machine learning model and the model directory includes: creating a check code and/or an error correction code of the general-purpose machine learning model file; and generating the general-purpose machine learning model file according to the check code and/or the error correction code of the general-purpose machine learning model file, the general-purpose machine learning model, and the model directory. 14. The method of claim 9 , further comprising: executing, by a processor, the general-purpose machine learning model file without compiling. 15. The method of claim 14 , wherein executing the general-purpose machine learning model further

Assignees

Inventors

Classifications

  • G06F8/433Primary

    Dependency analysis; Data or control flow analysis · CPC title

  • Requirements analysis; Specification techniques · CPC title

  • G06F8/35Primary

    model driven · CPC title

  • Target code generation · CPC title

  • G06N20/00Primary

    Machine learning · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11726754B2 cover?
Disclosed are a general machine learning model generation method and apparatus, and a computer device and a storage medium. The method comprises: acquiring task parameters of a machine learning task (S 1201 ); performing classification processing on the task parameters to obtain task instructions and model parameters (S 1202 ); aggregating the task instructions and the model parameters accordin…
Who is the assignee on this patent?
Shanghai Cambricon Inf Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F8/433. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 15 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 7 related publications on this page (citations in our corpus or others sharing the same primary CPC).