Neural network model compression method and electronic device implementing the method

By optimizing neural network models for target devices through user-driven data set input and compression settings, the challenge of deploying AI models on specific devices is addressed, enhancing user convenience and satisfaction.

JP7777730B2Active Publication Date: 2025-12-01NOTA INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024060671
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-02-02
Filing Date
2024-04-04
Publication Date
2025-12-01
Estimated Expiration
2043-02-09

AI Technical Summary

Technical Problem

Users face difficulties in finding and deploying artificial intelligence models that meet their performance requirements on target devices due to the lack of optimized neural network models for specific devices.

Method used

Providing electronic devices that optimize neural network models for target devices by allowing users to input data sets and compression settings, visually distinguishing compressible and non-compressible blocks, and enabling user-driven model compression.

Benefits of technology

Enables the provision of optimized neural network models that can be deployed on target devices, improving user convenience and satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007777730000001
    Figure 0007777730000001
  • Figure 0007777730000002
    Figure 0007777730000002
  • Figure 0007777730000003
    Figure 0007777730000003
Patent Text Reader

Abstract

To provide a method of compressing a neural network model that is performed by a computing device.SOLUTION: A method includes: receiving a trained model and compression method instructions for compressing the trained model; identifying a compressible block and a non-compressible block among a plurality of blocks included in the trained model based on the compression method instructions; transmitting a command to a user device so as to cause the user device to display a structure of the trained model representing a connection relationship between the plurality of blocks on a first screen such that the compressible block and the non-compressible block are visually distinguished, and display, on a second screen, an input field operable to receive a parameter value input by a user for compression of the compressible block; and compressing the trained model based on the parameter value input by the user in the input field.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a method for compressing neural network models and electronic equipment for implementing the method. [Background technology]

[0002] With the popularity of artificial intelligence technology, there is an increasing need for users to use artificial intelligence models to operate them in target devices. Summary of the Invention [Problem to be solved by the invention]

[0003] Although various AI models are available worldwide, it is not easy for users to directly find an AI model that has the performance they desire. Furthermore, even if users find a model with excellent performance, such as a state-of-the-art (SOTA) model, that model may not necessarily be able to run on the target device. For these reasons, users have difficulty in confirming whether the model can run on the target device.

[0004] Therefore, there is a need for a technique that allows a user to easily obtain a neural network model that is optimized for a target device. [Means for solving the problem]

[0005] The present disclosure provides electronic devices that provide neural network models that are optimized for a target device.

[0006] The present disclosure further provides an electronic device that provides a neural network model trained based on a data set input by a user.

[0007] The present disclosure further provides an electronic device that provides a compression neural network model that is trained based on compression settings entered by a user.

[0008] The present disclosure further provides an electronic device for providing download data corresponding to a compressed neural network model.

[0009] The objectives of the present disclosure are not limited to the above-mentioned objectives, and other undescribed objectives may be clearly understood by a person skilled in the art to which the present disclosure pertains from the following description.

[0010] The present disclosure may provide a method for compressing a neural network model implemented by a computing device, the method including: receiving, in a processor of the computing device, a trained model and compression method instructions for compressing the trained model; identifying, via the processor, compressible blocks and non-compressible blocks from among a plurality of blocks included in the trained model based on the compression method instructions; transmitting instructions to the user device via a computer network to cause the user device to display, on a first screen, a structure of the trained model representing connection relationships between the plurality of blocks so that the compressible blocks and the non-compressible blocks are visually distinguished; and displaying, on a second screen, an interaction input field operable to receive parameter values ​​input by a user for compressing the compressible blocks; and compressing the trained model based on the parameter values ​​input by the user in the interaction input field.

[0011] When the compression method directive sets a pruning method, identifying may include identifying a non-compressible block from the plurality of blocks that includes a valid function, a normalization function, and an output channel directly connected to an arithmetic operator.

[0012] When the compression method instruction sets a filter decomposition method, the identifying may include identifying a compressible block from among the plurality of blocks that includes a convolutional layer.

[0013] The structure of the trained model may be represented by connections between a plurality of user interface (UI) elements, each associated with a respective block among a plurality of blocks included in the trained model, each representing information of an associated block among the plurality of blocks, and the information of the associated block among the plurality of blocks may include identification information for the associated block and delay time data corresponding to the associated block.

[0014] The method may include receiving, via a computer network, information about a target device on which the trained model is to be executed, and receiving a plurality of delay time data from the target device, wherein each delay time data of the plurality of delay time data may be associated with a respective block of the plurality of blocks.

[0015] When a user selects a first UI element corresponding to a compressible block and displayed on the first screen, the method may further include sending a command to the user device to enable an interaction input field corresponding to the compressible block displayed on the second screen.

[0016] When the user selects a second UI element corresponding to the non-compressible block and displayed on the first screen, the method may further include sending a command to the user device to display detailed information about the non-compressible block on the first screen, where the detailed information about the non-compressible block may include at least one of the amount of channels or the size of the kernel included in the non-compressible block.

[0017] The structure of the trained model may be a tree structure.

[0018] When a user selects a first UI element corresponding to a compressible block and displayed on the first screen, the method may further include sending an instruction to the user device to display detailed information of the compressible block on the first screen, where the detailed information of the compressible block may include at least one of the amount of channels included in the compressible block or the size of the kernel.

[0019] The first UI element may include a checkbox.

[0020] The present disclosure may provide an electronic device for compressing a neural network model, the electronic device comprising: a communication interface configured to transmit and receive data via a data network and including at least one communication circuit; a persistent memory configured to store at least one operating instruction; and a processor, wherein executing the at least one operating instruction causes the processor to receive a trained model and compression method instructions for compressing the trained model; identify compressible blocks and non-compressible blocks from among a plurality of blocks included in the trained model based on the compression method instructions; and send to the user device via the communication interface an instruction to cause the user device to display, as a result, a structure of the trained model representing connection relationships between the plurality of blocks on a first screen so that the compressible blocks and the non-compressible blocks are visually distinguished, and to display, on a second screen, an interaction input field operable to receive parameter values ​​for compressing the compressible blocks; and compressing the trained model based on the parameter values ​​input by the user in the interaction input field.

[0021] When the compression method indication corresponds to a pruning method, the processor may be further configured to identify, from the plurality of blocks, a non-compressible block that includes an enabling function, a normalization function, and an output channel directly connected to an arithmetic operator.

[0022] When the compression method indication corresponds to a filter decomposition method, the processor may be further configured to identify a compressible block from the plurality of blocks that includes a convolutional layer.

[0023] The structure of the trained model may be represented as connections between a plurality of user interface (UI) elements, each of which may be associated with a respective block of a plurality of blocks included in the trained model and may represent information about the associated block, including identification information for the associated block of the plurality of blocks, and delay time data corresponding to the associated block.

[0024] The processor may be further configured to receive information about a target device on which the trained model is to be executed and to obtain a plurality of delay time data from the target device, each delay time data of the plurality of delay time data corresponding to a respective block of the plurality of blocks.

[0025] When a user selects a first UI element corresponding to the compressible block and displayed on the first screen, the processor may be further configured to cause the communication interface to send a command to the user device to enable an interaction input field corresponding to the compressible block displayed on the second screen.

