Method and system for lightweight artificial intelligence inference models

The method and system apply sequential and parallel lightweighting techniques to compress deep learning models, optimizing performance and size by selecting and combining compression methods, addressing inefficiencies in existing deep learning model sizes.

JP7542793B2Active Publication Date: 2024-09-02NOTA INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023545183
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-01-29
Filing Date
2021-11-23
Publication Date
2024-09-02
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

Existing deep learning models are large and inefficient, requiring methods to reduce their size without compromising performance.

Method used

A method and system that applies various lightweighting techniques sequentially and/or in parallel to compress deep learning models, using a processor to select and combine compression methods, measure performance, and determine a final lightweight model based on constraints.

Benefits of technology

Effectively reduces the size of deep learning models while maintaining performance by optimizing hyperparameters and selecting appropriate compression techniques.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007542793000002
    Figure 0007542793000002
  • Figure 0007542793000003
    Figure 0007542793000003
  • Figure 0007542793000001
    Figure 0007542793000001
Patent Text Reader

Abstract

A method and system for lightweighting an artificial intelligence model are disclosed. The lightweighting method according to one embodiment may include receiving an input of an inference model for lightweighting, selecting a target device from a target device pool, selecting a combination of compression methods from a compression method pool, compressing the inference model using the selected combination of compression methods, measuring performance of the compressed inference model using the selected target device, and determining a final lightweight inference model based on the measured performance.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The following description relates to methods and systems for lightweight artificial intelligence inference models. [Background technology]

[0002] The lightweighting of a deep learning model (or artificial intelligence model) refers to the functions, modules and / or features that make a given deep learning model into a smaller deep learning model. Here, "smaller" can mean reducing the number of weights / bias that make up the deep learning model, reducing capacity, or increasing inference speed. At this time, it is very important not to degrade performance while proceeding with the lightweighting.

[0003] There are many different types of weighting techniques. They can be broadly classified into pruning, quantization, knowledge distillation, neural architecture search, and filter decomposition, and within each classification, there are a wide variety of weighting techniques.

[0004] At this time, each lightweighting technique cannot be used simply. There are parameters for using each lightweighting technique. For example, in the case of pruning, the parameters for how much of each layer should be pruned must be adjusted in advance, and how the parameters are set has a large impact on the lightweighting performance. Summary of the Invention [Problem to be solved by the invention]

[0005] Provided is a lightweighting method and system capable of compressing a deep learning model by sequentially and / or in parallel applying various lightweighting techniques to the deep learning model. [Means for solving the problem]

[0006] The present invention provides a lightweighting method for a computer device including at least one processor, the method including: receiving an input of an inference model for lightweighting by the at least one processor; selecting a target device from a target device pool by the at least one processor; selecting a combination of compression methods from a compression method pool by the at least one processor; compressing the inference model using the selected combination of compression methods by the at least one processor; measuring performance of the compressed inference model using the selected target device by the at least one processor; and determining a final lightweight inference model based on the measured performance by the at least one processor.

[0007] According to one aspect, the compressing step may be characterized by compressing the inference model by sequentially applying methods included in the selected combination of compression methods to the inference model through a compression pipeline.

[0008] According to another aspect, the configuration for measuring the performance may include a step of transmitting the compressed inference model to the selected target device; and a step of receiving test results for the performance of the compressed inference model from the target device.

[0009] According to yet another aspect, the selected target device may be configured to measure performance including at least one of latency and accuracy for the compressed inference model.

[0010] According to yet another aspect, the weight reduction method may further include setting, by the at least one processor, a constraint including values ​​for at least one of device, accuracy, model size, latency, compression time, and energy consumption.

[0011] According to yet another aspect, the method for reducing weight may further include setting, by the at least one processor, priority levels for each of the set constraints.

[0012] According to yet another aspect, the step of selecting the target device may include selecting the target device according to device constraints.

[0013] According to yet another aspect, the step of determining the final lightweight inference model may be characterized by determining the final lightweight inference model based on at least one of the accuracy constraint, the delay time constraint, and the energy consumption constraint and the measured performance.

[0014] According to yet another aspect, at least one of the number of times the compressed inference model is learned in the target device and the number of compression methods included in the selected combination of compression methods may be adjusted according to the compression time constraint.

