Electronic device and control method thereof
Patent Information
- Application Number
- CN202180033130.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-05-08
- Filing Date
- 2021-02-09
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2041-02-09
AI Technical Summary
[0006]在存在大量神经元的情况下,存在的问题是:尽管针对输入值的输出值的准确度变高,但是在用于导出输出值的运算上花费了很多时间
Smart Images

Figure CN115552416B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to electronic devices and methods for controlling such electronic devices, and more specifically, to electronic devices including artificial intelligence models and methods for controlling such electronic devices. Background Technology
[0002] Artificial intelligence systems capable of achieving human-level intelligence are under development. Unlike traditional rule-based systems, AI systems are systems in which machines learn and determine on their own. AI systems are being used in various fields, such as speech recognition, image recognition, and future prediction.
[0003] Specifically, artificial intelligence systems are being developed that solve given problems using deep neural networks based on deep learning.
[0004] Deep neural networks are neural networks that include multiple hidden layers between the input and output layers, and are used to provide models for artificial intelligence techniques through the neurons included in each layer.
[0005] Typically, a deep neural network can include multiple neurons (or nodes) to derive the correct result value.
[0006] With a large number of neurons, the problem is that although the accuracy of the output value for the input value is higher, a lot of time is spent on the computation to derive the output value. Summary of the Invention
[0007] Technical issues
[0008] An electronic device is provided that generates a compressed artificial intelligence model based on an artificial intelligence model included in the electronic device, and performs operations on input values by using the generated compressed artificial intelligence model, thereby effectively utilizing resources.
[0009] Technical solution
[0010] A method for controlling an electronic device according to embodiments of the present disclosure includes the following steps: selecting a general artificial intelligence model, generating a compressed artificial intelligence model based on the selected general artificial intelligence model, and generating a dedicated artificial intelligence model based on the generated compressed artificial intelligence model; and the step of generating the compressed artificial intelligence model includes the following steps: obtaining the rank of a singular value decomposition (SVD) algorithm based on a compression ratio, compressing and training the selected general artificial intelligence model based on the obtained rank and converting the model into a compressed artificial intelligence model, determining the performance of the converted compressed artificial intelligence model based on a predetermined first threshold, and generating a dedicated artificial intelligence model based on the fact that the performance of the converted compressed artificial intelligence model is lower than the predetermined first threshold.
[0011] Meanwhile, an electronic device according to another embodiment of the present disclosure includes a memory storing first learning data and a general artificial intelligence model trained by the first learning data, and a processor, wherein the processor is configured to select the trained general artificial intelligence model, obtain the rank of a singular value decomposition (SVD) algorithm based on a compression ratio, compress and train the selected general artificial intelligence model based on the obtained rank and convert the model into a compressed artificial intelligence model, determine the performance of the converted compressed artificial intelligence model based on a predetermined first threshold, and generate a dedicated artificial intelligence model based on the performance of the converted compressed artificial intelligence model being lower than the predetermined first threshold. Attached Figure Description
[0012] Figure 1 This is a schematic diagram illustrating the process by which an electronic device, according to an embodiment, generates artificial intelligence models of various sizes from an artificial intelligence model.
[0013] Figure 2 This is a block diagram illustrating the configuration of an electronic device according to various embodiments;
[0014] Figure 3a This is a diagram illustrating the compression of an artificial intelligence model using the SVD algorithm according to an embodiment;
[0015] Figure 3b This is a diagram illustrating the compression of an artificial intelligence model using the SVD algorithm according to an embodiment;
[0016] Figure 4 This is a flowchart of the operation of the electronic device according to an embodiment;
[0017] Figure 5 This is a diagram illustrating a learning dataset reconstructed from learning data according to an embodiment and multiple specialized artificial intelligence models generated from an artificial intelligence model;
[0018] Figure 6This is a diagram illustrating information about a dedicated artificial intelligence model and information about a learning dataset stored in memory according to an embodiment;
[0019] Figure 7a This is a flowchart illustrating the operation of a dedicated artificial intelligence model according to an embodiment;
[0020] Figure 7b This is a flowchart illustrating the operation of a dedicated artificial intelligence model according to an embodiment;
[0021] Figure 8 This is a diagram illustrating the process of generating multiple specialized artificial intelligence models from an artificial intelligence model according to an embodiment;
[0022] Figure 9a This is a diagram illustrating the operation of training a specialized artificial intelligence model using target data according to an embodiment;
[0023] Figure 9b This is a diagram illustrating the operation of training a specialized artificial intelligence model using target data according to an embodiment;
[0024] Figure 10 This is a diagram illustrating the operation of training a dedicated artificial intelligence model based on test data according to an embodiment;
[0025] Figure 11 This is a diagram illustrating the operation of training a dedicated artificial intelligence model based on user input according to an embodiment; and
[0026] Figure 12 This is a flowchart of a method for controlling an electronic device according to various embodiments. Detailed Implementation
[0027] In the following description, various exemplary embodiments will be illustrated with reference to the accompanying drawings. However, it should be noted that these exemplary embodiments are not intended to limit the technology described in this disclosure to the specific embodiments, but should be interpreted as including various modifications, equivalents, and / or substitutions of the embodiments of this disclosure. Furthermore, in the detailed description of the drawings, similar parts may be denoted by similar reference numerals.
[0028] In addition, expressions such as “have,” “may have,” “include,” and “may include” indicate the presence of these features (e.g., elements such as numbers, functions, operations, and components) and do not exclude the presence of additional features.
[0029] In addition, expressions such as “A or B”, “at least one of A and B”, “at least one of A or B”, “one or more of A and B” or “one or more of A or B” can include all possible combinations of the listed items. For example, “A or B”, “at least one of A and B” or “at least one of A or B” can refer to all of the following cases: (1) including at least one A, (2) including at least one B, or (3) including at least one A and at least one B.
[0030] Furthermore, the terms "first," "second," etc., can describe various elements regardless of any order and / or importance. Also, such expressions are only used to distinguish one element from another, not intended to limit these elements.
[0031] A description of an element (e.g., a first element) being "(operably or communicatively) coupled to" or "connected to" another element (e.g., a second element) should be interpreted to include both cases where one element is directly coupled to another element and where one element is coupled to another element through yet another element (e.g., a third element). Conversely, a description of an element (e.g., a first element) being "directly coupled to" or "directly connected to" another element (e.g., a second element) can be interpreted to mean that there is no other element (e.g., a third element) between the first element and the second element.
[0032] Depending on the context, the expression "configured as" can be used interchangeably with other expressions such as "suitable for," "capable of," "designed for," "adapted to," "manufactured as," and "able to." The term "configured as" does not necessarily mean that the device is "specifically designed" in terms of hardware. Rather, in some cases, the expression "device configured as" can mean that the device is "capable" of performing operations with another device or component. For example, the phrase "configured to perform subprocessors A, B, and C" can mean a dedicated processor (e.g., an embedded processor) for performing the corresponding operations, or a general-purpose processor (e.g., a central processing unit (CPU) or application processor) that can perform the corresponding operations by executing one or more software programs stored in a memory device.
[0033] Additionally, the term "user" can refer to a person using an electronic device or a device using an electronic device (e.g., an artificial intelligence electronic device).
[0034] Electronic devices may include artificial intelligence learning models.
[0035] This disclosure will be described in detail below with reference to the accompanying drawings.
[0036] Figure 1This is a schematic diagram illustrating the process by which an electronic device, according to an embodiment, generates artificial intelligence models of various sizes from an artificial intelligence model.
[0037] According to various embodiments, an electronic device may be a means of providing output data for input data by using an artificial intelligence model (or an artificial neural network model).
[0038] Electronic devices according to various embodiments may include at least one of the following: for example, smartphones, tablet PCs, mobile phones, video phones, e-book readers, desktop PCs, laptop PCs, netbooks, workstations, servers, PDAs, portable multimedia players (PMPs), MP3 players, kiosks, medical devices, cameras, or wearable devices. Wearable devices may include at least one of the following: accessory-type devices (e.g., watches, rings, bracelets, anklets, necklaces, glasses, contact lenses, or head-mounted devices (HMDs)), devices integrated with fabrics or clothing (e.g., electronic clothing), body-attached devices (e.g., skin pads), or implantable circuitry. Additionally, in some embodiments, electronic devices may include at least one of the following: for example, televisions, digital video disc (DVD) players, audio equipment, refrigerators, air conditioners, cleaners, ovens, microwave ovens, washing machines, air purifiers, set-top boxes, home automation control panels, security control panels, media boxes, game consoles, electronic dictionaries, electronic keys, camcorders, or electronic photo frames. However, this disclosure is not limited thereto, and the electronic device may be any device capable of performing the operation of a neural network model.
[0039] Artificial intelligence models can be artificial neural networks trained through machine learning or deep learning. An artificial intelligence model can consist of multiple neural network layers. Each of the multiple neural network layers can have multiple weight values, and neural network operations can be performed through operations between the results of the previous layer and the multiple weight values. The multiple weight values of the multiple neural network layers can be optimized through the learning results of the artificial intelligence model. For example, multiple weight values can be updated such that the loss or cost value obtained from the artificial intelligence model in the learning process is reduced or minimized. Artificial neural networks can include deep neural networks (DNNs), and include, for example, convolutional neural networks (CNNs), deep neural networks (DNNs), recurrent neural networks (RNNs), restricted Boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), or deep Q-networks, but this disclosure is not limited to the foregoing examples.
[0040] In operation S110, an artificial intelligence model can be stored in an electronic device. The artificial intelligence model can be a general artificial intelligence model 10 trained with various learning data. Alternatively, the general artificial intelligence model 10 can be a model trained on the electronic device, or it can be a model trained on an external server and stored in the electronic device.
[0041] The general-purpose artificial intelligence model 10 can be an artificial intelligence model trained with various learning data, making it applicable to various devices or environments. That is, the general-purpose artificial intelligence model 10 can be an artificial intelligence model trained to perform various operations, from simple to complex. For example, in speech recognition technology, a general-purpose artificial intelligence model can refer to a model trained to: not only receive input voice data for simple control commands in speakers, refrigerators, and air conditioners, but also receive input voice data for commands such as inference, search, and recommendation in smartphones, and provide output data for the voice data. For example, in object recognition technology, a general-purpose artificial intelligence model can refer to a model trained to: not only simply identify objects, but also understand space or atmosphere through objects. These are merely examples, and the size or shape of the general-purpose artificial intelligence model can vary depending on the technical field or learning data.
[0042] Since the general-purpose artificial intelligence model 10 is trained using various data, it has the advantage of providing output values for various input values. However, it suffers from the following problems: it is large in size and consumes a lot of resources (e.g., memory, CPU, GPU, etc.) when performing operations on input values. Therefore, electronic devices can generate compressed artificial intelligence models 20, 30, which have smaller sizes than the general-purpose artificial intelligence model 10 while maintaining the same or similar performance as the general-purpose artificial intelligence model.
[0043] Thus, in operation S120, the electronic device can compress the artificial intelligence model. Specifically, the electronic device can repeatedly compress the general artificial intelligence model 10 and generate compressed artificial intelligence models, such as AI model 20 specific to A or AI model 30 specific to B.
[0044] Specialized artificial intelligence models, as opposed to general-purpose artificial intelligence models, refer to artificial intelligence models trained for specific devices or environments. For example, in speech recognition technology, a specialized artificial intelligence model could be one trained to receive voice data as input data for simple control commands in an air conditioner and provide output data, or it could be one trained to receive voice data emitted in a quiet environment as input data and provide output data.
[0045] Compressing an artificial intelligence (AI) model means reducing the size of the artificial neural network included in the AI model, and specifically, it means reducing the size of the data associated with the connections (weight connections) between multiple nodes included in the layers of the artificial neural network. For example, in an AI model where the first and second layers each include four nodes and there are 16 connections between the first and second layers, an electronic device can compress the AI model by adding a third layer with one node between the first and second layers and reducing the connections between the first and second layers to eight (four between the first and third layers, and four between the third and second layers). Alternatively, the electronic device can compress the AI model by reducing the number of nodes included in the first or second layer. Alternatively, according to another embodiment, the electronic device can compress the AI model by reducing the number of bits of data indicating the connections between multiple nodes included in the AI model. However, this disclosure is not limited to the foregoing examples, and the electronic device can compress the AI model by reducing the size of the data associated with the connections between multiple nodes included in the neural network via various methods. Figure 2 The specific compression process of the artificial intelligence model according to the embodiment is described in detail.
[0046] The electronic device can repeatedly compress the general artificial intelligence model 10 based on the performance of the compressed artificial intelligence model 10. The performance of the artificial intelligence model indicates the number of times that, as a result of testing and training the artificial intelligence model, the output value for the input value is consistent with or close to the target value.
[0047] After compressing the general AI model 10, the electronic device can train and test the compressed AI model. The electronic device can repeatedly compress the AI model until the performance of the trained AI model is within a predetermined range. For example, the electronic device can repeatedly compress the AI model until the performance of the AI model compressed based on the general AI model becomes 79% or higher and 82% or lower. This is merely an example, and the electronic device can repeatedly compress the AI model until the performance of the AI model becomes a predetermined threshold (e.g., 82%) or lower.
[0048] After compressing the AI model until the performance of the compressed AI model reaches the predetermined performance, the electronic device can reconstruct the learning dataset in operation S120.
[0049] Specifically, after the performance of the compressed artificial intelligence model reaches a predetermined range (or a predetermined threshold or lower) through compression processing, the electronic device can further compress the compressed artificial intelligence model, and here, the learning dataset can be reconstructed to improve the performance of the additionally compressed artificial intelligence model.
[0050] More specifically, the electronic device can classify the learning data used to train a general artificial intelligence model 10 into multiple datasets based on predetermined rules, and select at least one dataset from the multiple classified datasets and reconstruct the learning dataset. The reconstruction of the learning dataset will... Figure 2 Detailed description is provided.
[0051] The electronic device 100 can train an additionally compressed artificial intelligence model using a learning dataset reconstructed from the learning data according to predetermined rules. Here, since the additionally compressed artificial intelligence model is trained using a learning dataset that corresponds to some of the learning data used to train a general artificial intelligence model, it can be a specialized artificial intelligence model 20, 30. For example, an artificial intelligence model trained using a reconstructed learning dataset A can be a specialized artificial intelligence model 20.
[0052] For example, in speech recognition technology, if the learning data is speech data used in a smartphone, and the general artificial intelligence model is a speech recognition model based on a smartphone, then the reconstructed learning dataset can be speech data used in a TV selected from the initial learning data, and the artificial intelligence model trained with the reconstructed learning dataset can be a speech recognition model based on a TV.
[0053] Because a specialized AI model can be a compressed version of a general AI model, it can be smaller in size than a general AI model. Specifically, the size of the data associated with the connections between multiple nodes included in a specialized AI model can be smaller than the size of the data associated with the connections between multiple nodes included in a general AI model.
[0054] During operation S110, electronic device 100 can store A-specific artificial intelligence model 20 in the electronic device.
[0055] Electronic device 100 can continuously compress and train AI model 20 specific to AI model A, while simultaneously checking the performance of AI model 20 specific to AI model A. If the performance of AI model 20 specific to AI model A meets predetermined conditions, the electronic device can again reconstruct the dataset from the learning data based on predetermined rules and generate dataset B, and train AI model 30 specific to AI model B using dataset B. Furthermore, the electronic device can store the trained AI model 30 specific to AI model B within the electronic device. Since this explanation overlaps with the compression of general AI models and the reconstruction of the aforementioned dataset, a detailed explanation will be omitted.
[0056] As described above, the electronic device 100 can repeatedly perform compression of an initial general-purpose artificial intelligence model and reconstruction of a learning dataset, generating one or more specialized artificial intelligence models of various sizes and purposes. Since the generated artificial intelligence models of various sizes can be trained on datasets selected according to predetermined rules, they can achieve specific levels of performance.
[0057] Figure 2 This is a diagram illustrating the configuration of an electronic device according to various embodiments. Reference Figure 2 The electronic device 100 may include a memory 110 and a processor 120. Artificial intelligence-related functions can be operated via the processor 120 and the memory 110.
[0058] Memory 110 is a component for storing: an operating system (OS) for controlling the overall operation of components of electronic device 100 and at least one instruction or data associated with components of electronic device 100. An instruction refers to an action statement that can be directly executed by processor 120 in a programming drafting language, and it is the smallest unit of execution or operation of a program.
[0059] The processor 120 can perform operations according to various embodiments described below by executing at least one instruction stored in the memory 110.
[0060] Memory 110 is a component used to store various programs and data necessary for the operation of electronic device 100. Memory 110 can be implemented as non-volatile memory, volatile memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc. In addition, memory 110 can be accessed by processor 120, and processor 120 can perform data reading / recording / correction / deletion / updating, etc. The term memory can include memory 110, ROM and RAM within processor 120, or memory cards (e.g., micro SD cards, memory sticks) installed on electronic device 100.
[0061] The memory 110 can store information about an artificial intelligence model comprising multiple layers. Here, the artificial intelligence model stored in the memory 110 can be a general-purpose artificial intelligence model or a specialized artificial intelligence model that is compressed from a general-purpose model. Specifically, the memory 110 can store information such as the compression parameters of the general-purpose artificial intelligence model, the specialized artificial intelligence model, or the specialized artificial intelligence model.
[0062] Additionally, the memory 110 can store learning data for training a general-purpose artificial intelligence model. Specifically, the memory 110 can store information about learning datasets for training specialized artificial intelligence models. Here, the learning datasets and information about the specialized artificial intelligence models trained using the learning datasets can be stored in the memory 110 in a corresponding manner.
[0063] Additionally, the memory 110 can store rules for selecting a learning dataset from the learning data to train a dedicated artificial intelligence model.
[0064] Furthermore, the memory 110 may store an artificial intelligence model compression module 111 for compressing the artificial intelligence model and a learning data reconstruction module 112 for reconstructing learning data based on the compression of the artificial intelligence model.
[0065] The artificial intelligence model compression module 111 can compress a general artificial intelligence model or a special artificial intelligence model stored in the memory 110 and generate another special artificial intelligence model, and provide the model.
[0066] Specifically, the AI model compression module 111 can generate a dedicated AI model by compressing the AI model using a data compression algorithm. Here, the AI model compression module 111 can apply different compression algorithms to each layer of the AI model.
[0067] The artificial intelligence model compression module 111 can compress artificial intelligence models by using data compression algorithms, such as low-rank approximation algorithms, pruning algorithms, and quantization algorithms for matrix factorization, nonnegative matrix factorization, singular value factorization, and eigenvalue factorization.
[0068] The SVD algorithm is an algorithm that decomposes a matrix into a specific structure, thereby reducing the size of the matrix. The SVD algorithm can decompose a matrix M by expressing it as a product of matrices U, Σ, and V*.
[0069] M=UΣV*
[0070] In Equation 1, M is an m×n matrix, U is an m×m orthogonal matrix (unitary matrix), V is an n×n orthogonal matrix (unitary matrix), and V* is the conjugate transpose of V. Additionally, Σ is an m×n diagonal matrix, where the values of the diagonal elements are not negative and all remaining elements are 0.
[0071] M is a matrix corresponding to the weight data included in a layer of an artificial neural network, and a layer may include at least one M.
[0072] In other words, the AI model compression module 111 can perform compression by expressing M, which corresponds to the weight data included in a layer, as a product of multiple matrices U, Σ, and V*.
[0073] When using the Singular Value Decomposition (SVD) algorithm, the AI model compression module 111 can sequentially compress the AI model while simultaneously changing the rank value.
[0074] Specifically, the AI model compression module 111 can determine Σ based on the input value of the rank. Here, the rank is a parameter that determines the compression ratio of the AI model, and it indicates the number of elements in Σ that have non-zero values. The AI model compression module 111 can exclude only the elements in Σ with the largest rank among the non-negative values, leaving the remaining elements with a value of 0. For example, when the rank value is 64, the AI model compression module 111 can determine Σ by excluding only the 64 largest non-negative values included in Σ, leaving the remaining elements with a value of 0. Here, the size of Σ can be 64×64.
[0075] Then, the artificial intelligence model compression module 111 can determine the sizes of U and V* based on the size of Σ.
[0076] Figure 3a This is a diagram used to illustrate in more detail the SVD algorithm for determining the sizes of U and V* based on the size of Σ according to an embodiment.
[0077] like Figure 3a As shown, assuming M is a matrix of size 1536×1536 and its rank is 256 (Case 1), as mentioned above, the size of Σ can be 256×256, the size of U can be 1536×256, and the size of V* can be 256×1536. In this case, the product of matrices U, Σ, and V* generated by the SVD algorithm is (1536×256)+(256×256)+(256×1536) (=851,968), and therefore, this size can be smaller than the size of M (1536×1536=2,359,296).
[0078] In the case where M is a matrix of size 1536×1536 and has a rank of 128 (Case 2), as mentioned above, the size of Σ can be 128×128, the size of U can be 1536×128, and the size of V* can be 128×1536. In this case, the product of matrices U, Σ, and V* generated by the SVD algorithm is (1536×128) + (128×128) + (128×1536) (=409,600), and therefore, this size can be smaller than the size of M (1536×1536=2,359,296).
[0079] exist Figure 3a The diagram illustrates the generation of several compressed matrices based on the rank values in matrix M, but this disclosure is not necessarily limited to this.
[0080] Depending on the context, when the SVD algorithm is reapplied to a compressed matrix that has been compressed using the SVD algorithm, a compressed matrix can be generated. For example, when the SVD algorithm is applied to a compressed matrix whose rank is compressed to 256, a compressed matrix with a rank of 128 can be generated.
[0081] As described above, the AI model compression module 111 can sequentially and repeatedly compress the AI model by changing the rank value of the SVD algorithm. Here, as the rank value becomes lower, the compression ratio becomes greater, and therefore, the AI model compression module 111 can sequentially and repeatedly reduce the size of the AI model while sequentially lowering the rank value.
[0082] exist Figure 3a The diagram only shows the case of compression performed on a single matrix M, but the AI model compression module 111 can perform compression on multiple M matrices included in a layer.
[0083] Figure 3b This is a diagram illustrating the case where compression is performed on multiple matrices M according to an embodiment. As mentioned above, a layer included in the artificial intelligence model may include at least one M. Figure 3b M in a1 M a2 M a3 M a4 M b1 M b2 M b3 and M b4 This refers to the multiple M's included in a layer of an artificial intelligence model. Figure 3b For ease of explanation, the description of Σ has been omitted.
[0084] As mentioned above Figure 3aAs described, the artificial intelligence model compression module 111 can compress an artificial intelligence model by applying the SVD algorithm to an M. In this case, if we assume that the rank of each M of size 1024×1024 (=8,388,608) is 256, then the size of U can be 1024×256 and the size of V can be 256×1024. In addition, the size of the layer compressed by applying SVD (the size of Σ is omitted for ease of interpretation) is 8×(1024×256)+8x(256×1024) (=4,194,304), and therefore, it can be concluded that this size is reduced more than the size of M 1024×1024 (=8,388,608).
[0085] The artificial intelligence model compression module 111 can apply the SVD algorithm by combining multiple matrices.
[0086] Specifically, the artificial intelligence model compression module 111 can select multiple Ms included in a layer to apply the SVD algorithm based on the features of M.
[0087] For example, the artificial intelligence model compression module 111 can determine M a1 M a2 M a3 M a4 M b1 M b2 M b3 and M b4 M in a1 M a2 M a3 and M a4 They share common characteristics, and the combination M a1 M a2 M a3 and M a4 (M a And by applying the SVD algorithm, M is determined. b1 M b2 M b3 and M b4 They share common characteristics, and the combination M b1 M b2 M b3 and M b4 (M b And apply the SVD algorithm (Case 2). In this case, the artificial intelligence model compression module 111 can apply the SVD algorithm to an M model of size 4096×1024. a and M bEach of the M. With the rank set to 256 for each M, the AI model compression module 111 can generate a U of size 1024×256 and a V of size 256×1024 for each M. In this case, the size of the compressed layer is 2×(1024×256)+2×(256×1024) (=1,835,008), and therefore, it can be concluded that this size is reduced more than the original size of M and the case of case 1.
[0088] In case 2, it is shown that the artificial intelligence model compression module 111 combines (M a1 M a2 M a3 and M a4 ) and (M b1 M b2 M b3 and M b4 However, this disclosure is not necessarily limited to this, and the artificial intelligence model compression module 111 can combine multiple M in various forms. For example, the artificial intelligence model compression module 111 can obviously combine M... a1 M a2 M b1 and M b2 Combine them into a single M, and then combine M... a3 M a4 M b3 and M b4 Combined into another M.
[0089] As another example, the artificial intelligence model compression module 111 can be combined with all the multiple M included in a layer. a1 M a2 M a3 M a4 M b1 M b2 M b3 and M b4 (M), and the SVD algorithm is applied (Case 3). Assuming the rank of the SVD algorithm is 256, the AI model compression module 111 can generate a U of size 4096×256 and a V of size 256×2048. In this case, the size of the compressed layer is (4096×256)+(256×2048) (=1,572,864), and therefore, it can be concluded that this size is reduced more than the original size of M and the sizes in Cases 1 and 2.
[0090] As described above, the artificial intelligence model compression module 111 can compress an artificial intelligence model while changing the rank of a matrix M. Figure 3a ), or compress the artificial intelligence model while changing the size of multiple M in the combination ( Figure 3b ).
[0091] The artificial intelligence model compression module 111 can determine the compression parameters for the artificial intelligence model, and compress and train the artificial intelligence model according to the determined compression parameters.
[0092] Specifically, the AI model compression module 111 can determine "layer compression parameters" for each layer of the AI model, "unit compression parameters" indicating the compression order of each layer, "compression method parameters" indicating the compression method, and "compression ratio parameters" indicating the compression ratio. Here, "layer compression parameters" can include "unit compression parameters," which can include both "compression method parameters" and "compression ratio parameters." Regarding the compression ratio parameter, in low-rank approximation algorithms such as matrix factorization, nonnegative matrix factorization, singular value factorization, and eigenvalue factorization, information about at least one M or rank among the multiple M included in a layer can be the compression ratio parameter. In the case of pruning algorithms, the pruning ratio, pruning structure, or pruning unit can be the compression ratio parameter; in the case of quantization algorithms, the quantization method (linear, nonlinear, vector quantization, grid quantization, etc.) or the number of quantization bits can be the compression ratio parameter.
[0093] For example, in an artificial intelligence model comprising n layers, when the artificial intelligence model compression module 111 decides to compress the artificial intelligence model using the SVD algorithm (rank = 100) with the third layer as the first rank, the "layer compression parameter" can be the third layer, the "unit compression parameter" can be 1, the "compression method parameter" can be SVD, and the "compression ratio parameter" can be 100. Alternatively, when the artificial intelligence model compression module 111 decides to compress the artificial intelligence model using the vector quantization algorithm (4 bits) with the first layer as the second rank, the "layer compression parameter" can be the first layer, the "unit compression parameter" can be 2, the "compression method parameter" can be vector quantization, and the "compression ratio parameter" can be 4. This disclosure is not necessarily limited thereto; the type and value of the parameters may vary depending on the embodiment.
[0094] The above describes the layered compression parameters, unit compression parameters, compression method parameters, and compression ratio parameters as a layered structure, but this disclosure is not necessarily limited to this, and each parameter can be parallel data as a separate parameter.
[0095] The artificial intelligence model compression module 111 can compress an artificial intelligence model and then train the resulting artificial intelligence model. Specifically, the artificial intelligence model compression module 111 can train the compressed artificial intelligence model using learning data or a learning dataset reconstructed from the learning data.
[0096] Then, the AI model compression module 111 can determine whether to further compress the AI model. Specifically, the AI model compression module 111 can determine whether to further compress the AI model by testing the trained AI model with test data and determining the performance of the AI model.
[0097] For example, if the performance of the compressed AI model is higher than or equal to a predetermined value (e.g., a second threshold), the AI model compression module 111 may additionally perform compression on the AI model.
[0098] However, if the performance of the compressed AI model is higher than or equal to a first threshold and lower than or equal to a second threshold, the AI model compression module 111 may stop compressing the AI model. The performance standard for the AI model is merely an example, and the AI model compression module 111 may stop compressing the AI model if its performance is lower than or equal to a predetermined value.
[0099] The learning data reconstruction module 112 can reconstruct the learning data. Specifically, the learning data reconstruction module 112 can be a module used to reconstruct the learning data when the performance of the artificial intelligence model becomes lower than or equal to a threshold and compression for the artificial intelligence model is stopped.
[0100] The learning data reconstruction module 112 can reconstruct learning data using pre-stored rules. Here, "rules" refers to rules used by the initial AI model or the compressed AI model to extract specific data from the learning data it learns.
[0101] As an example of a rule, the learning data reconstruction module 112 can extract feature information from the learning data and classify the learning data into multiple learning datasets based on the extracted feature information. Here, the feature information of the learning data refers to the feature vector of the learning data, and specifically, it can refer to indicating elements with specific patterns or rules among the multiple elements included in the learning data as vectors.
[0102] Then, the learning data reconstruction module 112 can reconstruct the learning data by selecting at least one learning dataset from multiple classification learning datasets. The learning data reconstruction module 112 can also reconstruct the learning data by selecting multiple learning datasets with adjacent feature vector values. However, this is merely an example, and multiple learning datasets can be combined according to various criteria. For example, the learning data reconstruction module 112 can reconstruct the learning data by selecting a learning dataset corresponding to the target data that is input into the electronic device 100 as input values for a computation (or inference).
[0103] As another example of the rule, the learning data reconstruction module 112 can reconstruct the learning dataset based on the results of testing the compressed artificial intelligence model using test data. Here, test data refers to data that shares common characteristics with the learning data but is different from the learning data.
[0104] Specifically, the learning data reconstruction module 112 can classify the test data into multiple test datasets based on the results of testing the artificial intelligence model by the artificial intelligence model compression module 111 to determine the performance of the artificial intelligence model. For example, based on whether the artificial intelligence model outputs a target value as a result value for the input value, the learning data reconstruction module 112 can classify the test datasets into test datasets that output the target value, test datasets adjacent to the target value, and test datasets that do not reach the target value.
[0105] The learning data reconstruction module 112 can reconstruct the learning data by using the test dataset that outputs the target value and the test dataset adjacent to the target value, while excluding test datasets that do not reach the target value. Specifically, the learning data reconstruction module 112 can reconstruct the learning dataset by selecting the learning datasets that correspond to the test dataset that outputs the target value and the test datasets adjacent to the target value.
[0106] As another example of the rule, the learning data reconstruction module 112 can reconstruct the learning dataset based on user input. The electronic device 100 can receive learning data setting information from the user, and the learning data reconstruction module 112 can reconstruct the learning dataset using the learning data setting information received from the user.
[0107] For example, if a user wants the "machine translation for the messenger" service and enters "machine translation for the messenger" as the learning data setting information, the learning data reconstruction module 112 can reconstruct the learning dataset by selecting learning data for the terms or phrases used in the machine translation of the messenger.
[0108] As described above, the learning data reconstruction module 112 can reconstruct the learning data using pre-stored rules.
[0109] Processor 120 can be electrically connected to memory 110 and control the overall operation and function of electronic device 100. For example, processor 120 can operate an operating system or application, control hardware or software components connected to processor 120, and perform various data processing and operations. In addition, processor 120 can load instructions or data received from at least one of other components onto volatile memory and process them, and store various data in non-volatile memory.
[0110] For this purpose, the processor 120 can be implemented as a general-purpose processor (e.g., a central processing unit (CPU) or an application processor) that can perform operations by executing one or more software programs for performing operations stored in a memory device or by executing a dedicated processor (e.g., an embedded processor).
[0111] A processor can consist of one or more processors. One or more processors can be: general-purpose processors, such as central processing units (CPUs), application processors (APs), digital signal processors (DSPs), etc.; graphics-specific processors, such as graphics processing units (GPUs) and vision processing units (VPUs); or artificial intelligence-specific processors, such as digital processing units (NPUs).
[0112] Processor 120 may be implemented as a digital signal processor (DSP), microprocessor, and time controller (T-CON) for processing digital signals. However, this disclosure is not limited thereto, and processor 120 may include one or more of a central processing unit (CPU), microcontroller unit (MCU), microprocessor unit (MPU), controller, application processor (AP), graphics processing unit (GPU), or communication processor (CP), as well as an ARM processor, or as defined by the terminology. Additionally, processor 120 may be implemented as a system-on-a-chip (SoC) or large-scale integrated circuit (LSI) in which processing algorithms are stored, or as a field-programmable gate array (FPGA).
[0113] One or more processors can perform control to process input data according to predefined operating rules or artificial intelligence models stored in memory 110. Alternatively, if one or more processors are AI-specific processors, the AI-specific processors can be designed with hardware architectures specifically designed to process particular artificial intelligence models.
[0114] A predefined set of operating rules or artificial intelligence models is characterized by the fact that they are created through learning. Creating through learning can mean training a basic AI model using multiple sets of learning data via a learning algorithm, and creating a predefined set of operating rules or AI models to perform desired characteristics (or objectives). This learning can be performed on a device in which the AI itself performs, or via a separate server and / or system. Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning, but learning algorithms are not limited to the aforementioned examples.
[0115] Processor 120 can load the artificial intelligence model compression module 111 and the learning data reconstruction module 112 from non-volatile memory to volatile memory. Non-volatile memory refers to memory that retains stored information even when the power supply is stopped (e.g., flash memory, programmable read-only memory (PROM), magnetoresistive random access memory (MRAM), and resistive RAM (RRAM)). Volatile memory refers to memory that requires a constant power supply to retain stored information (e.g., dynamic random access memory (DRAM) and static RAM (SRAM)). Loading means the operation of transferring data stored in non-volatile memory into volatile memory and storing that data so that processor 120 can access it. Depending on the embodiment, non-volatile memory may be included in processor 120 or may be implemented as a component separate from processor 120.
[0116] Processor 120 can generate compressed artificial intelligence models (dedicated artificial intelligence models) by using artificial intelligence model compression module 111 stored in memory 110. Specifically, processor 120 can generate dedicated artificial intelligence models of various sizes from a general artificial intelligence model by using artificial intelligence model compression module 111. The generated dedicated artificial intelligence model can be an artificial intelligence model with a smaller size than the general artificial intelligence model, and the size of the data associated with the multiple connections (weight value connections) included in the dedicated artificial intelligence model can be smaller than the size of the data associated with the connections between the multiple nodes included in the general artificial intelligence model.
[0117] The processor 120 can acquire a learning dataset reconstructed using the learning data reconstruction module 112 stored in the memory 110.
[0118] The processor 120 can generate specialized artificial intelligence models of various sizes by repeating the following processes: compressing and training the artificial intelligence model, and reconstructing the learning dataset using the artificial intelligence model compression module 111 and the learning data reconstruction module 112.
[0119] On this point, Figure 4 This is a flowchart of a method for compressing and training an artificial intelligence model according to various embodiments of the present disclosure, and Figure 5 This is a diagram illustrating a learning dataset reconstructed from learning data and multiple specialized artificial intelligence models generated from an artificial intelligence model according to embodiments of the present disclosure.
[0120] As mentioned above Figure 2 As described herein, at least one trained artificial intelligence model and learning data used to train the artificial intelligence model can be stored in memory 110.
[0121] In operation S410, processor 120 may select at least one artificial intelligence model and corresponding learning data stored in memory 110. Here, the selected artificial intelligence model may be a general artificial intelligence model or a specialized artificial intelligence model generated by compression from a general artificial intelligence model.
[0122] The processor 120 can generate a dedicated artificial intelligence model by using the selected artificial intelligence model.
[0123] In order to generate a dedicated artificial intelligence model, in operation S420, processor 120 can compress the selected artificial intelligence model and train the compressed artificial intelligence model using learning data.
[0124] More specifically, processor 120 can determine compression parameters related to the size of the dedicated artificial intelligence model to be generated using artificial intelligence model compression module 111. Processor 120 can determine layer compression parameters, unit compression parameters, compression method parameters, and compression ratio parameters for each layer included in the selected artificial intelligence model. Based on the determined parameters, processor 120 can reduce the size of data related to the connections between multiple nodes included in the selected artificial intelligence model and compress the selected artificial intelligence model. Processor 120 can then train the selected artificial intelligence model using training data.
[0125] The processor 120 can compress and train the selected artificial intelligence model at least once.
[0126] To this end, processor 120 can train the selected artificial intelligence model, and then, in operation S430, determine whether to further compress the artificial intelligence model. Specifically, processor 120 can determine whether to further compress the compressed artificial intelligence model based on the performance of the compressed artificial intelligence model.
[0127] Specifically, the processor 120 can compress the selected artificial intelligence model by using the artificial intelligence model compression module 111, and if the performance of the compressed artificial intelligence model compressed by using the selected learning data exceeds a predetermined threshold, the processor 120 can repeatedly compress and train the selected artificial intelligence model until the performance of the artificial intelligence model becomes lower than or equal to the predetermined threshold.
[0128] If the performance of the artificial intelligence model falls below or equals a predetermined threshold, i.e., if it is determined that recompression of the selected artificial intelligence model will not be performed, the processor 120 can determine the compressed artificial intelligence model as a dedicated artificial intelligence model for the training data. Then, in operation S440, the processor 120 can store information about the compressed artificial intelligence model (dedicated artificial intelligence model) and information about the training data in the memory 110. Here, the information about the compressed artificial intelligence model may include the size and compression parameters of the compressed artificial intelligence model. In addition, the information about the training data may include feature information of the training data used to train the compressed artificial intelligence model.
[0129] In this regard, refer to Figure 5 The processor 120 can select learning data D0 510 and artificial intelligence model N0 520 stored in memory 110, compress the artificial intelligence model N0 520, and then train the compressed artificial intelligence model using the learning data D0 510. Here, if the performance of the compressed artificial intelligence model exceeds a predetermined threshold, the processor 120 can repeatedly compress and train the selected artificial intelligence model until the performance of the artificial intelligence model becomes lower than or equal to the predetermined threshold. Then, the processor 120 can determine that recompression should no longer be performed on the selected artificial intelligence model N0 whose performance has become lower than or equal to the predetermined threshold, and stop recompression. In this case, the processor 120 can determine the compressed artificial intelligence model N0' as a dedicated artificial intelligence model for learning data D0. Then, the processor 120 can store information about the compressed artificial intelligence model (i.e., the dedicated artificial intelligence model) N0' 521 (information about the size and compression parameters of N0') and information about the learning data (feature information of the learning data for training N0') in memory 110.
[0130] refer to Figure 4 In operation S440, processor 120 can store information about the compressed artificial intelligence model and learning data in memory 110, and then in operation S450, the learning data is reconstructed.
[0131] Specifically, the processor 120 can classify the learning data into multiple datasets using the learning data reconstruction module 112, and select some of the learning datasets from the multiple classifications based on predetermined rules. Because of the above... Figure 2 The specific methods for reconstructing learning data are described in the text, so overlapping explanations will be omitted.
[0132] In operation S460, processor 120 can determine whether the reconstructed learning data meets predetermined conditions. These predetermined conditions can indicate the size of the learning data. That is, processor 120 can determine whether the size of the reconstructed learning data is greater than or equal to a predetermined size.
[0133] Then, if the learning data reconstructed in operation S460-Y meets predetermined conditions, processor 120 can update the AI model to be compressed in operation S470. For example, if the size of the selected learning dataset is greater than or equal to a predetermined size, processor 120 can update the AI model to be compressed. Here, processor 120 can update one of the dedicated AI models stored in memory 110 to the compressed AI model.
[0134] Then, in operation S420, processor 120 can compress the updated artificial intelligence model (i.e., the dedicated artificial intelligence model) and train the compressed artificial intelligence model using the learning data reconstructed in operation S450.
[0135] In other words, if the learning dataset selected in operation S450 meets predetermined conditions, such as if the size of the selected learning dataset is greater than or equal to a predetermined value, the processor 120 can train a dedicated artificial intelligence model using the selected learning dataset.
[0136] The processor 120 can repeatedly compress a dedicated artificial intelligence model at least once and train the compressed dedicated artificial intelligence model using a selected learning dataset.
[0137] In this regard, refer to Figure 5 Processor 120 can select a learning dataset D1 511 from multiple learning datasets included in learning data D0 according to predetermined rules and reconstruct the learning data, and update the dedicated artificial intelligence model N0'521 generated in the previous step to the artificial intelligence model N1 521 to be compressed. Processor 120 can repeatedly compress artificial intelligence model N1 521 at least once, and train the compressed artificial intelligence model from artificial intelligence model N1 521 using learning dataset D1 511. Processor 120 can compress the compressed artificial intelligence model until the performance of the compressed artificial intelligence model based on artificial intelligence model N1 521 and trained with dataset D1 becomes lower than or equal to a predetermined threshold, and generate a dedicated artificial intelligence model N1'522.
[0138] Subsequently, through the same process as described above, the processor 120 can select a learning dataset D2 512 from the multiple learning datasets included in the learning data D0 according to predetermined rules, reconstruct the learning data, and generate a dedicated artificial intelligence model N2'.
[0139] As described above, based on the initial learning data D0 510 and the initial network model N0 520, the processor 120 can generate specialized artificial intelligence models 521, 522, and 523 of various sizes. The processor 120 can progressively compress the initial network model N0 520 and progressively reconstruct the initial learning data D0, as well as progressively generate specialized artificial intelligence models 521, 522, and 523 of various sizes.
[0140] Since the operations following the generation of a dedicated artificial intelligence model by compressing the artificial intelligence model are the same as those in steps S440, S450, and S470, the overlapping explanations will be omitted.
[0141] As described above, processor 120 can generate multiple specialized artificial intelligence models by progressively and repeatedly compressing a general artificial intelligence model and training the compressed artificial intelligence model with a learning dataset. Processor 120 can store information about the specialized artificial intelligence models generated by progressively and repeatedly compressing the general artificial intelligence model, as well as information about the learning dataset, in memory 110.
[0142] Figure 6 This is a diagram used to illustrate information about a dedicated artificial intelligence model and information about a learning dataset stored in memory 110 according to an embodiment.
[0143] Since the dedicated AI model is generated hierarchically, the processor 120 can map information about the learning dataset used to train the dedicated AI model and map information about the dedicated AI model, as well as store the information hierarchically.
[0144] Here, information about the learning dataset can include feature information about the learning dataset. Feature information about the learning dataset refers to the feature vectors of the learning data used to train a specific artificial intelligence model. Specifically, it can refer to vectors representing elements among the multiple elements included in the learning dataset that exhibit specific patterns or rules. For example, in the case of learning data for a speech recognition model, features such as "noisy environment," "quiet environment without noise," "distant sound source," "near sound source," "dictation requiring a large number of words," and "voice commands requiring a large number of words" can be feature information about the learning dataset.
[0145] Information about the dedicated AI model may include its size and compression parameters. Depending on the embodiment, the generated dedicated AI model itself, as well as information about the dedicated AI model, may be stored in memory 110.
[0146] like Figure 6 As shown, when the metadata for information about the learning dataset and information about the dedicated artificial intelligence model is set to include a data description that includes compression parameters and data feature information, the processor 120 can store feature information of the learning dataset used to train the dedicated artificial intelligence model and compression parameters used to generate the dedicated artificial intelligence model whenever the dedicated artificial intelligence model is generated step by step.
[0147] For example, when the learning data for training an AI model compressed by applying rank R0 to the SVD algorithm is D0, the processor 120 can map the compression parameter rank R0 and the learning data feature information D0, and store them in the memory 110. Similarly, when the learning data for training an AI model compressed by applying rank R1 to the SVD algorithm is D1, the processor 120 can map the compression parameter rank R1 and the learning data feature information D1, and store them in the memory 110. Likewise, when the learning data for training an AI model compressed by applying rank R2 to the SVD algorithm is D2, the processor 120 can map the compression parameter rank R2 and the learning data feature information D2, and store them in the memory 110.
[0148] When the compression level of the artificial intelligence model is high (i.e., when the rank value is small), the size of the training dataset can also be reduced. Therefore, as... Figure 6 As shown, as the value of R decreases, the amount of feature information of the data included in the data description also decreases.
[0149] exist Figure 6 The present invention only shows compression method parameters and compression ratio parameters as compression parameters, but this disclosure is not necessarily limited to this, and it is obvious that layer compression parameters or unit compression parameters can be added and stored.
[0150] Back Figure 2 The processor 120 can generate a dedicated artificial intelligence model based on information about dedicated artificial intelligence models of various sizes, and perform operations by using the generated dedicated artificial intelligence model.
[0151] Specifically, when target data is input, the processor 120 can select information about a specific artificial intelligence model for performing operations on the target data from information about specific artificial intelligence models of various sizes, and generate a specific artificial intelligence model based on the selected information about the specific artificial intelligence model. Here, target data refers to the input data used to perform operations by using a trained artificial intelligence model.
[0152] More specifically, when the target data corresponds to one of multiple learning datasets included in the learning data, the processor 120 can identify information about a specialized artificial intelligence model trained using the learning dataset corresponding to the target data. Here, the feature corresponding to the target data and the learning dataset means that the feature information of the target data is the same as the feature information of the learning dataset. For example, if the feature information of the target data is "woman's voice data" and the feature information of the learning dataset is also "woman's voice data", then the feature information of the target data and the feature information of the learning dataset can be considered to correspond to each other.
[0153] To this end, the processor 120 can determine the feature information of the target data and the feature information of multiple learning datasets included in the learning data.
[0154] Then, the processor 120 can generate a dedicated artificial intelligence model based on the identified information about the dedicated artificial intelligence model, and obtain an output value for the target data by making the target data the input value of the generated dedicated artificial intelligence model.
[0155] Figure 7a This is a flowchart illustrating the process of performing operations using a dedicated artificial intelligence model, according to an embodiment.
[0156] In operation of S710-a, processor 120 can receive target data. Specifically, processor 120 can receive target data from a user or an external electronic device.
[0157] When target data is input during operation S710-a, processor 120 can analyze situation information for the target data during operation S720-a. Here, situation information may indicate characteristic information of the target data input into electronic device 100, as well as information about the hardware or software included in the electronic device to which the target data is input when the target data is input.
[0158] For example, when a user says "Tell me the way to OO Bank" through the microphone of electronic device 100 (i.e., when the user inputs target data), processor 120 can analyze the voice signal and analyze the characteristic information of the target data, such as whether the user's voice includes noise, whether the distance between electronic device 100 and the user is close, the user's gender and age, etc.
[0159] Additionally, the processor 120 can analyze software information used to manipulate target data. For example, the processor 120 can identify the ID of the application invoked by the speech recognition model and the word size required for dictating user speech or voice commands. For instance, if the ID of the application invoked by the speech recognition model corresponds to a user who primarily issues voice commands in short sentences, the processor 120 can determine that only a small number of words are needed for dictation or voice commands. Conversely, if the ID of the application invoked by the speech recognition model corresponds to a user who frequently issues and issues various voice commands, the processor 120 can determine that a large number of words are needed for dictation or voice commands.
[0160] Additionally, the processor 120 can analyze hardware information used to process the target data. For example, the processor 120 can analyze network connection information, such as WiFi and Bluetooth, when the target data is input, and determine whether the user is indoors or outdoors. Furthermore, the processor 120 can analyze sensing information, such as position sensors, accelerometer sensors, and motion sensors included in the electronic device 100, and determine whether the user is stationary or in motion.
[0161] In operation of S730-a, processor 120 can determine the compression parameters of the artificial intelligence model based on the analyzed situational information. Specifically, processor 120 can determine the optimal compression parameters that can manipulate the target data.
[0162] The processor 120 can determine compression parameters based on information about the learning dataset stored in the memory 110 and information about a dedicated artificial intelligence model compressed using the learning dataset.
[0163] Processor 120 can identify information about the learning dataset that matches the situational information among the information about the learning dataset stored in memory 110, and determine compression parameters associated with the identified learning dataset. Processor 120 can determine the learning dataset that includes the largest amount of information consistent with the situational information of the target data among a plurality of learning datasets stored in memory 110 as the learning dataset that matches the situational information, and identify the compression parameters mapped to the determined learning dataset and stored in memory 110. Depending on the embodiment, when multiple learning datasets among a plurality of learning datasets stored in memory 110 include the largest amount of information consistent with the situational information of the target data, processor 120 can determine the smallest learning dataset among the plurality of learning datasets as the learning dataset that matches the situational information, and identify the compression parameters mapped to the determined learning dataset.
[0164] For example, when the contextual information of the target data is analyzed as "distant sound source," "clean environment without noise," "voice command using a few words," and "dictation," the processor 120 can identify the learning dataset mapped to the contextual information from the information about the learning dataset stored in the memory 110. (See reference) Figure 6 The processor 120 can identify D0 and D1 as learning datasets containing all information included in the identified situation information, based on the information about the learning datasets shown in memory 110. The processor 120 can also identify the smaller dataset D1 between D0 and D1 as the dataset matching the situation information. Then, the processor 120 can identify the stored compression parameter rank R1 mapped to the identified dataset D1.
[0165] In operation S740-a, processor 120 can search for a dedicated artificial intelligence model corresponding to the compression parameters. Processor 120 can identify the dedicated artificial intelligence model corresponding to the compression parameters among a plurality of dedicated artificial intelligence models stored in memory 110, and load the identified dedicated artificial intelligence model.
[0166] The loaded dedicated AI model can be a compressed AI model, which has a smaller size than the general AI model stored in memory 110. As described above, processor 120 can load dedicated AI models with small sizes and perform operations, and therefore, the amount of operations on target data can be reduced and processing speed can be increased, and the resources of electronic devices (e.g., memory, CPU, GPU, etc.) are not wasted, and thus the utility of resources can be enhanced.
[0167] In operation S750-a, processor 120 can acquire output values for target data based on a dedicated artificial intelligence model. Specifically, processor 120 can acquire output data for target data by making the target data the input value for the dedicated artificial intelligence model acquired in operation S740. Processor 120 can then provide the acquired output data to a user through output interfaces such as a display and speakers (not shown).
[0168] The foregoing embodiments relate to a case where a dedicated artificial intelligence model is stored in memory 110.
[0169] Depending on the embodiment, when a dedicated AI model is not stored in memory 110, processor 120 can generate a dedicated AI model that reflects the compression parameters. In this case, processor 120 can generate a dedicated AI model for the compression parameters by applying the compression parameters to the AI model stored in memory 110.
[0170] Figure 7b It is a flowchart of a process, according to an embodiment, to perform operations by using a dedicated artificial intelligence model that reflects compression parameters thereto.
[0171] because Figure 7b Operations S710-b, S720-b, and S730-b in the context of... Figure 7a Operations S710-a, S720-a, and S730-a are the same, so the explanation of the overlapping content will be omitted.
[0172] In operation S730-b, processor 120 can determine compression parameters based on situational information of target data input to electronic device 100, and then, in operation S740-b, obtain output values for target data by using a dedicated artificial intelligence model that reflects the compression parameters thereto.
[0173] Specifically, processor 120 can load a dedicated artificial intelligence model that is compressed by applying a compression algorithm to an artificial intelligence model stored in memory 110. Here, the compression algorithm can be an algorithm in which compression parameters determined in operation S730-b are applied as input values.
[0174] For example, suppose a matrix M of size m×n is stored in memory 110 as information for a general artificial intelligence model. If the compression parameter is determined to be R1 based on situational information, processor 120 can apply the SVD algorithm, where the compression parameter R1 is used as the input value to matrix M, and obtain matrix U (of size m×R1) and matrix V* (of size R1×n) as the compression matrix of matrix M.
[0175] Processor 120 can obtain output values for target data by using matrices U and V* as compression matrices. Processor 120 can also obtain output values for target data by using the target data as input values to the product matrix of matrices U and V*.
[0176] As described above, processor 120 can determine compression parameters based on contextual information of the target data, and generate an output value for the target data by using a dedicated artificial intelligence model that compresses the data by reflecting the determined compression parameters onto an artificial intelligence model stored in memory 110. In this case, processor 120 can obtain an output value for the input value by performing an operation that applies the compression algorithm only once.
[0177] The embodiments in which the electronic device 100 performs operations on the target data are not limited to Figure 7a and Figure 7b As another embodiment, processor 120 can load an artificial intelligence model stored in memory 110 and generate a specialized artificial intelligence model for a general artificial intelligence model by using compression parameters determined in operation S730-a or S730-b. In this case, processor 120 can also generate a specialized artificial intelligence model by applying a compression algorithm only once.
[0178] exist Figure 4 Figure 7 illustrates the generation of a dedicated artificial intelligence model in each step, but this disclosure is not necessarily limited thereto.
[0179] Figure 8 This is a diagram illustrating the process of generating multiple dedicated artificial intelligence models from an artificial intelligence model according to an embodiment.
[0180] like Figure 8 As shown, processor 120 can generate multiple dedicated artificial intelligence models in each step. Specifically, processor 120 can generate multiple dedicated artificial intelligence models by selecting different learning datasets in each step.
[0181] For example, processor 120 can compress the initial artificial intelligence model N0 using artificial intelligence model compression module 111, and generate a dedicated artificial intelligence model N1 by training the compressed artificial intelligence model using initial learning data D0.
[0182] Then, processor 120 can classify multiple learning datasets from learning data D0 using learning data reconstruction module 112, and select different learning datasets from the classified learning datasets to generate different specialized artificial intelligence models. For example, processor 120 can select learning dataset D from learning data D0. 1-1 And by using the learning dataset D 1-1 The artificial intelligence model generated by repeatedly compressing the dedicated artificial intelligence model N1 is repeatedly trained, and a dedicated artificial intelligence model N is generated. 2-1 Similarly, processor 120 can select learning dataset D from learning data D0. 1-2 And generated by using the learning dataset D 1-2 N trained dedicated artificial intelligence model 2-2 ; and selecting the learning dataset D from the learning data D0 1-3 And generated by using the learning dataset D 1-3 N trained with specialized artificial intelligence model 2-3 .
[0183] Processor 120 can select one of at least one specialized artificial intelligence model generated in each step, and generate a specialized artificial intelligence model for the selected model. For example, processor 120 can select as one of multiple specialized artificial intelligence models N generated in stage 2. 2-1 N 2-2 and N 2-3 One of the dedicated artificial intelligence models N 2-2 And update the selected dedicated artificial intelligence model N. 2-2 As an artificial intelligence model to be compressed.
[0184] Processor 120 can train dedicated artificial intelligence model N 2-2 The learning dataset D 1-2 Choose different learning datasets D 2-1 and D 2-2 Processor 120 can use the selected learning dataset D 2-1 Repeated training is achieved by repeatedly compressing a dedicated artificial intelligence model N. 1-2 The generated artificial intelligence model, and the generated dedicated artificial intelligence model N 3-1 Similarly, processor 120 can generate data by using the learning dataset D. 1-2 The selected learning dataset D 2-2 The specialized artificial intelligence model N trained 3-2 .
[0185] As mentioned above Figures 4 to 8As described herein, the processor 120 can train a dedicated artificial intelligence model generated in each step using a learning dataset selected from the learning data according to predetermined rules.
[0186] Figure 9 to Figure 11 It is a diagram illustrating, according to an embodiment, the selection of a learning dataset from learning data according to predetermined rules and the training of a specialized artificial intelligence model using the selected learning dataset.
[0187] Figure 9 is a diagram illustrating how an electronic device 100, according to an embodiment, trains a dedicated artificial intelligence model using target data input into the electronic device 100. Specifically, Figure 9a This is a diagram illustrating an electronic device 100 for training a dedicated artificial intelligence model, wherein the electronic device 100 is a user terminal device such as a speaker; and Figure 9b This is a diagram showing an electronic device for training a dedicated artificial intelligence model, where electronic device 100 is a server.
[0188] The processor 120 can receive target data from the user. For example, if the trained artificial intelligence model is a speech recognition model, the processor 120 can receive a voice command such as "turn on the air conditioner" from the user as target data. The processor 120 can then perform speech recognition on the voice command "turn on the air conditioner" by using the target data as input to the speech recognition model, and provide the user with a response such as "the air conditioner is on" as the output value.
[0189] The processor 120 can generate a dedicated artificial intelligence model for the target data and train the generated dedicated artificial intelligence model.
[0190] To this end, the processor 120 can classify the learning data into multiple learning datasets based on the feature information of the learning data. Here, the feature information of the learning data means that elements among the multiple elements included in the learning data that are meaningful because they have a specific pattern or rule are indicated as vectors.
[0191] Specifically, the processor 120 can determine the feature information of the learning data by using the learning data reconstruction module 112, and classify the learning data into multiple learning datasets based on the determined feature information.
[0192] More specifically, the processor 120 can obtain vector values containing feature information of the learning data by using the learning data reconstruction module 112, and classify the learning data into multiple learning datasets based on the distribution of the vector values.
[0193] For example, when the learning data is natural language speech data, the processor 120 can classify the learning data based on its vector values as: noise-free speech delivered in a quiet environment, speech delivered in a quiet environment but at a distance from the sound source to the device, speech mixed with noise other than speech, etc. Alternatively, the processor 120 can classify the learning data as women's speech, men's speech, children's speech, teenagers' speech, speech from different regions, etc. Or, the processor 120 can classify the learning data based on its feature vector values as smartphone learning data, TV learning data, air conditioner learning data, etc.
[0194] As another example, when the learning data is object recognition data, the processor 120 can classify the learning data into people (men, women, children, crowds), animals (dogs, cats, lions, tigers, etc.), objects (natural objects, man-made objects, etc.) based on the feature vector values of the learning data.
[0195] The processor 120 can identify the learning dataset corresponding to the target data in multiple classification learning datasets.
[0196] Therefore, the processor 120 can extract feature information from the target data received from the user.
[0197] The processor 120 can compare the feature information of the extracted target data with the feature information of multiple learning datasets, and select the learning dataset with the same or similar feature information as the target data from the multiple learning datasets.
[0198] Then, processor 120 can train an artificial intelligence model using the selected learning dataset. Specifically, processor 120 can repeatedly compress a general artificial intelligence model (or a specialized artificial intelligence model) pre-stored in memory 110, and repeatedly train the compressed artificial intelligence model using the selected learning dataset. As a result, processor 120 can generate a new specialized artificial intelligence model, and train the generated specialized artificial intelligence model using the selected learning dataset.
[0199] For example, if a user utters a phrase such as "turn on the air conditioner" in an environment with noise, such as television sound, the processor 120 can extract features such as the air conditioner control command and the presence of some noise as feature information of the target data "turn on the air conditioner". The processor 120 can select a combination of "air conditioner learning dataset" and "learning dataset in an environment with some noise" as a learning dataset with the same or similar feature information as the target data among multiple learning datasets.
[0200] The processor 120 can progressively and repeatedly compress a general artificial intelligence model pre-stored in the memory 110, and train the compressed artificial intelligence model using a combination of an "air conditioning learning dataset" and a "learning dataset in an environment with some noise," and generate a specialized artificial intelligence model. Finally, the processor 120 can train the generated specialized artificial intelligence model using a combination of an "air conditioning learning dataset" and a "learning dataset in an environment with some noise."
[0201] Processor 120 can progressively compress specialized AI models pre-stored in memory 110, instead of general AI models, and train the compressed AI models using combinations of learning datasets. For example, processor 120 can progressively compress an air-conditioning-specific AI model trained using a learning dataset for air conditioners, and train the compressed AI model using a combination of the "air-conditioning learning dataset" and the "learning dataset for an environment with some noise." As a result, processor 120 can generate new specialized AI models trained using a combination of the "air-conditioning learning dataset" and the "learning dataset for an environment with some noise," and train the specialized AI models.
[0202] like Figure 9b As shown, electronic device 100 can be implemented as a server. In this case, electronic device 100 can connect to user terminal device 200 (such as a speaker, television, or smartphone) and perform communication. Electronic device 100 classifies the learning data into multiple learning datasets based on the feature information of the learning data, as described above. Figure 9a The same applies as shown, so a description of this point will be omitted.
[0203] When a user inputs target data into the user terminal device 200, the user terminal device 200 can transmit the target data to the electronic device 100. The processor 120, which receives the target data from the user terminal device 200, can generate a dedicated artificial intelligence model based on the target data and train the generated dedicated artificial intelligence model.
[0204] Specifically, the processor 120 can select a learning dataset corresponding to the target data from multiple learning datasets, and train a dedicated artificial intelligence model generated by compressing the artificial intelligence model using the selected learning dataset.
[0205] The processor 120 can output a result value for the target data by taking the target data as input to the generated dedicated artificial intelligence model, and transmit the output result value to the user terminal device 200.
[0206] Figure 10This is a diagram illustrating the process of training a dedicated artificial intelligence model based on test data according to an embodiment.
[0207] Figure 10 The artificial intelligence model 521 in the model can be a specialized artificial intelligence model generated by compressing the general artificial intelligence model 520. Here, the specialized artificial intelligence model 521 can be an artificial intelligence model trained using learning data D0.
[0208] After generating a dedicated artificial intelligence model, the processor 120 can perform tests on the dedicated artificial intelligence model 521 using test data T01010. Here, test data refers to data that shares common feature information with the learning data but is different from the learning data.
[0209] Since the test data and the learning data share common features but are different from the learning data, the dedicated artificial intelligence model 521 can output the target value of the test data, or output a value close to the target value, or output a value different from the target value.
[0210] Processor 120 can classify test data into multiple test datasets using the learning data reconstruction module 112. For example, processor 120 can classify test data into: a test dataset T'0 1011 that outputs the target value or a value close to the target value, or a test dataset T”0 1012 that outputs a value different from the target value.
[0211] The processor 120 can select a test dataset from the test data based on the test results. Specifically, the processor 120 can select a test dataset T'01011 that outputs the target value or a value close to the target value.
[0212] Processor 120 can identify a learning dataset selected from learning data D0 1010 that corresponds to test dataset T'0 1011. Specifically, processor 120 can select a learning dataset selected from learning data D0 1010 that includes feature information common to test dataset T'0 1011.
[0213] For example, assuming a dedicated AI model 521 corresponds to a machine translation AI model and the learning data consists of test data of various lengths, the test data can also include text data of various lengths, similar to the learning data. If, as a result of testing the dedicated AI model using the test data, the dedicated AI model outputs a target value or a value close to the target value for test data containing information about 15 or fewer words, but outputs a value different from the target value for test data containing information about more than 15 words, then the processor 120 can classify the test data T0 1010 into a test dataset T'0 1011 containing information about 15 or fewer words and a test dataset T”0 1012 containing information about more than 15 words, and identify the learning dataset corresponding to the test dataset T'01011 containing information about 15 or fewer words. That is, the processor 120 can select the learning dataset containing 15 or fewer words from the learning dataset.
[0214] Processor 120 can train a specialized artificial intelligence model using an identifiable learning dataset. Here, processor 120 can generate a specialized artificial intelligence model 522 by repeatedly compressing the specialized artificial intelligence model 521, and train the generated specialized artificial intelligence model 522 using an identifiable learning dataset.
[0215] Figure 11 This is a diagram illustrating the process of training a dedicated artificial intelligence model based on user input, according to an embodiment.
[0216] The processor 120 can receive input from the user for setting learning data through various interfaces included in the electronic device 100.
[0217] The processor 120 can control the display to show a user interface (UI) for receiving user input to set learning data.
[0218] Figure 11 Screens 1110, 1120, and 1130 indicate screens displayed on electronic devices including displays, such as televisions, smartphones, tablet PCs, PCs, and laptop PCs. Processor 120 may display screen 1110, which includes a UI for inputting the user's desired task; screen 1120, which includes a UI for inputting the device the user will use; and screen 1130, which includes a UI for inputting the user's surrounding environment. In addition to the above, depending on the embodiment, processor 120 may display screens including various UIs, such as a UI for inputting user information such as the user's age and gender.
[0219] When receiving learning data setting information from the user via a UI displayed on the screen, the processor 120 can select a learning dataset corresponding to the data setting information from the learning data and train a dedicated artificial intelligence model using the selected learning dataset.
[0220] For example, if a user inputs the setting information "to execute voice commands via Bixby using the TV in a somewhat noisy environment" through the UI displayed on screens 1110, 1120, and 1130, the processor 120 can select from the learning data a learning dataset for voice commands, a learning dataset for operation in the TV device, and a learning dataset for voice commands in a space with some noise, and train a dedicated artificial intelligence model by using a combination of the selected learning datasets.
[0221] Figure 11 This illustration shows the selection of multiple learning datasets through multiple settings inputs; however, in other embodiments, the learning dataset can be selected through a single settings input.
[0222] In addition, Figure 11 The image shows a UI for users to select one of multiple menu items, but depending on the embodiment, a UI for users to directly input data information may be displayed.
[0223] Figure 11 User input received via a UI displayed on a monitor is shown, but this disclosure is not limited thereto.
[0224] According to another embodiment, the processor 120 can set up learning data via a microphone through voice commands. For example, when a user says, "I want to identify animals from images," the processor 120 can select a learning dataset for image recognition and a learning dataset for identifying animals from the learning data, and train a dedicated artificial intelligence model by using the combination of the selected learning datasets.
[0225] Figure 12 This is a flowchart of a method for controlling an electronic device according to various embodiments.
[0226] First, in operation S1210, a specialized artificial intelligence model with a smaller size than the general artificial intelligence model can be generated based on a general artificial intelligence model trained using learning data. Here, the general artificial intelligence model can be a general artificial intelligence model trained at electronic device 100, or an artificial intelligence model trained at an external device such as a server and stored in electronic device 100.
[0227] A specialized AI model can be a compressed version of a general AI model, and the size of the data associated with the connections (weight connections) between multiple nodes included in the specialized AI model can be smaller than the size of the data associated with the connections between multiple nodes included in the general AI model. For example, the number of connections between multiple nodes included in the specialized AI model can be less than the number of connections between multiple nodes included in the general AI model, or the number of bits in the connections between multiple nodes included in the specialized AI model can be less than the number of bits in the connections between multiple nodes included in the general AI model.
[0228] Then, compression parameters associated with a specific AI model can be determined, and based on the determined compression parameters, a specific AI model can be generated by reducing the size of the data related to the number of connections between multiple nodes included in a general AI model.
[0229] Then, in operation S1220, a dedicated artificial intelligence model can be trained by using a learning dataset selected from the learning data according to predetermined rules.
[0230] For example, specialized artificial intelligence models can be trained based on target data. Target data refers to the input data used to perform operations by employing the trained artificial intelligence model.
[0231] Specifically, the electronic device can classify the learning data into multiple learning datasets based on the feature information of the learning data, and use the learning dataset corresponding to the target data from the multiple classified learning datasets to train a dedicated artificial intelligence model. Here, the feature information of the learning data refers to the feature vector of the learning data, and more specifically, it can refer to indicating elements with specific patterns or rules among the multiple elements included in the learning data as vectors.
[0232] As another example, a specialized artificial intelligence model can be trained based on test data. Here, test data refers to data that shares common features with the learning data but is different from the learning data.
[0233] Specifically, electronic devices can use test data to test general artificial intelligence models or specialized artificial intelligence models generated based on general artificial intelligence models.
[0234] You can select a test dataset from the test data based on the test results. For example, you can select a test dataset with output target values or values close to the target values based on the test results.
[0235] Then, a learning dataset selected from the learning data that corresponds to the test dataset can be identified, and a dedicated artificial intelligence model can be trained using the identified learning dataset.
[0236] As another example, data settings information can be received from users, and a dedicated artificial intelligence model can be trained based on the received data settings information.
[0237] The electronic device can display a UI for receiving user data settings information and receive user input through the displayed UI.
[0238] When receiving data setting information from a user, a learning dataset corresponding to the data setting information can be selected from the learning data, and a dedicated artificial intelligence model can be trained by using the selected learning dataset.
[0239] The learning dataset can be selected from the learning data according to the aforementioned predetermined rules, and it can be determined whether the selected learning dataset meets the predetermined conditions. Then, if the selected learning dataset meets the predetermined conditions, a dedicated artificial intelligence model can be trained using the selected learning dataset.
[0240] For example, it can be determined whether the size of the selected learning dataset is greater than or equal to a predetermined value, and if the size of the selected learning dataset is greater than or equal to the predetermined value, a dedicated artificial intelligence model can be trained.
[0241] The performance of a dedicated AI model can be determined by testing the trained dedicated AI model.
[0242] If, as a result of testing a dedicated AI model, the performance of the dedicated AI model is greater than or equal to a first threshold and less than or equal to a second threshold, then information about the dedicated AI model and information about the learning dataset learned by the dedicated AI model can be stored.
[0243] It is possible to generate specialized artificial intelligence models based on general artificial intelligence models, and to generate another specialized artificial intelligence model based on the generated specialized artificial intelligence model.
[0244] Specifically, a specialized AI model can be generated by compressing a general AI model, and this specialized AI model can be trained using a learning dataset included in the learning data. Here, if the performance of the specialized AI model trained as a test model is greater than or equal to a predetermined value, another specialized AI model can be generated based on the specialized AI model.
[0245] The electronic device 100 can receive target data. In operation S1230-Y, where the target data corresponds to one of multiple learning datasets included in the learning data, in operation S1240, an output value for the target data can be obtained by making the target data the input value of a dedicated artificial intelligence model. In this case, the dedicated artificial intelligence model can be a dedicated artificial intelligence model trained using a learning dataset corresponding to the target data.
[0246] Specifically, the feature information of the target data can be determined, and the feature information of the learning dataset can be determined. When the feature information of the target data corresponds to the feature information of the learning dataset, the output value for the target data can be obtained by using the target data as the input value of a dedicated artificial intelligence model.
[0247] As another example, when information about a learning dataset and information about a dedicated AI model trained using the learning dataset are stored in an electronic device, information about the learning dataset that corresponds to the feature information of the target data among the multiple learning datasets stored in the electronic device can be identified, and a dedicated AI model can be generated based on information about the dedicated AI model trained using the identified learning dataset. Then, an output value for the target data can be obtained by using the target data as input to the generated dedicated AI model.
[0248] In the above description, various operations described as being performed via electronic device 100 or an external device of electronic device 100 can be performed by one or more electronic devices in the form of electronic device control methods or operating methods. For example, features such as generating a dedicated artificial intelligence model, training the generated dedicated artificial intelligence model, and determining the compression parameters of the dedicated artificial intelligence model can be performed at the external device, while at electronic device 100, operations targeting only the target data can be performed using information about the dedicated artificial intelligence model and information about the learning data.
[0249] The various embodiments described above can be implemented in a recording medium readable by a computer or a computer-like device by using software, hardware, or a combination thereof.
[0250] Depending on the hardware implementation, the embodiments can be implemented by using at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field-programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, or an electronic unit for performing various functions.
[0251] In some cases, the embodiment may be implemented as the processor itself. Depending on the software implementation, the embodiment may be implemented as a separate software module. Each of the software modules may perform one or more functions and operations described in this specification.
[0252] Computer instructions for performing processing operations according to various embodiments may be stored in a non-transitory computer-readable medium. When executed by a processor, such computer instructions stored in the non-transitory computer-readable medium can cause a particular machine to perform the processing operations according to various embodiments.
[0253] Non-transitory computer-readable media refers to media that store data semi-permanently and can be read by a machine, but are not media that temporarily store data, such as registers, caches, and memories. Specifically, the aforementioned applications or programs can be provided simultaneously while stored on non-transitory computer-readable media such as CDs, DVDs, hard disks, Blu-ray discs, USB drives, memory cards, and ROMs.
[0254] Furthermore, while preferred embodiments have been shown and described, this disclosure is not limited to the specific embodiments described above, and it will be apparent to those skilled in the art that various modifications can be made without departing from the spirit of this disclosure as claimed in the appended claims. Moreover, such modifications should not be interpreted independently of the technical concept or prospects of this disclosure.
Claims
1. A method for controlling an electronic device, the method comprising: Receive target data, which will be input as the input value for the operation; Choose a general artificial intelligence model, which is a speech recognition model trained with learning data as speech data; A compressed artificial intelligence model is generated based on the selected general artificial intelligence model. The process of generating a compressed artificial intelligence model includes: applying the singular value decomposition (SVD) algorithm to a matrix, compressing a selected general artificial intelligence model using a low-rank approximation algorithm, and training the compressed artificial intelligence model. Generate a dedicated artificial intelligence model based on the compressed artificial intelligence model; Output data is obtained by performing operations using the dedicated artificial intelligence model; and The output data is provided through the output interface. The generation of the compressed artificial intelligence model also includes: The rank of the SVD algorithm is obtained based on the compression ratio. The selected general AI model is compressed and trained based on the obtained rank, and the compressed AI model is then transformed into a converted compressed AI model. The performance of the compressed AI model is determined based on a predetermined first threshold, and If the performance of the transformation-based compressed AI model falls below a predetermined first threshold, a dedicated AI model will be generated. The generation of specialized artificial intelligence models includes: The compressed AI model is then trained on a learning dataset reconstructed from the learning data used to train the selected general AI model. Specifically, the learning dataset is reconstructed by selecting a learning dataset from the learning data based on predetermined rules. The artificial intelligence models that generate compression include: If the performance of the compressed AI model based on the transformation is higher than or equal to a predetermined first threshold, the compressed AI model will be generated repeatedly.
2. The method of claim 1, wherein, Generating specialized artificial intelligence models includes: A compressed artificial intelligence model is retrained based on a pre-defined learning dataset.
3. The method of claim 2, wherein, Generating specialized artificial intelligence models includes: The performance of the retrained compressed AI model is determined relative to a predetermined second threshold; and Based on the performance of the retrained compressed AI model being higher than or equal to a predetermined second threshold, the retrained compressed AI model is further compressed to generate a dedicated AI model.
4. The method of claim 2, wherein, Generating specialized artificial intelligence models includes: Based on the feature information of the first learning data used to train the general artificial intelligence model, the first learning data is classified into multiple learning datasets and at least one of the multiple learning datasets is reconstructed into a predetermined learning dataset.
5. The method of claim 4, wherein, The predetermined learning dataset includes at least one of the plurality of learning datasets that has been compressed to correspond to the target data input as input values.
6. The method of claim 2, wherein, The artificial intelligence models that generate compression include: The performance of the AI model for compression based on test data was determined, and Generating specialized artificial intelligence models includes: The test data is classified into multiple learning datasets, and at least one of the multiple learning datasets is reconstructed into a predetermined learning dataset.
7. The method according to claim 6, wherein, The test data includes test data that outputs results within a predetermined range based on the target value.
8. The method of claim 2, wherein, Generating specialized artificial intelligence models includes: Based on the data setting information received from the user, the learning dataset corresponding to the data setting information is identified from the first learning data used to train the selected general artificial intelligence model, and the identified learning dataset is reconstructed into a predetermined learning dataset.
9. An electronic device comprising: The memory stores the initial learning data and the general artificial intelligence model trained using the initial learning data. and processor, The processor is configured as follows: Receive target data, which will be input as the input value for the operation. Select a general artificial intelligence model for training, wherein the general artificial intelligence model is a speech recognition model trained from learning data used as speech data. The rank of the Singular Value Decomposition (SVD) algorithm is obtained based on the compression ratio. The selected general AI model is compressed and trained based on the obtained rank, and the compressed AI model is then transformed into a converted compressed AI model. The performance of the compressed AI model based on the transformation is determined based on a predetermined first threshold. If the performance of the compressed AI model based on the transformation is lower than the predetermined first threshold, a dedicated AI model is generated. Output data is obtained by performing the operation using the dedicated artificial intelligence model. The output data is provided through the output interface. The processor is further configured as follows: By applying the SVD algorithm to a matrix, a selected general artificial intelligence model is compressed using a low-rank approximation algorithm. Training the compressed artificial intelligence model, and The compressed AI model is then trained on a learning dataset reconstructed from the learning data used to train the selected general AI model. Specifically, the learning dataset is reconstructed by selecting a learning dataset from the learning data based on predetermined rules. The processor is further configured as follows: If the performance of the compressed AI model based on the transformation is higher than or equal to a predetermined first threshold, the transformation from the compressed AI model to the transformed compressed AI model is repeated. 10.The electronic device of claim 9, wherein The processor is also configured to: A compressed artificial intelligence model is retrained based on a pre-defined learning dataset. 11.The electronic device of claim 10, wherein The processor is also configured to: The performance of the retrained compressed AI model is determined relative to a predetermined second threshold; and Based on the performance of the retrained compressed AI model being higher than or equal to a predetermined second threshold, the retrained compressed AI model is further compressed to generate a dedicated AI model. 12.The electronic device of claim 10, wherein, The processor is also configured to: Based on the feature information of the first learning data used to train the general artificial intelligence model, the first learning data is classified into multiple learning datasets, and at least one of the multiple learning datasets is reconstructed into a predetermined learning dataset. 13.The electronic device of claim 10, wherein The processor is also configured to: The performance of the compressed AI model was determined based on test data; The test data is categorized into multiple learning datasets; and Reconstruct at least one of the plurality of learning datasets into a predetermined learning dataset.
Citation Information
Patent Citations
Data processing device and method and electronic equipment
CN110766131A
Determining layer ranks for compression of deep networks
US20190228311A1