[0026] When a user selects a second UI element corresponding to a non-compressible block and displayed on the first screen, the processor may be further configured to cause the communication interface to send an instruction to the user device to display detailed information about the non-compressible block on the first screen, and the detailed information about the non-compressible block may include at least one of the amount of channels or the size of the kernel included in the non-compressible block.

[0027] When a user selects a first UI element corresponding to a compressible block and displayed on the first screen, the processor may be further configured to send an instruction to the user device to display detailed information about the compressible block on the first screen, and the detailed information about the compressible block may include at least one of the amount of channels included in the compressible block or the size of the kernel.

[0028] The means for solving the problems of the present disclosure are not limited to the above means, and solutions not mentioned above will be apparent to those skilled in the art to which the present disclosure pertains from this specification and the accompanying drawings. [Effects of the Invention]

[0029] As described above, various embodiments of the present disclosure can provide a neural network model that is optimized for a target device.

[0030] According to various embodiments of the present disclosure as described above, a neural network model can be provided that is trained based on a data set input by a user.

[0031] According to various embodiments of the present disclosure as described above, a compression neural network model can be provided based on settings for compression entered by a user.

[0032] According to various embodiments of the present disclosure as described above, download data corresponding to a compressed neural network model may be provided.

[0033] Therefore, it is possible to improve the convenience and satisfaction of the user. [Brief explanation of the drawings]

[0034] Aspects, features, and advantages of particular embodiments of the present disclosure will become more apparent from the following description taken in conjunction with the accompanying drawings.

[0035] [Figure 1] FIG. 10 is a diagram illustrating an operation of an electronic device according to an embodiment of the present disclosure.

[0036] [Figure 2] FIG. 2 illustrates a first compression mode according to an embodiment of the present disclosure.

[0037] [Figure 3] FIG. 10 is a diagram illustrating a compression setting screen for a first compression mode according to an embodiment of the present disclosure.

[0038] [Figure 4] FIG. 10 illustrates a second compression mode according to an embodiment of the present disclosure.

[0039] [Figure 5] FIG. 10 is a diagram illustrating a compression setting screen for a second compression mode according to an embodiment of the present disclosure.

[0040] [Figure 6] FIG. 10 illustrates a screen for block compression settings according to an embodiment of the present disclosure.

[0041] [Figure 7] FIG. 1 illustrates a compression strategy according to an embodiment of the present disclosure.

[0042] [Figure 8] 1 is a flowchart illustrating a method for compressing a neural network model according to an embodiment of the present disclosure.

[0043] [Figure 9] FIG. 10 is a diagram illustrating a screen for setting a block compression setting value according to an embodiment of the present disclosure.

[0044] [Figure 10] FIG. 10 is a diagram illustrating a screen for setting a block compression setting value according to an embodiment of the present disclosure.

[0045] [Figure 11]FIG. 10 is a diagram illustrating a screen for setting a block compression setting value according to an embodiment of the present disclosure.

[0046] [Figure 12] FIG. 1 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0047] A brief explanation of the terms used herein will be given before describing the present disclosure in detail.

[0048] Considering the function of the present disclosure, currently widely used general terms are selected as terms to be used in the embodiments of the present disclosure, but they may be changed according to the intentions of those with knowledge of the technical field or precedents, the emergence of new technologies, etc. Furthermore, in specific cases, terms arbitrarily selected by the applicant may be used. In such cases, the meanings of those terms will be detailed in the corresponding explanation section of the present disclosure. Therefore, the terms used in the present disclosure should be defined based on the meaning of the terms and content throughout the entire disclosure, rather than the simple names of those terms.

[0049] Since the present disclosure may be modified in various ways and may have several embodiments, specific embodiments of the present disclosure are shown in the accompanying drawings and described in detail in the detailed description. However, it should be understood that the present disclosure is not limited to the specific embodiments as examples, and that all modifications, equivalents, and substitutions can be made without departing from the scope and spirit of the present disclosure. Detailed descriptions of known technologies related to the present disclosure will be omitted if it is determined that such descriptions may obscure the gist of the present disclosure.

[0050] Terms such as "first" and "second" may be used to describe various components, but these components should not be understood to be limited by these terms. These terms are used only to distinguish one component from another.

[0051] The singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly dictates otherwise. More specifically, as used in this specification and the appended claims, the singular indefinite and definite articles include plural referents unless the context clearly dictates otherwise. It should be understood that the terms "comprise" and "include" as used herein specify the presence of features, values, steps, operations, components, parts, or combinations thereof mentioned herein, but do not exclude the presence or addition of one or more other features, values, steps, operations, components, parts, or combinations thereof.

[0052] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art to which the present disclosure pertains can easily implement the present disclosure. However, the present disclosure may be modified in various different forms and is not limited to the embodiments described herein. Furthermore, in the drawings, parts that are not relevant to the description will be omitted to clearly explain the present disclosure, and similar reference numerals will be used to describe similar parts throughout the specification.

[0053] The details of the embodiments described herein, both in terms of structure and operation, are presented in the accompanying drawings, with like reference numerals indicating like or corresponding elements in the various drawings. Elements in the figures are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the embodiments. Moreover, all illustrations are intended to convey concepts, and relative sizes, shapes, and other detailed attributes may be shown schematically, rather than exactly or precisely.

[0054] The present disclosure may provide a method for providing a neural network model implemented by a computing device, the method including: receiving, in a processor of the computing device, a trained model that is trained based on a target device and a dataset identified in a device farm using information about the target device input by a user; compressing the trained model based on compression setting information and latency information received from the device farm; and providing download data corresponding to the compressed trained model so that the compressed trained model is deployed on the target device.

[0055] The compression setting information may include a first compression mode indicating that the trained model is compressed based on a model compression setting value set by a user. When the first compression mode is set, compressing the trained model may include identifying a plurality of compressible target blocks from a plurality of blocks included in the trained model, deriving a first compression parameter set including a block compression setting value for block compression to be applied to each of the plurality of target blocks based on both the model compression setting value and a given algorithm, and compressing the plurality of compressible target blocks based on the first compression parameter set.

[0056] Compressing the trained model may further include providing the first compression parameter set to a user, and when the block compression settings are modified by the user, compressing the trained model may further include compressing the plurality of target blocks based on a second compression parameter set that includes the modified block compression settings.

[0057] The compression setting information may include a second compression mode indicating that information of blocks included in the trained model is provided and that the trained model is to be compressed based on block compression setting values ​​set by a user. When the second compression mode is set, compressing may include identifying a plurality of compressible target blocks from a plurality of blocks included in the trained model, providing information of the plurality of target blocks to a user, receiving a third compression parameter set to be applied to each of the plurality of target blocks, the third compression parameter set including block compression setting values ​​set by the user for compressing the plurality of target blocks, and compressing the plurality of target blocks based on the third compression parameter set.

[0058] The information of the blocks included in the training model may include at least one of identification information of the blocks, delay times corresponding to the blocks, or the amount of channels included in the blocks.

[0059] Compressing the trained model may further include receiving a plurality of delay time data from the target device, wherein each delay time data of the plurality of delay time data may be associated with a respective block of the plurality of blocks, and each delay time data of the plurality of delay time data may be obtained by the target device by executing an associated block of the plurality of blocks.