[0015] According to yet another aspect, the step of selecting a combination of compression methods may include selecting a plurality of combinations of the compression methods from the compression method pool, and the compressing step may include compressing the inference model into each of the selected combinations.

[0016] According to yet another aspect, the compression method pool can be characterized as including two or more compression methods based on at least one of pruning, quantization, knowledge distillation, neural architecture search, and filter decomposition.

[0017] A computer program stored on a computer-readable recording medium is provided which is coupled to a computer device to cause the computer device to execute the method.

[0018] A computer-readable recording medium is provided that stores a program for causing a computer device to execute the method.

[0019] The present invention provides a computer device comprising at least one processor embodied to execute instructions readable by the computer device, the computer device being characterized in that the at least one processor receives an inference model for lightweighting, selects a target device from a target device pool, selects a combination of compression methods from a compression method pool, compresses the inference model using the selected combination of compression methods, measures performance of the compressed inference model using the selected target device, and determines a final lightweight inference model based on the measured performance. Effect of the Invention

[0020] Various lightweighting techniques can be applied to the deep learning model in a sequential and / or parallel manner to compress the deep learning model. [Brief description of the drawings]

[0021] [Figure 1] 1 illustrates an example of a network environment according to an embodiment of the present invention. [Diagram 2]FIG. 1 is a block diagram illustrating an example of a computing device according to one embodiment of the present invention. [Diagram 3] 1 is a diagram illustrating an example of a weight-saving system according to an embodiment of the present invention. [Figure 4] 1 is a flow chart illustrating an example of a weight reduction method according to one embodiment of the present invention. [Diagram 5] 1 is a diagram illustrating an example of an optimal parameter determination process in accordance with an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0022] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

[0023] The weight-saving system according to the embodiment of the present invention may be embodied by at least one computer device. In this case, a computer program according to the embodiment of the present invention may be installed and run on the computer device, and the computer device may perform the weight-saving method according to the embodiment of the present invention under the control of the run computer program. The computer program may be combined with the computer device and stored in a computer-readable recording medium to cause the computer to execute the weight-saving method.

[0024] FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment in FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, 140, a plurality of servers 150, 160, and a network 170. FIG. 1 is an example for explaining the invention, and the number of electronic devices and the number of servers are not limited to those shown in FIG. 1. In addition, the network environment in FIG. 1 is merely an example of an environment applicable to this embodiment, and the environment applicable to this embodiment is not limited to the network environment in FIG. 1.

[0025] The electronic devices 110, 120, 130, 140 may be fixed terminals or mobile terminals embodied as computer devices. Examples of the electronic devices 110, 120, 130, 140 include smart phones, mobile phones, navigation systems, computers, notebook computers, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), tablet PCs, etc. For example, FIG. 1 shows the shape of a smartphone as an example of the electronic device 110, but in the embodiment of the present invention, the electronic device 110 may substantially refer to one of various physical computer devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160 through a network 170 using a wireless or wired communication method.

[0026] The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired Internet, a wireless Internet, or a broadcasting network) that the network 170 may include, but also short-range wireless communication between devices. For example, the network 170 may include one or more of any of a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), a broadband network (BBN), the Internet, and the like. In addition, the network 170 may include any one or more of network topologies including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree, or a hierarchical network, but is not limited thereto.

[0027] Each of the servers 150, 160 may be embodied as a computer device or multiple computer devices that communicate with the multiple electronic devices 110, 120, 130, 140 via the network 170 to provide instructions, codes, files, content, services, etc. For example, the server 150 may be a system that provides services (e.g., instant messaging services, social network services, payment services, virtual exchange services, risk monitoring services, gaming services, group calling services (or audio conference services), messaging services, email services, map services, translation services, financial services, search services, content provision services, etc.) to the multiple electronic devices 110, 120, 130, 140 connected via the network 170.

[0028] 2 is a block diagram illustrating an example of a computer device according to an embodiment of the present invention. Each of the electronic devices 110, 120, 130, and 140 and the servers 150 and 160 may be implemented by a computer device 200 illustrated in FIG.