[0060] The compression setting information may include at least one of a compression method, a compression setting value, or reference information for determining a compression target from among multiple channels included in the trained model.

[0061] The method may further include, at the processor, receiving a user command to retrain the compressed trained model; generating a retrained model based on the compressed trained model; and providing download data corresponding to the retrained model.

[0062] The method may further include performing, in the processor, at least one quantization or calibration operation on the compressed trained model based on information about the target device.

[0063] The present disclosure may provide an electronic device for providing a neural network model, the electronic device comprising: a communications interface configured to receive and transmit data over a data network and including at least one communications circuit; a memory configured to store at least one operational instruction; and a processor, wherein execution of the at least one operational instruction causes the processor to: receive a trained model that is trained based on a target device and a dataset identified in a device farm using information about the target device input by a user; compress the trained model based on compression setting information and delay time information received from the device farm; and provide download data corresponding to the compressed trained model so that the compressed trained model is deployed on the target device.

[0064] The compression setting information may include a compression mode indicating that the trained model is to be compressed based on a model compression setting value set by a user. When a first compression mode is set, the processor may identify a plurality of compressible target blocks from a plurality of blocks included in the trained model, derive a first compression parameter set including a block compression setting value for block compression to be applied to each of the plurality of target blocks based on both the model compression setting value and the given algorithm, and compress the plurality of compressible target blocks based on the first compression parameter set.

[0065] The processor may provide a first compression parameter set to a user, and when at least one of the block compression settings is modified by the user, the processor may compress the plurality of target blocks based on a second compression parameter set that includes the modified at least one of the block compression settings.

[0066] The compression setting information includes a second compression mode indicating that information of blocks included in the trained model is provided. The trained model may be compressed based on block compression setting values ​​set by a user. When the second compression mode is set, the processor may identify a plurality of compressible target blocks from a plurality of blocks included in the trained model, provide information of the plurality of target blocks to a user, receive a third compression parameter set including block compression setting values ​​set by the user for compressing the plurality of target blocks to be applied to each of the plurality of target blocks, and compress the plurality of target blocks based on the third compression parameters.

[0067] The information of the blocks included in the training module may include at least one of the following: identification information of the block, a delay time corresponding to the block, or the amount of channels included in the block.

[0068] The processor may receive a plurality of delay time data from the target device, each of the plurality of delay time data may be associated with a respective block of the plurality of blocks, and each of the delay time data may be obtained by the target device executing an associated block of the plurality of blocks.

[0069] The compression setting information may include at least one of a compression method, a compression setting value, or reference information for determining a compression target from among multiple channels included in the trained model.

[0070] The processor may receive a user instruction to retrain the compressed trained model, generate a retrained model based on the compressed trained model, and provide download data corresponding to the retrained model.

[0071] The processor may quantize or calibrate the compressed trained model based on information about the target device.

[0072] The processor may determine a compression setting for the trained model based on the delay time information.

[0073] FIG. 1 is a diagram illustrating the operation of an electronic device according to an embodiment of the present disclosure.

[0074] 1, the electronic device 1200 may include a model acquisition unit 110, a compression unit 120, and a launcher unit 130. The model acquisition unit 110, the compression unit 120, and the launcher unit 130 may be implemented as software modules. A processor 1230 may load instructions associated with each unit into a memory 1220 and execute the instructions.

[0075] The model acquisition unit 110 may acquire a trained model 115 based on the target set 101 and the target device information 102 (or information of the target device). For example, the model acquisition unit 110 may perform a first project to acquire a first trained model. The model acquisition unit 110 may receive a compressed model 125 from the compression unit 120. The model acquisition unit 110 may acquire a re-trained model by performing a third project set based on the compressed model 125.

[0076] The model acquisition unit 110 may send the trained model 115 to the compression unit 120 or the launcher unit 130. For example, the model acquisition unit 110 may send a first trained model to the compression unit 120. The model acquisition unit 110 may send a re-trained model to the launcher unit 130. Other operations of the electronic device 1200 related to the model acquisition unit 110 (e.g., operations for implementing a project) have been described above, and therefore will not be described in detail again.

[0077] The compression unit 120 may output a lightweight model by performing compression on the input model. The compression unit 120 may compress the trained model 115 or the neural network model 135 to generate the compressed model 125. The neural network model 135 may be a predetermined model not acquired by the model acquisition unit 110. The compression unit 120 may transmit the compressed model 125 to the launcher unit 130 or the model acquisition unit 110.

[0078] The compression unit 120 may compress the input model based on compression setting information set by a user. The compression setting information may include at least one of a compression mode, a compression method, a compression setting value, or reference information for determining a compression target from multiple channels included in the input model. The compression modes may include a first compression mode for compressing the input model based on a model compression setting value set by a user for compressing the input model. The compression modes may include a second compression mode for providing the user with information about blocks included in the input model and compressing the trained model based on a block compression setting value set by the user for block compression.

[0079] The launcher unit 130 may output download data 145 corresponding to the input models to be deployed on the target device. The models input to the launcher unit 130 may include the compressed model 125, the neural network model 135, and the retrained model.

[0080] The launcher unit 130 may perform quantization on the input model based on the target device information 102. The target device information 102 may include a data type (e.g., an 8-bit integer type) supported by the target device. The launcher unit 130 may convert the data type of the input model into the data type supported by the target device.

[0081] The launcher unit 130 may perform calibration on the input model. The launcher unit 130 may perform the calibration based on a code entered by a user or a pre-stored code. For example, the launcher unit 130 may adjust the quantization interval. The launcher unit 130 may perform quantization based on the adjusted quantization interval. Parameter values ​​(e.g., weight values) of the input model or the quantized model may be changed accordingly.

[0082] The launcher unit 130 may provide the user with download data 145. The download data 145 may refer to a download file, a download package, or similar collected data. When the user requests the download data 145, the launcher unit 130 may transmit the download data 145 to the user device. In response, a neural network model optimized for the target device may be installed on the user device.

[0083] 2 is a diagram illustrating a first compression mode according to an embodiment of the present disclosure. Each operation may be performed by the processor 1230.

[0084] 2, the electronic device 1200 may receive model compression setting values ​​set by a user for compressing a base model (S210). For example, the model compression setting values ​​may include a value for determining a pruning ratio indicating the degree of pruning and the number of ranks. The base model may include the trained model 115 and the neural network model 135 acquired by the model acquisition unit 110.

[0085] The electronic device 1200 may identify (S220) a plurality of compressible target blocks from among a plurality of blocks included in the base model. The block may be a layer set including at least one layer. The block may include various types of layers. For example, the block may include a convolutional layer, an activation function, a regularization function, and an arithmetic operator (e.g., an addition operator or a multiplication operator).

[0086] The electronic device 1200 may identify a block other than a block predefined as an incompressible block as the target block. A block predefined as an incompressible block may include a block with an enable function or a disable function. Furthermore, a block predefined as an incompressible block may include a block whose output channel is directly connected to an arithmetic operator. Here, an output channel being directly connected to an arithmetic operator may mean that no block with a weight value exists between the output channel and the arithmetic operator. For example, a block immediately before the arithmetic operator may be an incompressible block.