[0029] As shown in FIG. 2, the computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input / output interface 240. The memory 210 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, the ROM and the non-perishable mass storage device such as a disk drive may be a separate permanent storage device separate from the memory 210 and may be included in the computer device 200. The memory 210 may also store an operating system and at least one program code. Such software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, etc. In another embodiment, the software components may be loaded into the memory 210 through the communication interface 230 rather than a computer-readable recording medium. For example, the software components may be loaded into the memory 210 of the computer device 200 based on a computer program located by a file received over the network 170 .

[0030] The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. The instructions may be provided to the processor 220 via the memory 210 or the communications interface 230. For example, the processor 220 may be configured to execute instructions received from a program code stored in a storage device, such as the memory 210.

[0031] The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (for example, the storage device described above) through the network 170. For example, requests, commands, data, files, etc. generated by the processor 220 of the computer device 200 from program code stored in a storage device such as the memory 210 may be transmitted to other devices through the network 170 under the control of the communication interface 230. Conversely, signals, commands, data, files, etc. from other devices may be received by the computer device 200 through the communication interface 230 of the computer device 200 via the network 170. The signals, commands, data, etc. received through the communication interface 230 may be transmitted to the processor 220 or the memory 210, and the files, etc. may be stored in a storage medium (the permanent storage device described above) that the computer device 200 may further include.

[0032] The input / output interface 240 may be a means for interfacing with the input / output device 250. For example, the input device may include a device such as a microphone, a keyboard, or a mouse, and the output device may include a device such as a display or a speaker. As another example, the input / output interface 240 may be a means for interfacing with a device that integrates functions for input and output into one, such as a touch screen. At least one of the input / output devices 250 may be configured as a single device together with the computer device 200. For example, a touch screen, a microphone, a speaker, etc. may be implemented as being included in the computer device 200, such as a smartphone.

[0033] Also, in other embodiments, the computing device 200 may include fewer or more components than those of FIG. 2. However, it is not necessary to explicitly illustrate many of the prior art components. For example, the computing device 200 may be embodied to include at least some of the input / output devices 250 described above, or may further include other components such as a transceiver, a database, etc.

[0034] 3 is a diagram illustrating an example of a weight reduction system according to an embodiment of the present invention. The weight reduction system 300 according to the embodiment may include a hyperparameter optimization unit 310 (hereinafter, referred to as HPO (Hyperparameter Optimization)), a target device pool (Target Device Pool, 320), a compression method pool (Compression Method Pool, 330), and a compression pipeline (Compression Pipeline, 340).

[0035] Since the weight reduction techniques are highly dependent on parameters, when multiple weight reduction techniques are used, the performance may be significantly affected by how the parameters of each weight reduction technique are set. To solve such a problem, the weight reduction system 300 may include the HPO 310 and the target device pool 320.

[0036] The HPO 310 may be an algorithm for searching for optimal hyperparameters in a given hyperparameter search space, and may be a functional expression of a function operated by the processor 220 of the computer device 200 embodying the lightweight system 300 under the control of a computer program. For example, the HPO 310 may perform learning for each of parameter combinations 1, 2, ..., N among possible parameter combinations, discard some parameter combinations with low performance, and search for a new parameter combination based on the parameter combination with good top performance. Examples of hyperparameters include a batch size, a learning rate, and momentum. When the category of hyperparameters is set as the number of layers, the number of neurons, and the type of layer, the HPO 310 may include a Neural Architecture Search (NAS).

[0037] The HPO 310 according to the present embodiment can process searches in a variety of search spaces. The search space can be a number of parameters of a weighting technique. For example, the pruning ratio, the quantization threshold, the temperature in KD in knowledge distillation, etc. can be the search space of the HPO 310. For example, the HPO 310 can use algorithms such as Hyperband and Bayesian Optimization.

[0038] Meanwhile, the target device pool 320 and the compression method pool 330 may be implemented in the form of a database, for example. The target device pool 320 may include information on various devices, and the compression method pool 330 may include code for each of various compression methods. The HPO 310 may select a compression method from the compression method pool 330 and may reduce the weight of an inference model by using the selected compression method. The devices included in the target device pool 320 and the compression methods included in the compression method pool 330 may utilize devices and compression methods that are already widely known.

[0039] In this case, when reducing the size of the inference model, the HPO 310 may select two or more compression methods from the compression method pool 330, and may sequentially arrange the selected two or more compression methods in the compression pipeline 340. Thereafter, the HPO 310 may input the inference model to the compression pipeline 340 and process reduction of the inference model such that the inference model is compressed sequentially by the two or more compression methods. According to an embodiment, the compression pipeline 340 may be embodied in a form included in the HPO 310.