[0087] The electronic device 1200 may derive (S230) a setting value for compressing a plurality of first blocks associated with each of the plurality of target blocks based on the model compression setting value and a given algorithm. The given algorithm may include so-called layer-adaptive sparsity for the magnitude-based pruning (LAMP) and variational Bayesian matrix factorization (VBMF). The block compression setting value may include a pruning ratio and a rank number indicating the degree of pruning of each block. In the present disclosure, the model compression setting value may refer to a value corresponding to the entire model, and the model compression setting value may refer to a value corresponding to each block included in the model.

[0088] The electronic device 1200 may obtain block compression setting values ​​based on the delay times obtained from the device farm. For example, the electronic device 1200 may obtain a compression ratio to be applied to a block such that the compression ratio increases as the delay time corresponding to the block increases. Furthermore, the electronic device 1200 may adjust the obtained block compression setting values ​​based on a given algorithm using the delay times obtained from the device farm.

[0089] The electronic device 1200 may compress the plurality of target blocks based on the setting values ​​for compressing the plurality of first blocks (S240). In response, the electronic device 1200 may obtain a compression model. For example, the electronic device 1200 may perform pruning on the plurality of target blocks. Alternatively, the electronic device 1200 may perform filter decomposition (or filter loss decomposition) on the plurality of target blocks.

[0090] The electronic device 1200 may provide the setting values ​​for compressing the plurality of first blocks to the user. For example, the electronic device 1200 may transmit to the user device a command related to displaying the setting values ​​for compressing the plurality of first blocks and the setting values ​​for compressing the plurality of first blocks, thereby causing the setting values ​​for compressing the plurality of blocks to be displayed on the user device. In response, the user device may display the setting values ​​for compressing the plurality of first blocks.

[0091] A user may modify at least one block compression setting value from among the setting values ​​for compressing the plurality of first blocks. Electronic device 1200 may receive a user instruction from a user device to modify the setting value for compressing the at least one first block. Electronic device 1200 may compress the plurality of target blocks based on the user instruction.

[0092] In the first compression mode, a user may obtain a lightweight model by inputting only configuration values ​​for compressing a single model. Accordingly, user convenience may be improved. In another embodiment, a user may input configuration values ​​for compressing multiple models, each associated with a respective one of multiple compression methods. For example, a user may input configuration values ​​for a first model compression corresponding to pruning and configuration values ​​for a second model compression corresponding to filter decomposition.

[0093] FIG. 3 is a compression setting screen for the first compression mode according to an embodiment of the present disclosure.

[0094] 3, a compression settings screen 300 may include a first area 310 for receiving a name for the compressed model, a second area 320 for receiving user notes for compression, a third area 330 for receiving a base model to be compressed, and a fourth area 340 for receiving model compression settings. The compression settings screen 300 may be displayed on a user device.

[0095] The user device may transmit information input into the compression setting screen 300 to the electronic device 1200. The electronic device 1200 may acquire setting values ​​for compressing multiple blocks corresponding to multiple target blocks included in the base model based on the information input into the compression setting screen 300. The electronic device 1200 may identify the model selected in the third area 330 as the base model. The third area 330 may be provided with a list of models including the trained model 115 and the neural network model 135 acquired by the model acquisition unit 110. The electronic device 1200 may acquire multiple compression ratios corresponding to the multiple target blocks based on the compression ratios set by the user in the fourth area 340.

[0096] The electronic device 1200 may obtain a model compression setting value corresponding to a predetermined compression method based on a model compression setting value set by a user. The predetermined compression method may include pruning and / or filter decomposition. For example, the electronic device 1200 may obtain a pruning ratio corresponding to a target block based on a compression ratio set by a user. Alternatively, the electronic device 1200 may obtain a rank number corresponding to a target block based on a compression ratio set by a user. The predetermined compression method may be set by a user.

[0097] There may be multiple predetermined compression methods. For example, the electronic device 1200 may obtain a pruning ratio and a rank number corresponding to the target block based on a compression ratio set by a user. The electronic device 1200 may perform pruning and filter decomposition on the base model.

[0098] Alternatively, the user may set both the compression method and the model compression setting value. For example, the user may select pruning as the compression method and input a pruning ratio corresponding to the base model. In this case, the electronic device 1200 may obtain a pruning ratio corresponding to the target block included in the base model based on the pruning ratio corresponding to the base model.

[0099] 3, the compression setting screen 300 may include a compression method selection area for receiving a user command to select a compression method, or the compression method selection area may be provided on a separate screen.

[0100] 4 is a diagram illustrating the second compression mode according to an embodiment of the present disclosure. Each operation may be performed by the processor 1230.

[0101] 4, the electronic device 1200 may derive profile information of the base model by analyzing the base model (S410). The profile information of the base model may include information on each block included in the base model. The information on each block may include block identification information, delay information corresponding to the block, the amount of channels included in the block, and the size of the kernel included in the block.

[0102] The electronic device 1200 may provide the profile information of the base model to the user (S420). The electronic device 1200 may transmit the profile information of the base model to the user device. The user device may display the profile information of the base model.

[0103] The electronic device 1200 may receive setting values ​​for compressing a plurality of second blocks set by a user for compressing a plurality of target blocks included in the base model (S430). The setting values ​​for compressing the plurality of second blocks may each correspond to a plurality of target blocks.

[0104] The electronic device 1200 may compress the target blocks based on the set values ​​for compressing the second blocks (S440). For example, the electronic device 1200 may perform pruning or filter decomposition on the target blocks. In response, the electronic device 1200 may obtain a lightweight model.

[0105] FIG. 5 is a compression setting screen for the second compression mode according to an embodiment of the present disclosure.

[0106] 5, a compression settings screen 500 may include a first area 510 for receiving the name and notes of the compressed model, a second area 520 for receiving the base model to be compressed, and a third area 530 for receiving the compression method. A description 531 of the selected compression method may be displayed in the third area 530.

[0107] The compression method may include pruning and filter decomposition. The pruning may include a first type of pruning based on a criterion and a second type of pruning based on an index set by a user. The filter decomposition may include Tacker decomposition and canonical / polyadic (CP) decomposition. The compression setting screen 500 may be displayed on a user device. The user device may transmit user input related information entered on the compression setting screen 500 to the electronic device 1200. The electronic device 1200 may perform compression on the base model based on the base model and the compression method selected by the user.

[0108] FIG. 6 is a screen for setting block compression setting values ​​according to an embodiment of the present disclosure.

[0109] 6, a screen 600 for setting block compression settings may include a first screen 610 on which information about a base model is displayed and a second screen 620 for receiving block compression settings. The architecture of the base model may be displayed on the first screen 610. Furthermore, the delay time corresponding to each block and the amount of channels included in the model may be displayed on the first screen 610.

[0110] The user device may acquire a user input for setting a block compression setting value on the second screen 620. For example, the user device may acquire a setting value (e.g., 0.5) for a first block compression corresponding to a first block (block 1). The user device may transmit the setting value for the first block compression to the electronic device 1200. The electronic device 1200 may compress the first block based on the setting value for the first block compression.

[0111] In this way, in the second compression mode, the user may set desired block compression settings for each block and obtain a compression model in which each block is compressed as desired, and user satisfaction may be improved accordingly.

[0112] Although not shown, a UI element for selecting a compression policy may be displayed on the compression setting screen 500 or the screen 600. The compression policy may refer to rules regarding how compression is performed. For example, if the compression method is pruning, the channels to be pruned may vary depending on the compression policy even if the setting values ​​for compression are the same.