[0040] In addition, the HPO 310 may generate a lightweight model for each of various combinations of compression methods. According to an embodiment, the HPO 310 may generate a plurality of lightweight models in parallel by applying different combinations of compression methods to one inference model by operating a plurality of compression pipelines. As an example, when a plurality of target devices exist, the HPO 310 may operate a plurality of compression pipelines to simultaneously generate a plurality of lightweight models for the plurality of target devices.

[0041] In addition, the HPO 310 can transmit the lightweight inference model to the selected target device 350 through the target device pool 320. The target device 350 can execute the code of the lightweight inference model to measure performance such as delay time and accuracy, and then return the measured performance to the HPO 310. The HPO 310 can rank parameter combinations based on the returned performance, and can find a parameter combination optimized for the target device 350 based on the ranking.

[0042] For this process, the HPO 310 can receive, for example, an inference model for compression, a dataset (including data and labels), and constraints, where the constraints can include values ​​for at least one of the following: device, accuracy, model size, latency, compression time, and energy consumption.

[0043] The device constraints may include information for selecting a target device 350. The lightening system 300 may select a target device 350 from the target device pool 320 according to the device constraints.

[0044] Also, the accuracy constraint may be a minimum critical value of accuracy that the lightweight inference model should have. In other words, the HPO 310 may lightweight the inference model so that the lightweight inference model has an accuracy at least equal to or greater than the minimum critical value according to the accuracy constraint. For example, the HPO 310 may select a parameter combination whose accuracy as the performance returned by the target device 350 is equal to or greater than the minimum critical value according to the accuracy constraint.

[0045] The model size constraint may be a constraint on the size of the lightweight model. When the model size constraint is set, the HPO 310 may perform a performance test using a lightweight inference model having a size equal to or smaller than the model size constraint among the lightweight inference models.

[0046] The latency constraint may be a constraint on the time it takes for a lightweight inference model to generate an output value for an input value. The latency for the lightweight inference model may be included in the performance that the target device returns to the HPO 310. The HPO 310 may select a parameter combination by selecting a lightweight inference model that satisfies the latency constraint based on the latency included in the returned performance.

[0047] The compression time constraint may be a constraint on the time it takes to generate a lightweight inference model. For example, the time it takes to generate an inference model that satisfies a desired input condition depends on the performance and resources of the system compressing the inference model, and it may take days to compress one inference model. However, when a user sets a compression time constraint, the HPO 310 can adjust the generation time of the lightweight inference model so that it does not exceed the delay time constraint set by the user by specifying the maximum number of learning times (epochs) to meet the set compression time constraint or reducing the number of compression methods applied sequentially.

[0048] The energy consumption constraint may include a constraint on the energy consumption in the target device when measuring the performance of the lightweight inference model in the target device. In other words, the HPO 310 may select a parameter combination in which the energy consumption in the target device does not exceed the energy consumption constraint set by the user. To this end, the target device may include an energy consumption measurement module, and the energy consumption measured in the target device may be transmitted to the HPO 310 as part of the performance of the lightweight inference model.

[0049] On the other hand, a result (lightweight inference model) that satisfies all constraints may or may not be generated. For example, the performance of the lightweight inference model may require lower accuracy for lower latency. As another example, the accuracy may require lower accuracy for lower energy consumption. Thus, a priority may be assigned to the constraints, and the HPO 310 may first satisfy the constraints with higher priority according to the assigned priority, and proceed with model optimization to satisfy the lower-order constraints.

[0050] 4 is a flow chart illustrating an example of a weighting method according to an embodiment of the present invention. The weighting method according to this embodiment may be performed by a computer device 200 embodying an HPO 310. As an example, a processor 220 of the computer device 200 may be embodied to execute control instructions according to an operating system code or at least one computer program code contained in a memory 210. Here, the processor 220 may control the computer device 200 to perform steps 410 to 470 of the method of FIG. 4 according to the control instructions provided by the code stored in the computer device 200.

[0051] In step 410, the computer device 200 may receive an inference model for compaction. In some embodiments, a dataset and constraints may be input together with the inference model. The dataset may include data and labels (correct answers for the data), and may be provided to a target device and used by the target device to measure the performance of the compacted inference model.