[0113] 7 is a diagram for explaining the compression strategies according to an embodiment of the present disclosure, specifically showing pruned nodes for three compression strategies.

[0114] Referring to Figure 7, a block may include a first layer 710 and a second layer 720. The first layer 710 may include multiple nodes N11, N12, N13, N14, and N15. The second layer 720 may include multiple nodes N21, N22, N23, N24, and N25. Nodes N11 and N21 have the same index. Nodes N12 and N22 have the same index. Nodes N13 and N23 have the same index. Nodes N14 and N24 have the same index. Nodes N15 and N25 have the same index.

[0115] The number displayed on each node (or neuron) indicates the importance of each node. For example, the importance of node N11 is 0.08, and the importance of node N12 is 0.14. The displayed importance may be a normalized value. The electronic device 1200 may calculate the importance of each node based on the compression method selected by the user. For example, when "L2 norm pruning" is selected in the third field 530, the electronic device 1200 may calculate the importance of each node based on the L2 norm.

[0116] The electronic device 1200 may determine the nodes to be pruned based on the compression policy and the importance of each node. Pruning methods according to various compression policies will be described below.

[0117] When the compression strategy is set as the first strategy (average), the electronic device 1200 may identify two nodes in order of decreasing importance for each channel. For example, the electronic device 1200 may identify nodes N11 and N12 for the first channel 710. The electronic device 1200 may identify nodes N22 and N24 for the second channel 720. The electronic device 1200 may calculate an average value of the identified nodes and nodes having the same index as the identified nodes. For example, the electronic device 1200 may calculate an average value of the importance of node N11 and the importance of node N21. Furthermore, the electronic device 1200 may calculate an average value of the importance of node N12 and the importance of node N22. The electronic device 1200 may prune nodes included in the node set with the lowest average value. For example, the electronic device 1200 may prune nodes N12 and N21. Furthermore, the electronic device 1200 may prune the node N12 and the node N22.

[0118] When the compression strategy is set as the second strategy (intersection), the electronic device 1200 may identify two nodes in order of decreasing importance for each channel. For example, the electronic device 1200 may identify nodes N11 and N12 in the first channel 710. The electronic device 1200 may identify nodes N22 and N24 in the second channel 720. The electronic device 1200 may prune nodes having the same index from the identified nodes. For example, the electronic device 1200 may prune nodes N12 and N22.

[0119] When the compression policy is set to the third policy (combine), the electronic device 1200 may identify two nodes in order of least important for each channel. For example, the electronic device 1200 may identify nodes N11 and N12 in the first channel 710. The electronic device 1200 may identify nodes N22 and N24 in the second channel 720. The electronic device 1200 may prune nodes having the same index as each of the identified nodes. For example, the electronic device 1200 may prune node N11 and node N21 having the same index as node N11. The electronic device 1200 may prune node N12 and node N22. The electronic device 1200 may prune node N24 and node N14 having the same index as node N24.

[0120] 7, the number of nodes identified for each channel is two, but the present disclosure is not limited to this. For example, electronic device 1200 may identify three or more nodes in order of decreasing importance for each channel.

[0121] FIG. 8 is a flowchart illustrating a method for compressing a neural network model according to an embodiment of the present disclosure.

[0122] 8, the electronic device 1200 may receive a trained model and a compression method for compressing the trained model (S810). For example, the electronic device 1200 may acquire the trained model 115 based on the model acquisition unit 110. Alternatively, the electronic device 1200 may acquire the neural network model 135.

[0123] The electronic device 1200 may identify compressible blocks and non-compressible blocks among the blocks included in the trained model based on the compression method (S820). In the present disclosure, non-compressible blocks may include not only blocks that do not need to be compressed, but also blocks that may be compressed but whose performance as a compressed model is lower than a threshold when compressed.

[0124] The criteria for determining whether a trained model is compressible may vary depending on the compression method, which may include pruning and filter decomposition.

[0125] When the compression method is pruning, the electronic device 1200 may identify an enabling function, a normalizing function, or a block whose output channel is directly connected to an arithmetic operator as a non-compressible block. Here, an output channel directly connected to an arithmetic operator may mean that no other block having a weight value exists between the corresponding block and the arithmetic operator. For example, a third block, a fourth block, and a fifth block may be connected in series. The fourth block may be an enabling function or a normalizing function, and the fifth block may be an arithmetic operator. In this case, the third block may be a "block whose output channel is directly connected to an arithmetic operator." Accordingly, the electronic device 1200 may determine that the third block is a non-compressible block.

[0126] When the compression method is filter decomposition, the electronic device 1200 may identify layers including convolutional layers as compressible blocks.

[0127] The electronic device 1200 may send a command to the user device to display the structure of the trained model representing the connection relationships between multiple blocks on the first screen, thereby visually distinguishing between compressible blocks and non-compressible blocks, and to display an input field for receiving a setting value for compressing the compressible blocks on the second screen (S830). The user device may display the structure of the trained model on the first screen based on the command received from the electronic device 1200. Furthermore, the user device may display an input field for receiving a setting value for compressing the compressible blocks on the second screen. The user device may output the first screen and the second screen simultaneously.

[0128] The structure of the trained model may represent a connection relationship between a plurality of UI elements associated with each of a plurality of blocks included in the trained model. Each of the plurality of UI elements may represent information about one of the plurality of blocks. The information about one of the plurality of blocks may include identification information of each of the plurality of blocks and a plurality of delay times associated with each of the plurality of blocks. For example, the structure of the trained model may be represented in the form of a graph in which the plurality of UI elements are represented as nodes.

[0129] Meanwhile, electronic device 1200 may obtain multiple delay times associated with each of the multiple blocks using a device farm including a target device on which the trained model is executed. For example, when the target device is selected as a first device, the user device may send information about the first device to electronic device 1200. Electronic device 1200 may identify the first device in the device farm based on the information about the first device. Electronic device 1200 may calculate multiple delay times associated with each of the multiple blocks by executing the trained model on the first device.

[0130] The electronic device 1200 may compress the trained model based on the block compression setting value input by the user in the input field (S840). For example, the electronic device 1200 may prune the trained model based on the pruning ratio input by the user.

[0131] On the other hand, when a first UI element corresponding to a compressible block displayed on the first screen is selected, electronic device 1200 may send a command to the user device to enable an input field corresponding to the compressible block displayed on the second screen. In response, the user may input a setting value for compression into the enabled input field. Furthermore, when the first UI element is selected, electronic device 1200 may send a command to the user device to display detailed information about the compressible block corresponding to the selected first UI element on the first screen.

[0132] When a second UI element corresponding to an incompressible block displayed on the first screen is selected, electronic device 1200 may send a command to the user device to display detailed information about the incompressible block on the first screen. The detailed information about the incompressible block may include at least one of the amount of channels included in the incompressible block or the size of the kernel.

[0133] 8 has been described as the user device displaying the first screen and the second screen based on instructions received from electronic device 1200. In one embodiment, the user device may display the first screen and the second screen based on user input without instructions received from electronic device 1200. For example, when user input is obtained to select a UI element corresponding to a first compressible block displayed on the first screen, the user device may enable a first input field corresponding to the first block displayed on the second screen.