[0052] In step 420, the computer device 200 may set a constraint including a value for at least one of the items of device, accuracy, model size, delay time, compression time, and energy consumption. If a compression time constraint is set, at least one of the number of times of learning the compressed inference model in the target device and the number of compression methods included in the combination of selected compression methods may be adjusted according to the set compression time constraint. The set constraint may be, but is not limited to, a constraint input together with the inference model. In addition, according to an embodiment, the computer device 200 may further set a priority for each item of the set constraint. The priority has been described in detail above.

[0053] In step 430, the computing device 200 may select a target device from the target device pool. Here, the target device pool may correspond to the target device pool 320 previously described with reference to Fig. 3. At this time, if a device constraint is set in step 420, the computing device 200 may select a target device from the target device pool according to the device constraint.

[0054] In step 440, the computer device 200 may select a combination of compression methods from the compression method pool. Here, the compression method pool may correspond to the compression method pool 320 previously described with reference to FIG. 3. In this case, the compression method pool may include two or more compression methods based on at least one of pruning, quantization, knowledge distillation, neural architecture search, resolution change, filter decomposition, and filter decomposition. According to an embodiment, the computer device 200 may select a plurality of combinations of compression methods from the compression method pool.

[0055] Also, the computer device 200 may select a combination of compression methods according to a certain rule. For example, the computer device 200 may select a combination of compression methods according to at least one of a first rule that a quantization-based compression method must be located at the end of the combination of compression methods and a second rule that an activation change-based compression method must be included before a quantization-based compression method. For example, since quantization is often implemented in combination with a compiler, when quantization is used for compression at a software level, the quantization may be located at the very end of the compression pipeline. Also, since activation change is used to improve the performance of quantization, the activation change-based compression method may be included in the combination before the quantization-based compression method.

[0056] Depending on the embodiment, the order of performing steps 410 to 440 may be changed. For example, the target device may be selected after selecting the combination of compression methods, or the target device may be selected before inputting the inference model.

[0057] In step 450, the computer device 200 may compress the inference model using the selected combination of compression methods. As an example, the computer device 200 may compress the inference model by sequentially applying methods included in the selected combination of compression methods to the inference model through a compression pipeline. The compression pipeline may correspond to the compression pipeline 340 previously described with reference to FIG. 3. Meanwhile, if multiple combinations are selected in step 440, the computer device 200 may compress the inference model into each of the selected combinations.

[0058] In step 460, the computer device 200 may measure the performance of the compressed inference model using the selected target device. As an example, the computer device 200 may transmit the compressed inference model to the selected target device and receive a test result for the performance of the compressed inference model from the target device. In this case, the target device may be embodied to measure performance including at least one of delay time and accuracy for the compressed inference model. When the inference model is compressed for each of a plurality of combinations, the performance for each of the multiple compressed inference models may be measured.

[0059] In operation 470, the computer device 200 may determine a final lightweight inference model based on the measured performance. As an example, the computer device 200 may determine a final lightweight inference model based on at least one of an accuracy constraint, a delay time constraint, and an energy consumption constraint and the measured performance. As another example, when the computer device 200 generates a plurality of compressed inference models while changing a parameter combination for an inference model, or generates a plurality of compressed inference models through a plurality of combinations of compression methods, the computer device 200 may determine a compressed inference model having the highest performance among the plurality of compressed inference models as a final lightweight inference model.

[0060] 5 is a diagram illustrating an example of an optimal parameter determination process in one embodiment of the present invention. FIG 5 illustrates an HPO 310 and a target device 350. The embodiment of FIG 5 illustrates an example of a process in which the HPO 310 compresses an inference model 510 through the target device 350 to generate a final lightweight inference model 520.

[0061] In parameter selection step 531, the HPO 310 can select parameters for the input inference model 510. As previously described, the inference model 510 can be a pre-trained model, and the parameters can be a combination of parameters for a combination of multiple compression methods.

[0062] In a model compression step 532, the HPO 310 may compress the inference model 510 using the selected parameters. The compressed inference model may be transmitted to the target device 350. At this time, the dataset (including data and labels) input to the inference model 510 may be transmitted to the target device 350 together with the compressed inference model.

[0063] In a model receiving step 533, the target device 350 can receive the compressed inference model transmitted by the HPO 310. As previously described, the target device 350 can receive a dataset along with the compressed inference model.

[0064] In the model testing step 534, the target device 350 may test the compressed inference model. As an example, the target device 350 may test the compressed inference model using the data of the dataset and the ground truth label to measure the performance (e.g., delay time, accuracy, etc.) of the compressed inference model and transmit the measured performance to the HPO 310. As a more specific example, the target device 350 may input the data of the dataset to the compressed inference model and measure the delay time based on the time when the data is input and the time when the compressed inference model outputs a result for the input data. As another example, the target device 350 may compare the output result with the ground truth label for the data to measure the accuracy of the compressed inference model.

[0065] In the iterative process 535, the HPO 310 may determine whether to repeat the parameter selection process 531 to the model test process 534 according to the performance transmitted from the target device 350. As an example, the HPO 310 may determine whether the compressed inference model satisfies all the constraints based on the transmitted performance, or satisfies the constraints based on the priority level or more. If satisfied, the HPO 310 may provide the compressed inference model as the final light-weight inference model 520 without repeating the parameter selection process 531 to the model test process 534. On the other hand, if not satisfied, the HPO 310 may repeat the parameter selection process 531 to the model test process 534 to test the compressed inference model again with new parameters.

[0066] In some embodiments, the iterative process 535 may simply be a process for testing a pre-defined number of compressed inference models compressed with different parameters, in which case the HPO 310 may provide the compressed inference model that performs best under the constraint criteria as the final reduced inference model 520.

[0067] In yet another embodiment, the iterative process 535 may be a process for testing a single condensed inference model on a pre-defined number of different target devices.

[0068] In this manner, according to an embodiment of the present invention, various weight reduction techniques can be applied sequentially and / or in parallel to a deep learning model to compress the deep learning model.

[0069] The systems or devices described above may be embodied with hardware components or a combination of hardware and software components. For example, the devices and components described in the embodiments may be embodied using one or more general-purpose or special-purpose computers, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications executed on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, the processing device may be described as being one in which one is used, but one skilled in the art will appreciate that the processing device may include multiple processing elements and / or multiple types of processing elements. For example, the processing device may include multiple processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

[0070] The software may include a computer program, code, instructions, or a combination of one or more of these, capable of configuring or instructing a processing device to operate as desired, either independently or collectively. The software and / or data may be embodied in some type of machine, component, physical device, virtual equipment, computer storage medium, or device to be interpreted by or provide instructions or data to a processing device. The software may be distributed across computer systems coupled to a network, so that it is stored and executed in a distributed manner. The software and data may be stored on one or more computer-readable storage media.

[0071] The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, either alone or in combination. The medium may be a medium that continuously stores a computer-executable program or a medium that temporarily stores the program for execution or download. The medium may be a variety of recording or storage means in the form of a single or multiple pieces of hardware combined, and is not limited to a medium directly connected to a certain computer system, but may be a medium that is distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and media configured to store program instructions, including ROMs, RAMs, and flash memories. Examples of other media include recording or storage media managed by app stores that distribute applications, and sites and servers that supply or distribute various other software. Examples of program instructions include not only machine code, such as produced by a compiler, but also higher level language code that may be executed by the computer using an interpreter, etc.

[0072] Although the embodiments have been described above with reference to the drawings and even if they are limited, those skilled in the art will appreciate that various modifications and variations may be made from the above description. For example, the techniques described may be performed in an order different from that described, and / or the components of the systems, structures, devices, circuits, etc. described may be combined or combined in a different manner than that described, or may be replaced or substituted by other components or equivalents, and still achieve suitable results.