[0134] The first screen and the second screen will be described in detail below.

[0135] 9 illustrates a screen for setting block compression setting values ​​according to an embodiment of the present disclosure. Screen 900 may be displayed on a user device when the compression mode is set as the second compression mode. A user may input block compression setting values ​​corresponding to blocks included in a trained model to be compressed based on screen 900.

[0136] 9 , a screen 900 may include a first screen 910 and a second screen 920. The user device may display the structure of the trained model on the first screen 910. For example, the structure of the trained model may be a hierarchical structure in which multiple UI elements 911, 912, 913, 914, 915, 916, and 917 associated with each of multiple blocks (add, conv1, conv2, relu, hardsigmoid, mul, and conv3) included in the trained model are represented by nodes. The structure of the trained model may represent the connection relationships between the multiple UI elements 911, 912, 913, 914, 915, 916, and 917.

[0137] The user device may display multiple UI elements 911, 912, 913, 914, 915, 916, and 917 on a first screen 910. Each of the multiple UI elements 911, 912, 913, 914, 915, 916, and 917 may indicate information about the corresponding block. For example, the first UI element 911 corresponding to the first block (add) may include an indicator LI1 indicating the delay time corresponding to the first block (add). In this way, when the delay times corresponding to the blocks are displayed on the screen 900, the user may refer to the displayed delay times when determining the block compression setting values. In other words, the setting value for compressing each block may be determined based on the delay time corresponding to each block. Furthermore, user convenience may be improved.

[0138] The user device may distinguish between compressible blocks and non-compressible blocks. In FIG. 9 , the electronic device 1200 may determine the first block (add), the sixth block (mul), and the seventh block (conv3) as compressible blocks. The electronic device 1200 may determine the second block (conv1), the third block (conv2), the fourth block (relu), and the fifth block (harsigmoid) as non-compressible blocks. Specifically, the second block (conv1) and the third block (conv2) may be determined as non-compressible blocks because their output channels are directly connected to the sixth block (mul), which is a multiplication operator. The fourth block (relu) and the fifth block (harsigmoid) may be determined as non-compressible blocks because they are enabling functions.

[0139] For example, UI elements 911, 916, and 917 corresponding to compressible blocks (add, mul, and conv3) may include check boxes CB1, CB6, and CB7. UI elements 912, 913, 914, and 915 corresponding to non-compressible blocks (conv1, conv2, relu, and hardsigmoid) may not include check boxes. UI elements 911, 916, and 917 may be displayed with better visibility than UI elements 912, 913, 914, and 915. For example, UI elements 911, 916, and 917 may be displayed brighter than UI elements 912, 913, 914, and 915. Alternatively, UI elements 911, 916, and 917 may be displayed with solid lines, and UI elements 912, 913, 914, and 915 may be displayed with dotted lines.

[0140] The user device may display information about the compressible blocks on the second screen 920. For example, the user device may indicate the number of output channels and the names of each of the compressible blocks (add, mul, and conv3). The user device may display input fields for receiving setting values ​​for compression of the compressible blocks. Here, the setting values ​​for compression refer to the block compression setting values ​​described above. For example, the user device may display input fields IF1, IF2, and IF3, respectively, associated with each of the compressible blocks (add, mul, and conv3). The input fields IF1, IF2, and IF3 may receive a pruning ratio. Furthermore, the user device may display check boxes CB11, CB12, and CB13 for selecting each of the compressible blocks (add, mul, and conv3).

[0141] FIG. 10 is a screen for setting block compression setting values ​​according to an embodiment of the present disclosure.

[0142] 10 , the user device may display the second screen 920 based on a user input acquired through the first screen 910. For example, the first UI element 911 or the first block (add) may be selected by the user. For example, the user may click a check box CB11. The user device may display a check mark in the check box CB1 corresponding to the selected first block (add) and enable the first input field IF1. The selection of the first UI element 911 may be released. In this case, the user device may disable the first input field IF1.

[0143] The user device may display the first screen 910 based on user input acquired through the second screen 920. For example, when a check box CB11 corresponding to the first block (add) is selected, the user device may display a check mark in the check box CB1 corresponding to the first block (add). When the selection of the check box CB11 is released, the user device may remove the check mark displayed in the check box CB1.

[0144] FIG. 11 is a screen for setting block compression setting values ​​according to an embodiment of the present disclosure.

[0145] Referring to FIG. 11 , the user device may provide detailed information related to a block selected by the user. The detailed information related to the block may include at least one of the number of channels, the kernel size, the stride, or the delay time included in the block. For example, the seventh block (conv3) may be selected. In this case, the user device may display detailed information 930 related to the seventh block (conv3) on the first screen 910. On the other hand, the user may select an incompressible block. For example, the user may select the second block (conv1). In this case, the user device may display detailed information related to the second block (conv2) on the first screen 910.

[0146] 9 to 11 show that the input field receives a ratio greater than 0 and less than or equal to 1 as the block compression setting value. However, the present disclosure is not limited thereto, and the range of the block compression setting value may be changed variously depending on the compression method. For example, when the compression method is index-based second type pruning, the input field may receive an index of the channel to be pruned. As another example, when the compression method is Tucker decomposition, the input field may receive the amount of input channels of the core tensor and the amount of output channels of the core tensor.

[0147] Meanwhile, the block compression setting value may be input by a user or determined by the electronic device 1200. For example, the electronic device 1200 may set the compression ratio of each block based on the delay time corresponding to each block. The electronic device 1200 may set the compression ratio of the block so that the longer the delay time corresponding to the block, the higher the compression ratio of the block. Referring to FIG. 9, the compression ratio corresponding to the first block (add) may be smaller than the compression ratio corresponding to the sixth block (mul).

[0148] FIG. 12 is a block diagram showing the configuration of an electronic device according to an embodiment of the present disclosure.

[0149] 12, the electronic device 1200 may include a communication interface 1210, a memory 1220, and a processor 1230. For example, the electronic device 1200 may be implemented as a physical server or a cloud server.

[0150] The communication interface 1210 includes at least one communication circuit and may communicate with various types of external devices. For example, the communication interface 1210 may receive a dataset and target device information from the external device. The external device may be a user device. The user device may include a personal computer and a mobile device. The communication interface 1210 may transmit information about the multiple base models searched for based on the target device information to the external device. In response, the external device may output the information about the multiple base models. The communication interface 1210 may receive a user command from the external device to select at least one of the multiple base models.

[0151] The communication interface 1210 may transmit the at least one selected base model and the dataset to an external server. The external server may obtain a trained neural network model (or trained model) after training the at least one selected base model using the dataset. The communication interface 1210 may receive the trained model from the external server.

[0152] The communication interface 1210 may transmit the trained model to an external device. The communication interface 1210 may transmit information about the trained model to the external device. The information about the trained model may include the name of the trained model, the task performed by the trained model, information about the target device corresponding to the trained model, and the performance (e.g., accuracy and latency) of the trained model. Meanwhile, in the present disclosure, acquiring / storing / sending / receiving a neural network model means acquiring / storing / sending / receiving data related to the model (e.g., architecture, weight).