[0073] Accordingly, other implementations, other embodiments, and equivalents of the claims are intended to be within the scope of the following claims. (Other possible items) (Item 1) 1. A method for reducing the weight of a computing device including at least one processor, comprising: receiving, by the at least one processor, an inference model for weighting; selecting, by the at least one processor, a target device from a target device pool; selecting, by the at least one processor, a combination of compression methods from a compression method pool; compressing, by the at least one processor, the inference model using the selected combination of compression methods; measuring, by the at least one processor, performance of the compressed inference model using the selected target device; and determining, by the at least one processor, a final lightweight inference model based on the measured performance. (Item 2) The compressing step includes: The weight reduction method described in item 1, further comprising compressing the inference model by sequentially applying the methods included in the selected combination of compression methods to the inference model through a compression pipeline. (Item 3) The configuration for measuring the performance is as follows: transmitting the compressed inference model to the selected target device; and 2. The weight reduction method of claim 1, further comprising a step of receiving test results for the performance of the compressed inference model from the target device. (Item 4) The lightweighting method described in item 1, wherein the selected target device is configured to measure performance including at least one of delay time and accuracy for the compressed inference model. (Item 5) The weight reduction method according to item 1, further comprising a step of setting, by the at least one processor, a constraint including values ​​for at least one of the following items: device, accuracy, model size, latency, compression time, and energy consumption. (Item 6) 6. The weight reduction method according to item 5, further comprising a step of setting item-by-item priorities of the set constraints by the at least one processor. (Item 7) The step of selecting a target device comprises: 6. The weight reduction method according to item 5, further comprising selecting the target device according to a constraint on the device. (Item 8) The step of determining the final lightweight inference model comprises: 6. The lightweight method of claim 5, further comprising determining the final lightweight inference model based on at least one of the accuracy constraint, the delay time constraint, and the energy consumption constraint and the measured performance. (Item 9) The weight reduction method described in item 5, wherein at least one of the number of times the compressed inference model is trained on the target device and the number of compression methods included in the selected combination of compression methods is adjusted according to the compression time constraint. (Item 10) The step of selecting a combination of compression methods comprises: selecting a plurality of combinations of the compression methods from the compression method pool; The compressing step includes: A lightweight method described in item 1, which compresses the inference model into each of the selected combinations. (Item 11) 2. The weight reduction method according to claim 1, wherein the compression method pool includes two or more compression methods based on at least one of pruning, quantization, knowledge distillation, neural architecture search, resolution change, filter decomposition, and filter decomposition. (Item 12) The step of selecting a combination of compression methods comprises: 2. The weight reduction method according to claim 1, wherein a combination of compression methods is selected in accordance with at least one of a first rule that a compression method based on quantization must be located at the end of the combination of compression methods and a second rule that a compression method based on activation change must be included before a compression method based on quantization. (Item 13) A computer program stored on a computer-readable recording medium in combination with a computer device to cause the computer device to execute the method described in any one of items 1 to 12. (Item 14) A computer-readable recording medium having a program recorded thereon for causing a computer device to execute the method according to any one of items 1 to 12. (Item 15) at least one processor configured to execute computer readable instructions; by the at least one processor, Receive input for a lightweight inference model, Select the target device from the target device pool, Select a combination of compression methods from the compression method pool, compressing the inference model using the selected combination of compression methods; Measure performance of the compressed inference model using the selected target device; A computing device that determines a final lightweight inference model based on the measured performance. (Item 16) by the at least one processor to compress the inference model; Item 16. The computer device of item 15, further comprising: a computer that compresses the inference model by sequentially applying the methods included in the selected combination of compression methods to the inference model through a compression pipeline. (Item 17) by the at least one processor to measure performance of the condensed inference model; Transmitting the compressed inference model to the selected target device; Item 16. The computer apparatus of item 15, further comprising: receiving test results for performance of the compressed inference model from the target device. (Item 18) by the at least one processor, 16. The computer apparatus of item 15, further comprising: setting a constraint including a value for at least one of the following items: device, accuracy, model size, latency, compression time, and energy consumption. (Item 19) by the at least one processor to select the combination of compression methods; selecting a plurality of combinations of the compression methods from the compression method pool; by the at least one processor to compress the inference model; Item 16. The computer device of item 15, further comprising: compressing the inference model into each of the selected combinations.

Claims