[0153] The communication interface 1210 may include at least one of a Wi-Fi communication module, a cellular communication module, a third generation (3G) mobile communication module, a fourth generation (4G) mobile communication module, a fourth generation Long Term Evolution (LTE) communication module, a fifth generation (5G) mobile communication module, or a wired Ethernet.

[0154] Memory 1220 may store an operating system (OS) for controlling the overall operation of the components of electronic device 1200, as well as instructions or data related to the components of electronic device 1200. Memory 1220 may be implemented as non-volatile memory (e.g., a hard disk, a solid-state drive (SSD), and flash memory), volatile memory, etc.

[0155] The memory 1220 may include a database (DB). For example, the memory 1220 may include a dataset DB for storing datasets. The memory 1220 may include a project DB for storing projects. The memory 1220 may include a model DB for storing trained models. Information stored in the DB may be provided to a user. For example, a list of datasets, a list of projects, and / or a list of models may be displayed on an external device.

[0156] The memory 1220 may store information on the multiple neural network models. For example, the memory 1220 may store identification information of the multiple neural network models, information on the target device, and a lookup table against which performance information of the multiple neural network models is matched. The performance information of the multiple neural network models may reflect the performance (e.g., latency) of each of the multiple neural network models when the neural network model is executed in the target device. The performance of the neural network model for the target device may be the performance of the neural network model when the neural network model is executed in the target device. The latency of the neural network model may be obtained from a device farm. The accuracy of the neural network model may be obtained using test data.

[0157] The memory 1220 may store a given algorithm for searching for a base model. The given algorithm may include at least one of a hyperparameter optimization (HPO) algorithm or a neural architecture search (NAS) algorithm. The hyperparameter optimization algorithm may include a tree-structured Parzen estimator (TPE). The TPE algorithm may be based on Bayesian optimization. The neural network architecture search algorithm may be based on an evolutionary algorithm.

[0158] The processor 1230 may be electrically connected to the memory 1220 to control the overall operation and functionality of the electronic device 1200. The processor 1230 may control the electronic device 1200 by executing instructions stored in the memory 1220.

[0159] The processor 1230 may acquire the trained model and a compression method for compressing the trained model. For example, the processor 1230 may acquire the trained model 115 based on the model acquisition unit 110. Alternatively, the processor 1230 may acquire the neural network model 135.

[0160] The processor 1230 may identify compressible and non-compressible blocks from among the blocks included in the trained model based on the compression method.

[0161] Depending on the compression method, the criteria for determining whether a trained model is compressible may differ, and compression methods may include pruning and filter decomposition.

[0162] When the compression method is pruning, the processor 1230 may identify, as the non-compressible blocks, the enabling function, the normalizing function, and a block whose output channel is directly connected to an arithmetic operator. Here, the fact that the output channel is directly connected to the arithmetic operator may mean that no other block having a weight value exists between the corresponding block and the arithmetic operator. For example, the third block, the fourth block, and the fifth block may be connected in series. The fourth block may be the enabling function or the normalizing function, and the fifth block may be the arithmetic operator. In this case, the third block may be a "block whose output channel is directly connected to the arithmetic operator." Accordingly, the processor 1230 may determine that the third block is a non-compressible block.

[0163] When the compression method is filter decomposition, the processor 1230 may identify blocks that include convolutional layers as compressible blocks.

[0164] The structure of the trained model may represent the connection relationships between multiple blocks on the first screen so that compressible blocks and non-compressible blocks are visually distinguished. The processor 1230 may send a command to the user device to control the communication interface 1210 to display, on the second screen, an input field for receiving a setting value for compressing the compressible block. The user device may display the structure of the trained model on the first screen based on the command received from the electronic device 1200. Furthermore, the user device may display, on the second screen, an input field for receiving a setting value for compressing the compressible block. The user device may output the first screen and the second screen simultaneously.

[0165] The structure of the trained model may represent a connection relationship between a plurality of UI elements associated with each of a plurality of blocks included in the trained model. Each of the plurality of UI elements may represent information about one of the plurality of blocks. The information about one of the plurality of blocks may include identification information of each of the plurality of blocks and a plurality of delay times associated with each of the plurality of blocks. For example, the structure of the trained model may be represented in the form of a graph in which the plurality of UI elements are represented as nodes.

[0166] Meanwhile, processor 1230 may obtain a plurality of delay times associated with each of the plurality of blocks using a device farm including a target device on which the trained model is executed. For example, when the target device is selected as the first device, the user device may transmit information about the first device to electronic device 1200. Processor 1230 may identify the first device within the device farm based on the information about the first device. Processor 1230 may calculate a plurality of delay times associated with each of the plurality of blocks by executing the trained model on the first device.

[0167] The processor 1230 may compress the trained model based on the block compression setting value entered by the user in the input field. For example, the processor 1230 may perform pruning on the trained model based on the pruning entered by the user.

[0168] The various example embodiments of the present disclosure described above may be implemented in a computer or computer-readable storage medium using software, hardware, or a combination of software and hardware. In some cases, the embodiments described in the present disclosure may be implemented as a processor itself. In a software implementation, embodiments such as the procedures and functions described in the present disclosure may be implemented as separate software modules. The software modules may each perform one or more functions and operations described in the present disclosure.

[0169] Computer instructions for performing the processing operations according to the various embodiments of the present disclosure described above may be stored on a non-transitory computer-readable medium, which, when executed by a processor, causes a particular machine to perform the processing operations according to the various embodiments described above.

[0170] A non-transitory computer-readable medium is a medium that stores data semi-permanently and is readable by a device, as opposed to a medium that stores data temporarily, such as a register, cache, memory, etc. Examples of non-transitory computer-readable media include compact discs (CDs), digital versatile discs (DVDs), hard disks, Blu-ray discs, universal serial buses (USBs), memory cards, and read-only memories (ROMs).

[0171] The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, "non-transitory storage medium" means a storage medium that is a tangible device and does not contain a signal (e.g., an electromagnetic wave), and the term does not distinguish between cases where data is semi-permanently stored on the storage medium and cases where data is temporarily stored thereon. For example, a "non-transitory storage medium" may include a buffer where data is temporarily stored.

[0172] The method according to various embodiments disclosed herein may be provided in a computer program product. The computer program product may be exchanged as a commodity between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read-only memory (CD-ROM)), or may be distributed (e.g., downloaded or uploaded) through an application store (e.g., the Play Store®), or may be distributed (e.g., downloaded or uploaded) directly online between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., a downloadable app) may be at least temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0173] According to various embodiments of the present disclosure described above, a neural network model can be provided that is optimized for a target device.

[0174] According to various embodiments of the present disclosure described above, a neural network model can be provided that is trained based on a data set input by a user.

[0175] According to various embodiments of the present disclosure described above, a compression neural network model can be provided based on settings for compression entered by a user.

[0176] According to various embodiments of the present disclosure described above, download data corresponding to a compressed neural network model may be provided.

[0177] Accordingly, it is possible to improve the convenience and satisfaction of the user.

[0178] In many cases, entities have been described as being linked to other entities. The terms "linked" and "connected" (or any of these variations) are used interchangeably herein and should be understood to refer inclusively, in both cases, to two entities being directly linked (without any significant (e.g., parasitic) intervening entities) and to two entities being indirectly linked (with one or more significant intervening entities). When entities are shown as being directly linked to each other or described as being linked together without any description of any intervening entities, it should be understood that these entities may be indirectly linked unless the context clearly dictates otherwise.