1. A method for determining an optimal parameter combination for reducing the weight of an inference model, the method being executed by a computer device including at least one processor, comprising: receiving, by the at least one processor, an inference model and user-defined constraints; selecting, by the at least one processor, a plurality of distinct compression method combinations to be applied to the inference model taking into account the constraints, and a plurality of distinct parameter combinations associated with the plurality of compression method combinations; sequentially applying, by the at least one processor, the plurality of compression method combinations and the plurality of parameter combinations to the inference model through a plurality of compression pipelines to obtain a plurality of lightweight models, and obtaining performance for each of the plurality of lightweight models through a target device; determining, by the at least one processor, whether there is at least one lightweight model among the plurality of lightweight models that satisfies the constraints based on the performance; When the at least one processor determines that there is at least one lightweight model that satisfies the constraints, the lightweight model having the highest performance among the at least one lightweight model is provided as a final lightweight model, and an optimal parameter combination is determined based on the final lightweight model; and When the at least one processor determines that there is no at least one lightweight model that satisfies the constraints, a step of searching for a new parameter combination based on parameter combinations used in lightweighting a lightweight model having a higher performance among the plurality of lightweight models that is fewer than the plurality of lightweight models.

2. The plurality of parameter combinations include The method of claim 1 comprising a first parameter combination and a second parameter combination different from the first parameter combination.

3. The step of obtaining the performance includes: transmitting the plurality of lightweight models to the target device; and The method of claim 1 , comprising receiving test results for performance of the plurality of lightweight models from the target device.

4. The performance is The method of claim 1 , comprising at least one of a delay time and an accuracy for the plurality of lightweight models.

5. The constraint is: The method of claim 1 , further comprising: a value for at least one of device, accuracy, model size, latency, compression time, and energy consumption.

6. Each of the constraints has a priority. The determining step includes: The method of claim 5 , further comprising determining whether there is at least one lightweight model that satisfies the constraints based on the priority.

7. The target device is The method of claim 1 , further comprising selecting from a target device pool based on the constraints.

8. The method of claim 5 , wherein at least one of a number of times the plurality of lightweight models are trained on the target device and a number of compression methods included in the plurality of compression method combinations is adjusted according to the compression time constraint.

9. The compression methods included in the combination of compression methods include: Selected from the compression method pool, The method of claim 1 , wherein the compression method pool includes Pruning and Filter Decomposition.

10. receiving an input of a data set and providing it to the target device; The performance is The method of claim 3 , wherein the data set is utilized to measure the target device.

11. A computer program stored on a computer-readable recording medium for causing the computer to execute the method according to any one of claims 1 to 10 when combined with a computer device.

12. A computer-readable recording medium having recorded thereon a program for causing a computer device to execute the method according to any one of claims 1 to 10.

13. 1. A computing device including at least one processor, comprising: The at least one processor: It takes as input the inference model and user-specified constraints, selecting a plurality of distinct compression method combinations and a plurality of distinct parameter combinations associated with the plurality of compression method combinations to be applied to the inference model taking into account the constraints; sequentially applying the plurality of compression method combinations and the plurality of parameter combinations to the inference model through a plurality of compression pipelines to obtain a plurality of lightweight models, and obtaining performance for each of the plurality of lightweight models through a target device; determining whether there is at least one lightweight model that satisfies the constraint among the plurality of lightweight models based on the performance; When it is determined that there is at least one lightweight model that satisfies the constraint, a lightweight model having the highest performance among the at least one lightweight model is provided as a final lightweight model, and an optimal parameter combination is determined based on the final lightweight model; A computer device that, when the at least one processor determines that there is no at least one lightweight model that satisfies the constraint, searches for a new parameter combination based on parameter combinations used to reduce the weight of a lightweight model among the plurality of lightweight models that has a higher performance than the plurality of lightweight models.

14. The plurality of parameter combinations include 14. The computer apparatus of claim 13, comprising a first parameter combination and a second parameter combination distinct from the first parameter combination.

15. a communication interface; The at least one processor: Transmitting the plurality of lightweight models to a target device via the communication interface; The computing device of claim 13 , further configured to receive test results for the performance of the plurality of lightweight models from the target device via the communications interface.

16. The constraint is: The computer apparatus of claim 13 , further comprising values ​​for at least one of device, accuracy, model size, latency, compression time, and energy consumption.

17. Each of the constraints has a priority. The at least one processor: The computer device of claim 16 , further comprising: determining whether there is at least one lightweight model that satisfies the constraints based on the priority order.

Citation Information

Patent Citations

  • Information processing method and information processing system

    JP2019096285A

  • Self-Tuning Incremental Model Compression Solution in Deep Neural Network with Guaranteed Accuracy Performance

    US20190370658A1

  • Apparatus and method of compressing neural network

    US20200184333A1

  • Neural network model apparatus and compressing method of neural network model

    US20200364574A1