[0179] It is contemplated that the preferred features of the described variations of the present invention may be set forth and claimed independently or in combination with one or more of the features described herein. It is further noted that the claims may be drafted to exclude any element of an embodiment. As such, this description is intended to serve as a precedent for the use of exclusive language, such as "solely" or "only," or the use of "negative" limitations, when used in connection with the recitation of claim elements. Unless otherwise specified herein, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. The breadth of the present invention is not limited by this specification, but rather by the plain meaning of the claim terms employed.

[0180] Furthermore, the advantages that can be obtained or expected by the embodiments of the present disclosure have been directly or implicitly disclosed in the detailed description of the embodiments of the present disclosure. For example, various advantages expected by the embodiments of the present disclosure are disclosed in the detailed description above.

[0181] The embodiments and claims described herein are directed to patentable subject matter. These embodiments do not constitute an abstract idea for several reasons, including because each claim provides a neural network optimization capability. These apparatus and computer-implemented methods enhance the functionality of a computer by determining attributes of a target device and obtaining and / or using a neural network model optimized for the target device, otherwise running a suboptimized neural network, and may be considered to go "significantly more than" the abstract idea.

[0182] Other aspects, advantages, and salient features of the present disclosure will become apparent to those skilled in the art from the foregoing detailed description, taken in conjunction with the accompanying drawings, which disclose various embodiments of the present disclosure.

[0183] Although the embodiments of the present disclosure have been shown and described above, the present disclosure is not limited to the above-described specific embodiments, and various modifications may be made by those skilled in the art to which the present disclosure pertains without departing from the spirit of the present disclosure as disclosed in the appended claims. It should also be understood that these modifications are within the scope and spirit of the present disclosure.

Claims

1. 1. A method for controlling a server for compressing a neural network model, comprising: receiving a selection for a compression mode from a user device, the compression mode comprising: a first compression mode for compressing all of the neural network models; a second compression mode for compressing at least one block of the neural network model; It is one of the following; When the first compression mode is selected: receiving a first setting value from the user device, the first setting value being a single value; automatically determining, by the server, a first compression setting value for the block to be compressed based on the first setting value, the first compression setting value corresponding to a predefined first compression method; When the second compression mode is selected: receiving from the user device a selection of a second compression method to be applied to the at least one block of the neural network model; receiving second settings from the user device, the second settings comprising one or more second compression settings corresponding to the selected second compression method for the at least one block, the second compression settings being manually adjustable by a user; compressing the neural network model based on the selected compression mode and the first compression setting value or the second compression setting value; and transmitting the compressed neural network model to the user device for output to the user; A method for providing the above.

2. receiving the first or second setting value includes controlling the user device to output a different compression setting screen according to the selected compression mode in order to receive the first or second setting value through the user device; The compression setting screen of the first compression mode includes: a neural network model input area for receiving the neural network model to be compressed; a setting value input area for receiving the first setting value for setting a compression ratio for the neural network model; The method of claim 1 , comprising:

3. The compression setting screen for the second compression mode includes a block display area for displaying information on a first block that is one of a plurality of blocks of the neural network model; a setting value input area for receiving the second setting value for setting a compression ratio for the first block; The method of claim 2 , comprising:

4. the compression setting screen in the second compression mode includes an architecture display area for displaying an architecture indicating a connection relationship between the plurality of blocks of the neural network model; the plurality of blocks of the neural network model include compressible blocks and incompressible blocks; The method of claim 3 , wherein the first block displayed in the block display area is the compressible block.

5. and controlling the user device to display a compression method setting screen before displaying the compression setting screen when the second compression mode is selected. the compression method setting screen includes a neural network model input area for receiving the neural network model, and a compression method setting area for receiving the selection of the second compression method; The method of claim 3 , wherein at least a portion of the information displayed on the compression settings screen of the second compression mode varies depending on the second compression method.

6. If the first compression mode is selected, the neural network model is compressed using individual parameters; the individual parameters include a compression ratio for at least one individual block of a plurality of blocks included in the neural network model; The method of claim 1 , wherein the individual parameters are obtained based on the first set value.

7. The method of claim 4 , wherein the compressible blocks and uncompressed blocks are displayed in a visually distinct manner on the compression setting screen of the second compression mode.

8. 8. The method of claim 7, wherein the compressible blocks are selectable by the user and the non-compressible blocks are not selectable by the user.

9. the second setting value of the first block is calculated and entered by the server based on user input; 4. The method of claim 3, wherein the server controls the user device such that, when a changed second setting value is received from the user device after the second setting value of the first block is displayed through the user device, the neural network model outputs compressed download data based on the changed second setting value.

10. The method of claim 1 , further comprising identifying compressible and non-compressible blocks among a plurality of blocks of the neural network model when the second compression mode is selected.

11. The receiving of the second setting value for the second compression mode follows receiving the selection of the second compression method from the user device; The method of claim 10 , wherein the compressible blocks and the non-compressible blocks are identified based on the second compression method.

12. providing identification information of compressible and non-compressible blocks and a compression ratio set for each compressible block when the second compression mode is selected; The method of claim 1 , wherein the compressible blocks and the non-compressible blocks are included in the neural network model.

13. The method of claim 12 , wherein the set compression ratio is changeable by the user.

14. The method of claim 12 , wherein the set compression ratio is obtained based on a delay time obtained from a device farm.

15. The method of claim 1 , wherein the compressed neural network model is data compressed based on the first compression method or the second compression method and a compression policy input by the user.

16. 1. A server for compressing a neural network model, comprising: a communication interface configured to communicate with a user device; a processor connected to the communication interface; The processor: receiving, via the communication interface, from the user device, a selection for a compression mode, the compression mode comprising: a first compression mode for compressing all of the neural network models; a second compression mode for compressing at least one block of the neural network model; One of: When the first compression mode is selected, the processor: receiving a first setting value from the user device, the first setting value being a single value; automatically determining a first compression setting value for the block to be compressed based on the first setting value, the first compression setting value corresponding to a predefined first compression method; When the second compression mode is selected, the processor: receiving from the user device a selection of a second compression method to be applied to the at least one block of the neural network model; receiving second settings from the user device, the second settings including one or more second compression settings corresponding to the selected second compression method for the at least one block, the second compression settings being manually adjustable by a user; compressing the neural network model based on the selected compression mode and the first compression setting value or the second compression setting value; a server configured to transmit the compressed neural network model to the user device via the communications interface for output to the user.

17. 17. The server of claim 16, wherein the processor is configured to identify compressible and non-compressible blocks among a plurality of blocks of the neural network model when the second compression mode is selected.

18. the processor is configured to provide identification of compressible and non-compressible blocks and an associated compression ratio for each compressible block; the compressible blocks and the incompressible blocks are included in the neural network model; The server of claim 16.

19. 20. The server of claim 18, wherein the set compression ratio is changeable by the user.

20. The server of claim 18 , wherein the set compression ratio is obtained based on a delay time obtained from a device farm.

Citation Information

Patent Citations

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

    CN113316795A

  • Model recommendation method and device, equipment and computer storage medium

    CN113408634A

  • Information processing method, information processing device, and program

    WO2021014986A1