KR20230024950A - Method and system for determining optimal parameter - Google Patents
Method and system for determining optimal parameter Download PDFInfo
- Publication number
- KR20230024950A KR20230024950A KR1020230017102A KR20230017102A KR20230024950A KR 20230024950 A KR20230024950 A KR 20230024950A KR 1020230017102 A KR1020230017102 A KR 1020230017102A KR 20230017102 A KR20230017102 A KR 20230017102A KR 20230024950 A KR20230024950 A KR 20230024950A
- Authority
- KR
- South Korea
- Prior art keywords
- inference model
- compression method
- combination
- compressed
- parameter
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 177
- 238000007906 compression Methods 0.000 claims description 137
- 230000006835 compression Effects 0.000 claims description 136
- 238000004590 computer program Methods 0.000 claims description 12
- 238000013139 quantization Methods 0.000 claims description 12
- 238000013138 pruning Methods 0.000 claims description 11
- 238000005265 energy consumption Methods 0.000 claims description 10
- 238000000354 decomposition reaction Methods 0.000 claims description 8
- 238000013140 knowledge distillation Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 description 25
- 238000012360 testing method Methods 0.000 description 19
- 238000004891 communication Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 10
- 239000013585 weight reducing agent Substances 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 4
- 238000013136 deep learning model Methods 0.000 description 4
- 230000001537 neural effect Effects 0.000 description 4
- 238000005457 optimization Methods 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 238000012804 iterative process Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0495—Quantised networks; Sparse networks; Compressed networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/0895—Weakly supervised learning, e.g. semi-supervised or self-supervised learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
아래의 설명은 최적 파라미터 결정 방법 및 시스템에 관한 것이다.The following description relates to an optimal parameter determination method and system.
딥러닝 모델(또는 인공지능 모델)의 경량화는 주어진 딥러닝 모델을 더 작은 딥러닝 모델로 만드는 함수, 모듈 및/또는 기능을 의미한다. 여기서, '작다'는 딥러닝 모델을 구성하는 가중치(weights/bias)의 수를 줄이거나, 용량을 줄이거나, 추론 속도를 빠르게 하는 것을 의미할 수 있다. 이때, 경량화를 진행하면서 성능을 하락시키지 않는 것이 매우 중요하다.Lightweighting of deep learning models (or artificial intelligence models) refers to functions, modules and/or features that make a given deep learning model into a smaller deep learning model. Here, 'small' may mean reducing the number of weights/bias constituting the deep learning model, reducing capacity, or speeding up inference. At this time, it is very important not to degrade the performance while reducing the weight.
경량화 기법에는 다양한 종류가 있다. 큰 분류로는 가지치기(Pruning), 양자화(Quantization), 지식 증류(Knowledge Distillation), 모델 탐색(Neural Architecture Search), 필터 분해(Filter Decomposition)가 있으며, 각 분류 내에도 굉장히 다양한 종류의 경량화 기법이 존재한다.There are various types of lightweighting techniques. Large classifications include pruning, quantization, knowledge distillation, model search (Neural Architecture Search), and filter decomposition, and within each classification, there are many different types of lightweighting techniques. exist.
이때, 각 경량화 기법은 단순하게 이용할 수는 없다. 각 경량화 기법을 이용하기 위한 파라미터들이 존재한다. 예를 들어, 가지치기의 경우 각 Layer 별로 얼마나 많은 양의 파라미터를 가지치기할 것인지에 대한 파라미터를 미리 조정해야 하고, 파라미터를 어떻게 설정하느냐에 따라 경량화 성능에 많은 영향을 준다.At this time, each weight reduction technique cannot be simply used. There are parameters for using each lightweight technique. For example, in the case of pruning, the parameters for how many parameters to pruning for each layer must be adjusted in advance, and how the parameters are set greatly affects the lightweighting performance.
[선행문헌번호][Prior document number]
한국공개특허 제10-2020-0104201호Korean Patent Publication No. 10-2020-0104201
추론모델을 압축하여 타겟 디바이스로 제공하고, 타겟 디바이스로부터 제공되는 압축된 추론모델의 성능에 기반하여 최적의 파라미터 조합을 결정할 수 있는 최적 파라미터 결정 방법 및 시스템을 제공한다.Provided is an optimal parameter determination method and system capable of compressing an inference model and providing it to a target device, and determining an optimal parameter combination based on the performance of the compressed inference model provided from the target device.
적어도 하나의 프로세서를 포함하는 컴퓨터 장치에 의해 수행되는 최적 파라미터 결정 방법에 있어서, 상기 적어도 하나의 프로세서에 의해, 추론모델을 위한 파라미터 조합을 선택하는 제1 단계; 상기 적어도 하나의 프로세서에 의해, 상기 선택된 파라미터 조합을 이용하여 상기 추론모델을 압축하는 제2 단계; 상기 적어도 하나의 프로세서에 의해, 상기 압축된 추론모델을 타겟 디바이스로 전송하는 제3 단계; 상기 적어도 하나의 프로세서에 의해, 상기 타겟 디바이스로부터 상기 압축된 추론모델의 성능을 수신하는 제4 단계; 및 상기 적어도 하나의 프로세서에 의해, 상기 제1 단계 내지 상기 제4 단계를 반복 수행할 것인지 여부를 결정하는 제5 단계를 포함하는 최적 파라미터 결정 방법을 제공한다.A method for determining an optimal parameter performed by a computer device including at least one processor, comprising: a first step of selecting, by the at least one processor, a parameter combination for an inference model; a second step of compressing, by the at least one processor, the inference model using the selected parameter combination; a third step of transmitting the compressed inference model to a target device by the at least one processor; a fourth step of receiving, by the at least one processor, performance of the compressed inference model from the target device; and a fifth step of determining, by the at least one processor, whether to repeat the first to fourth steps.
일측에 따르면, 상기 제1 단계는, 상기 추론모델의 압축을 위한 적어도 하나의 압축 메서드를 선택하는 단계; 및 상기 선택된 적어도 하나의 압축 메서드의 파라미터들 중 적어도 일부의 파라미터의 값의 조합을 상기 파라미터 조합으로서 선택하는 단계를 포함하는 것을 특징으로 할 수 있다.According to one aspect, the first step may include selecting at least one compression method for compressing the reasoning model; and selecting a combination of values of at least some of the parameters of the selected at least one compression method as the parameter combination.
다른 측면에 따르면, 상기 제2 단계는, (1) 가지치기(Pruning), 양자화(Quantization), 지식 증류(Knowledge Distillation), 모델 탐색(Neural Architecture Search) 및 필터 분해(Filter Decomposition) 중 적어도 하나에 기반한 압축 메서드 및 (2) 상기 파라미터 조합을 이용하여 상기 추론모델을 압축하는 것을 특징으로 할 수 있다.According to another aspect, the second step may include (1) at least one of pruning, quantization, knowledge distillation, model search (Neural Architecture Search), and filter decomposition. and (2) compressing the inference model using the based compression method and (2) the parameter combination.
또 다른 측면에 따르면, 상기 타겟 디바이스는 상기 압축된 추론모델에 대한 지연 시간 및 정확도 중 적어도 하나를 포함하는 성능을 측정하도록 구현되는 것을 특징으로 할 수 있다.According to another aspect, the target device may be implemented to measure performance including at least one of latency and accuracy for the compressed inference model.
또 다른 측면에 따르면, 상기 제1 단계는, 상기 제5 단계에 의해 반복 수행되는 경우, 이전에 선택된 파라미터 조합과는 다른 값을 포함하는 파라미터 조합을 선택하는 것을 특징으로 할 수 있다.According to another aspect, when the first step is repeatedly performed by the fifth step, a parameter combination including a different value from a previously selected parameter combination may be selected.
또 다른 측면에 따르면, 상기 제5 단계는, 상기 성능이 기설정된 제약을 만족하는지 여부 또는 기설정된 횟수에 기초하여 상기 제1 단계 내지 상기 제4 단계를 반복 수행할 것인지 여부를 결정하는 것을 특징으로 할 수 있다.According to another aspect, the fifth step is characterized by determining whether the performance satisfies a preset constraint or whether to repeat the first to fourth steps based on a preset number of times. can do.
또 다른 측면에 따르면, 최적 파라미터 결정 방법은 상기 수신된 성능에 따라 최적 파라미터 조합을 결정하는 제6 단계를 더 포함할 수 있다.According to another aspect, the optimal parameter determination method may further include a sixth step of determining an optimal parameter combination according to the received performance.
컴퓨터 장치와 결합되어 상기 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored in a computer readable recording medium is provided in combination with a computer device to execute the method on the computer device.
상기 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer readable recording medium having a program for executing the method in a computer device is recorded.
컴퓨터 장치에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 추론모델을 위한 파라미터 조합을 선택하는 제1 과정; 상기 적어도 하나의 프로세서에 의해, 상기 선택된 파라미터 조합을 이용하여 상기 추론모델을 압축하는 제2 과정; 상기 적어도 하나의 프로세서에 의해, 상기 압축된 추론모델을 타겟 디바이스로 전송하는 제3 과정; 상기 적어도 하나의 프로세서에 의해, 상기 타겟 디바이스로부터 상기 압축된 추론모델의 성능을 수신하는 제4 과정; 및 상기 적어도 하나의 프로세서에 의해, 상기 수신된 성능에 따라 상기 제1 과정 내지 상기 제4 과정을 반복 수행할 것인지 여부를 결정하는 제5 과정을 수행하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A first process comprising at least one processor implemented to execute instructions readable by a computer device, and selecting a parameter combination for an inference model by the at least one processor; a second step of compressing, by the at least one processor, the inference model using the selected parameter combination; a third process of transmitting the compressed inference model to a target device by the at least one processor; a fourth step of receiving, by the at least one processor, performance of the compressed inference model from the target device; and a fifth process of determining, by the at least one processor, whether to repeat the first to fourth processes according to the received performance.
추론모델을 압축하여 타겟 디바이스로 제공하고, 타겟 디바이스로부터 제공되는 압축된 추론모델의 성능에 기반하여 최적의 파라미터 조합을 결정할 수 있다.The inference model is compressed and provided to the target device, and an optimal parameter combination may be determined based on performance of the compressed inference model provided from the target device.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 3은 본 발명의 일실시예에 따른 경량화 시스템의 예를 도시한 도면이다.
도 4는 본 발명의 일실시예에 있어서, 최적 파라미터 결정 과정의 예를 도시한 도면이다.
도 5는 본 발명의 일실시예에 따른 HPO의 내부 구성의 예를 도시한 블록도이다.
도 6은 본 발명의 일실시예에 따른 HPO의 최적 파라미터 결정 방법의 예를 도시한 흐름도이다.
도 7은 본 발명의 일실시예에 따른 타겟 디바이스의 내부 구성의 예를 도시한 블록도이다.
도 8은 본 발명의 일실시예에 따른 타겟 디바이스의 최적 파라미터 결정 방법의 예를 도시한 흐름도이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
2 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention.
3 is a diagram showing an example of a lightweight system according to an embodiment of the present invention.
4 is a diagram illustrating an example of an optimal parameter determination process according to an embodiment of the present invention.
5 is a block diagram illustrating an example of an internal configuration of a HPO according to an embodiment of the present invention.
6 is a flowchart illustrating an example of a method for determining an optimal parameter of HPO according to an embodiment of the present invention.
7 is a block diagram illustrating an example of an internal configuration of a target device according to an embodiment of the present invention.
8 is a flowchart illustrating an example of a method for determining optimal parameters of a target device according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, an embodiment will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 최적 파라미터 결정 시스템은 적어도 하나의 컴퓨터 장치에 의해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 최적 파라미터 결정 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 최적 파라미터 결정 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.An optimum parameter determination system according to embodiments of the present invention may be implemented by at least one computer device. At this time, a computer program according to an embodiment of the present invention may be installed and driven in the computer device, and the computer device may perform the optimal parameter determination method according to the embodiments of the present invention under the control of the driven computer program. there is. The above-described computer program may be combined with a computer device and stored in a computer readable recording medium to execute the optimal parameter determination method on a computer.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다. 또한, 도 1의 네트워크 환경은 본 실시예들에 적용 가능한 환경들 중 하나의 예를 설명하는 것일 뿐, 본 실시예들에 적용 가능한 환경이 도 1의 네트워크 환경으로 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 shows an example including a plurality of
복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기(110)는 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 컴퓨터 장치들 중 하나를 의미할 수 있다.The plurality of
통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and short-distance wireless communication between devices as well as a communication method utilizing a communication network (eg, a mobile communication network, a wired Internet, a wireless Internet, and a broadcasting network) that the
서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 서비스(일례로, 인스턴트 메시징 서비스, 소셜 네트워크 서비스, 결제 서비스, 가상 거래소 서비스, 리스크 모니터링 서비스, 게임 서비스, 그룹 통화 서비스(또는 음성 컨퍼런스 서비스), 메시징 서비스, 메일 서비스, 지도 서비스, 번역 서비스, 금융 서비스, 검색 서비스, 컨텐츠 제공 서비스 등)를 제공하는 시스템일 수 있다.Each of the
도 2는 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 앞서 설명한 복수의 전자 기기들(110, 120, 130, 140) 각각이나 서버들(150, 160) 각각은 도 2를 통해 도시된 컴퓨터 장치(200)에 의해 구현될 수 있다.2 is a block diagram illustrating an example of a computer device according to one embodiment of the present invention. Each of the plurality of
이러한 컴퓨터 장치(200)는 도 2에 도시된 바와 같이, 메모리(210), 프로세서(220), 통신 인터페이스(230) 그리고 입출력 인터페이스(240)를 포함할 수 있다. 메모리(210)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(210)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(200)에 포함될 수도 있다. 또한, 메모리(210)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(210)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(210)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(230)를 통해 메모리(210)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(170)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(200)의 메모리(210)에 로딩될 수 있다.As shown in FIG. 2 , the
프로세서(220)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(210) 또는 통신 인터페이스(230)에 의해 프로세서(220)로 제공될 수 있다. 예를 들어 프로세서(220)는 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The
통신 인터페이스(230)는 네트워크(170)를 통해 컴퓨터 장치(200)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)가 메모리(210)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(230)의 제어에 따라 네트워크(170)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(170)를 거쳐 컴퓨터 장치(200)의 통신 인터페이스(230)를 통해 컴퓨터 장치(200)로 수신될 수 있다. 통신 인터페이스(230)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(220)나 메모리(210)로 전달될 수 있고, 파일 등은 컴퓨터 장치(200)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The
입출력 인터페이스(240)는 입출력 장치(250)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(240)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(250) 중 적어도 하나는 컴퓨터 장치(200)와 하나의 장치로 구성될 수도 있다. 예를 들어, 스마트폰과 같이 터치스크린, 마이크, 스피커 등이 컴퓨터 장치(200)에 포함된 형태로 구현될 수 있다. The input/
또한, 다른 실시예들에서 컴퓨터 장치(200)는 도 2의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(200)는 상술한 입출력 장치(250) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments,
도 3은 본 발명의 일실시예에 따른 경량화 시스템의 예를 도시한 도면이다. 본 실시예에 따른 경량화 시스템(300)은 하이퍼파라미터 최적화부(310)(이하, HPO(Hyperparameter Optimization)), 타겟 디바이스 풀(Target Device Pool, 320), 압축 메서드 풀(Compression Method Pool, 330) 및 압축 파이프라인(Compression pipeline, 340)을 포함할 수 있다. 최적 파라미터 결정 시스템은 이러한 경량화 시스템(300)에 포함되는 형태로 구현될 수 있으며, 적어도 HPO(310) 및 타겟 디바이스(350)를 포함할 수 있다. 최적 파라미터 결정 방법에 대해서는 이후 더욱 자세히 설명한다.3 is a diagram showing an example of a lightweight system according to an embodiment of the present invention. The lightweight system 300 according to this embodiment includes a hyperparameter optimizer 310 (hereinafter referred to as Hyperparameter Optimization (HPO)), a target device pool (320), a compression method pool (330), and A
경량화 기법은 파라미터에 따라 의존도가 크기 때문에, 다수의 경량화 기법을 이용하는 경우, 각 경량화 기법의 파라미터가 어떻게 세팅되어 있느냐에 따라 크게 성능이 좌우될 수 있다. 이러한 문제를 해결하기 위해, 경량화 시스템(300)은 HPO(310) 및 타겟 디바이스 풀(320)을 포함할 수 있다.Since lightweighting techniques are highly dependent on parameters, when a plurality of lightweighting techniques are used, performance may be greatly influenced by how the parameters of each lightweighting technique are set. To solve this problem, the lightweight system 300 may include the
HPO(310)는 주어진 하이퍼파리미터 탐색 공간(Hyperparameter search space)에서 최적의 하이퍼파리미터를 찾는 알고리즘일 수 있으며, 실질적으로는 경량화 시스템(300)을 구현하는 컴퓨터 장치(200)의 프로세서(220)가 컴퓨터 프로그램의 제어에 따라 동작하는 기능의 기능적 표현일 수 있다. 예를 들어, HPO(310)는 가능한 파라미터 조합 중 파라미터 조합 1, 파라미터 조합 2, ??, 파라미터 조합 N에 대해서 각각 학습을 진행한 뒤, 성능이 낮은 파라미터 조합을 일부 폐기하고, 상위 성능이 좋은 파라미터 조합을 토대로 새로운 파라미터 조합을 탐색할 수 있다. 하이퍼파라미터의 예시로는 배치 사이즈(Batch size), 학습률(Learning Rate), 모멘텀(Momentum) 등이 있다. 하이퍼파라미터의 범주를 레이어의 수, 뉴런(neuron)의 수, 레이어의 타입으로 설정하는 경우, HPO(310)는 NAS(Neural Architecture Search)를 포함할 수 있다.The
본 실시예에 따른 HPO(310)는 색다른 탐색 공간(search space)으로 탐색을 처리할 수 있다. 다수의 경량화 기법들의 파라미터들이 탐색 공간(search space)이 될 수 있다. 예를 들어 가지치기 비율(pruning ratio), 양자화 임계값(quantization threshold), 지식 증류 (Knowledge Distillation)에서의 온도(Temperature in KD) 등이 HPO(310)의 탐색 공간이 될 수 있다. 이러한 HPO(310)는 일례로, 하이퍼밴드(Hyperband), 베이지안 최적화(Bayesian Optimization)와 같은 알고리즘을 활용할 수 있다.The
한편, 타겟 디바이스 풀(320)과 압축 메서드 풀(330)은 일례로, 데이터베이스의 형태로 구현될 수 있다. 타겟 디바이스 풀(320)은 다양한 디바이스들에 대한 정보를 포함할 수 있으며, 압축 메서드 풀(330)은 다양한 압축 메서드들 각각을 위한 코드를 포함할 수 있다. HPO(310)는 압축 메서드 풀(330)에서 압축 메서드를 선택할 수 있으며, 선택된 압축 메서드를 이용하여 추론모델을 경량화할 수 있다. 타겟 디바이스 풀(320)에 포함되는 디바이스들과 압축 메서드 풀(330)에 포함되는 압축 메서드들은 이미 잘 알려진 디바이스들 및 압축 메서드들이 활용될 수 있다. Meanwhile, the
이때, HPO(310)는 추론모델을 경량화함에 있어서, 압축 메서드 풀(330)에서 둘 이상의 압축 메서드들을 선택할 수 있으며, 선택된 둘 이상의 압축 메서드들을 압축 파이프라인(340)에 순차적으로 배치할 수 있다. 이후, HPO(310)는 추론모델을 압축 파이프라인(340)에 입력하여 추론모델이 둘 이상의 압축 메서드들에 의해 순차적으로 압축되도록 추론모델에 대한 경량화를 처리할 수 있다. 실시예에 따라 압축 파이프라인(340)은 HPO(310)에 포함되는 형태로 구현될 수 있다.At this time, in lightening the inference model, the
또한, HPO(310)는 압축 메서드들의 다양한 조합마다 경량화 모델을 생성할 수도 있다. 실시예에 따라, HPO(310)는 다수의 압축 파이프라인들을 운용함으로써, 하나의 추론모델에 서로 다른 조합의 압축 메서드들을 적용하여 다수의 경량화 모델들을 병렬적으로 생성할 수도 있다. 일례로, 다수의 타겟 디바이스들이 존재하는 경우, HPO(310)는 다수의 압축 파이프라인들을 운용하여 다수의 타겟 디바이스들을 위한 다수의 경량화 모델들을 동시에 생성할 수 있다.Also, the
또한, HPO(310)는 타겟 디바이스 풀(320)을 통해 선택된 타겟 디바이스(350)로 경량화된 추론모델을 전달할 수 있다. 타겟 디바이스(350)는 경량화된 추론모델의 코드를 실행하여 지연시간, 정확성 등의 성능을 측정한 뒤, 측정된 성능을 HPO(310)로 반환할 수 있다. HPO(310)는 반환된 성능에 기반하여 파라미터 조합들간의 우열을 가릴 수 있게 되며, 이러한 우열에 따라 타겟 디바이스(350)에 최적화된 파라미터 조합을 찾을 수 있다.In addition, the
이러한 과정을 위해, HPO(310)는 일례로, 경량화를 위한 추론모델과 데이터셋(데이터 및 라벨을 포함함) 그리고 제약(constraint)을 입력받을 수 있다. 여기서, 제약은 디바이스, 정확도(accuracy), 모델 크기, 지연 시간(latency), 압축 시간 및 에너지 소모량 중 적어도 하나의 항목에 대한 값을 포함할 수 있다.For this process, the
디바이스의 제약은 타겟 디바이스(350)의 선정을 위한 정보를 포함할 수 있다. 경량화 시스템(300)은 디바이스의 제약에 따라 타겟 디바이스 풀(320)에서 타겟 디바이스(350)를 선택할 수 있다.Device constraints may include information for selecting the
또한, 정확도의 제약은 경량화된 추론모델이 가져야 할 정확도의 최소 임계값일 수 있다. 다시 말해, HPO(310)는 경량화된 추론모델이 적어도 정확도의 제약에 따른 최소 임계값 이상의 정확도를 갖도록 추론모델을 경량화할 수 있다. 예를 들어, HPO(310)는 타겟 디바이스(350)가 반환하는 성능으로서의 정확도가 정확도의 제약에 따른 최소 임계값 이상인 파라미터 조합을 선택할 수 있다.Also, the restriction of accuracy may be a minimum threshold value of accuracy that a lightweight inference model should have. In other words, the
모델 크기의 제약은 경량화된 모델의 크기에 대한 제약일 수 있다. 모델 크기의 제약이 설정된 경우, HPO(310)는 경량화 추론모델들 중 모델 크기의 제약 이하(또는 미만)의 크기를 갖는 경량화 추론모델들을 사용하여 성능 테스트를 진행할 수 있다.The restriction on the size of the model may be a restriction on the size of the lightweight model. When a model size restriction is set, the
지연 시간의 제약은 경량화된 추론모델이 입력값에 대한 출력값을 생성하는데 걸리는 시간에 대한 제약일 수 있다. 경량화된 추론모델에 대한 지연 시간은 타겟 디바이스가 PHO(310)로 반환하는 성능에 포함될 수 있다. PHO(310)는 반환된 성능에 포함된 지연 시간에 기반하여 지연 시간의 제약을 만족하는 경량화된 추론모델을 선택함으로써, 파라미터 조합을 선택할 수 있다.The delay time restriction may be a restriction on the time required for the lightweight inference model to generate an output value for an input value. The delay time for the lightweight inference model may be included in performance returned to the
압축 시간의 제약은 경량화된 추론모델을 생성하는데 걸리는 시간의 제약일 수 있다. 일례로, 원하는 입력조건을 만족하는 추론모델을 생성하는 시간은 추론모델을 압축하는 시스템의 성능 및 리소스에 의존적이며, 하나의 추론모델을 압축하는데 몇 일이 걸릴 수도 있다. 하지만, 사용자가 압축 시간의 제약을 설정하는 경우, HPO(310)는 설정된 압축 시간의 제약에 맞게 최대 학습 횟수(에폭(epoch))를 지정하거나 순차적으로 적용될 압축 메서드들의 수를 줄여 경량화된 추론모델의 생성 시간이 사용자가 설정한 지연 시간의 제약을 넘지 않도록 조절할 수 있다.The limitation of compression time may be a limitation of time required to generate a lightweight inference model. For example, the time to generate an inference model that satisfies a desired input condition depends on the performance and resources of a system for compressing an inference model, and it may take several days to compress one inference model. However, when the user sets compression time constraints, the
에너지 소모량의 제약은 타겟 디바이스에서 경량화된 추론모델의 성능을 측정함에 있어서, 타겟 디바이스에서의 에너지 소모량에 대한 제약을 포함할 수 있다. 다시 말해, HPO(310)는 타겟 디바이스에서의 에너지 소모량이 사용자에 의해 설정된 에너지 소모량의 제약을 넘지 않는 파라미터 조합을 선택할 수 있다. 이를 위해, 타겟 디바이스에는 에너지 소모 측정 모듈이 포함될 수 있으며, 타겟 디바이스에서 측정되는 에너지 소모량이 경량화된 추론모델에 대한 성능의 일부로서 HPO(310)로 전달될 수 있다.The restriction on energy consumption may include a restriction on energy consumption in the target device when measuring performance of a lightweight inference model in the target device. In other words, the
한편, 모든 제약을 만족하는 결과물(경량화 추론모델)이 생성될 수도 있지만, 그렇지 않을 수도 있다. 예를 들어, 경량화 추론모델의 성능에 있어서, 더 낮은 지연 시간을 위해 정확도를 낮춰야 할 수도 있다. 다른 예로, 더 낮은 에너지 소모량을 위해 정확도를 낮춰야 할 수도 있다. 따라서, 제약에는 우선순위가 지정될 수 있으며, HPO(310)는 지정된 우선순위에 따라 우선순위가 높은 제약을 먼저 만족하고 하위 제약들을 만족하는 모델 최적화를 진행할 수 있다.Meanwhile, a result (lightweight inference model) that satisfies all constraints may be generated, but may not be. For example, in the performance of lightweight inference models, accuracy may need to be lowered for lower latency. As another example, accuracy may need to be reduced for lower energy consumption. Accordingly, priorities may be assigned to the constraints, and the
도 4는 본 발명의 일실시예에 있어서, 최적 파라미터 결정 과정의 예를 도시한 도면이다. 도 4는 HPO(310) 및 타겟 디바이스(350)를 나타내고 있다. 도 4의 실시예는 HPO(310)가 최적 파라미터를 결정하는 과정의 예를 설명한다.4 is a diagram illustrating an example of an optimal parameter determination process according to an embodiment of the present invention. 4 shows
파라미터 선택 과정(431)에서 HPO(310)는 입력되는 추론모델(410)을 위한 파라미터를 선택할 수 있다. 이미 설명한 바와 같이 추론모델(410)은 사전 학습된 모델일 수 있으며, 파라미터는 다수의 압축 메서드들의 조합을 위한 파라미터들의 조합일 수 있다.In the
모델 압축 과정(432)에서 HPO(310)는 선택된 파라미터를 이용하여 추론모델(410)을 압축할 수 있다. 압축된 추론모델은 타겟 디바이스(350)로 전달될 수 있다. 이때, 압축된 추론모델과 함께, 추론모델(410)에 대해 입력된 데이터셋(데이터 및 라벨 포함)이 타겟 디바이스(350)로 함께 전달될 수 있다.In the
모델 수신 과정(433)에서 타겟 디바이스(350)는 HPO(310)에서 전달되는 압축된 추론모델을 수신할 수 있다. 이미 설명한 바와 같이 타겟 디바이스(350)는 압축된 추론모델과 함께 데이터셋을 수신할 수 있다.In the
모델 테스트 과정(434)에서 타겟 디바이스(350)는 압축된 추론모델을 테스트할 수 있다. 일례로, 타겟 디바이스(350)는 데이터셋의 데이터와 정답인 라벨을 이용하여 압축된 추론모델을 테스트하여 압축된 추론모델의 성능(일례로, 지연 시간, 정확도 등)을 측정할 수 있으며, 측정된 성능을 HPO(310)로 전달할 수 있다.In the
반복 과정(435)에서 HPO(310)는 타겟 디바이스(350)로부터 전달된 성능에 따라 파라미터 선택 과정(431) 내지 모델 테스트 과정(434)을 반복할 것인지 여부를 결정할 수 있다. 일례로, HPO(310)는 전달된 성능에 기반하여 압축된 추론모델이 제약을 모두 만족하거나 또는 우선순위에 기반한 제약을 일정 기준 이상 만족하는지 여부를 판단할 수 있다. 만족하는 경우, HPO(310)는 파라미터 선택 과정(431) 내지 모델 테스트 과정(434)의 반복 없이 압축된 추론모델을 최종 경량화 추론모델(420)로서 제공할 수 있다. 반면, 만족하지 않는 경우 HPO(310)는 파라미터 선택 과정(431) 내지 모델 테스트 과정(434)을 반복하여 새로운 파라미터에 따라 압축된 추론모델을 다시 테스트할 수 있다.In the
실시예에 따라 반복 과정(435)은 단순히 서로 다른 파라미터를 통해 압축된 기설정된 수의 압축된 추론모델들을 테스트하기 위한 과정일 수 있다. 이 경우, HPO(310)는 제약의 기준에서 가장 성능이 좋은 압축된 추론모델을 최종 경량화 추론모델(420)로서 제공할 수 있다.Depending on the embodiment, the
또 다른 실시예에서 반복 과정(435)은 하나의 압축된 추론모델을 서로 다른 기설정된 수의 타겟 디바이스들에게 테스트하기 위한 과정일 수도 있다.In another embodiment, the
도 5는 본 발명의 일실시예에 따른 HPO의 내부 구성의 예를 도시한 블록도이고, 도 6은 본 발명의 일실시예에 따른 HPO의 최적 파라미터 결정 방법의 예를 도시한 흐름도이다. 앞서 설명한 HPO(310)는 컴퓨터 장치(200)에 의해 구현될 수 있다. 도 5의 HPO(310)는 파라미터 선택부(510), 모델 경량화부(520), 모델 송신부(530), 결과 수신부(540), 반복 결정부(550) 및 최적 파라미터 결정부(560)를 포함할 수 있다. 이때, 파라미터 선택부(510), 모델 경량화부(520), 모델 송신부(530), 결과 수신부(540), 반복 결정부(550) 및 최적 파라미터 결정부(560)는 HPO(310)를 구현하는 컴퓨터 장치(200)의 프로세서(220)가 컴퓨터 프로그램의 제어에 따라 동작하는 기능의 기능적 표현일 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 6의 방법이 포함하는 단계들(610 내지 650)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다. 이때, 각 단계들(610 내지 650)의 수행을 위한 프로세서(220)의 기능적 표현으로서 파라미터 선택부(510), 모델 경량화부(520), 모델 송신부(530), 결과 수신부(540), 반복 결정부(550) 및 최적 파라미터 결정부(560)가 사용될 수 있다.5 is a block diagram illustrating an example of an internal configuration of a HPO according to an embodiment of the present invention, and FIG. 6 is a flowchart illustrating an example of a method for determining optimal parameters of an HPO according to an embodiment of the present invention. The
단계(610)에서 파라미터 선택부(510)는 추론모델을 위한 파라미터 조합을 선택할 수 있다. 일례로, 파라미터 선택부(510)는 도 3을 통해 설명한 압축 메서드 풀(330)에서 압축 메서드들의 조합으로서 적어도 하나의 압축 메서드를 선택할 수 있다. 이때, 압축 메서드 풀(320)은, 가지치기(Pruning), 양자화(Quantization), 지식 증류(Knowledge Distillation), 모델 탐색(Neural Architecture Search), 필터 디컴포지션(Filter decomposition) 및 필터 분해(Filter Decomposition) 중 적어도 하나에 기반한 둘 이상의 압축 메서드를 포함할 수 있다. In
이 경우, 파라미터 선택부(510)는 일정한 규칙에 따라 압축 메서드들을 선택할 수도 있다. 예를 들어, 파라미터 선택부(510)는 압축 메서드의 조합 내에서 양자화(Quantization)에 기반한 압축 메서드가 조합의 마지막에 위치해야 하는 제1 규칙 및 활성화 변환(Activation Change)에 기반한 압축 메서드가 양자화에 기반한 압축 메서드 이전에 포함되어야 하는 제2 규칙 중 적어도 하나의 규칙에 따라 압축 메서드의 조합을 선택할 수 있다. 예를 들어, 양자화의 경우에는 컴파일러(Compiler)와 결합되어 구현되어 있는 경우가 많기 때문에, 소프트웨어 레벨에서 압축에 양자화를 이용하는 경우, 양자화가 압축 파이프라인의 가장 마지막에 배치될 수 있다. 또한, 활성화 변환은 양자화의 성능을 높이기 위한 목적으로 사용될 수 있기 때문에, 활성화 변환에 기반한 압축 메서드는 양자화에 기반한 압축 메서드보다 조합 내에 먼저 포함될 수 있다.In this case, the
이후, 파라미터 선택부(510)는 선택된 적어도 하나의 압축 메서드의 파라미터들 중 적어도 일부의 파라미터의 값의 조합을 상기 파라미터 조합으로서 선택할 수 있다. 즉, 파라미터 조합은 선택된 압축 메서드들에 따른 파라미터들 중 적어도 일부에 대해 선택된 값들로 구성될 수 있다. 일례로, 가지치기에 기반한 압축 메서드는 파라미터로서 가지치기 비율(Pruning Ratio, PR)을 포함할 수 있다. 이 경우, 파라미터 선택부(520)는 파라미터 PR의 값을 미리 준비된 값들의 집합에서 선택(일례로, 파라미터 PR의 값의 집합 {0.3, 0.4, 0.5} 중에서 하나를 선택)할 수 있다. 또한, 필터 디컴포지션에 기반한 압축 메서드에서는 랭크(Rank)의 수를 미리 준비된 값들의 집합에서 선택(일례로, 파라미터 필터 랭크(Filter Rank, FR)의 값의 집합 {2, 3, 4} 중에서 하나를 선택)할 수 있다. 다시 말해, 선택된 압축 메서드들이 가지치기에 기반한 제1 압축 메서드와 필터 디컴포지션에 기반한 제2 압축 메서드라면, 파라미터 선택부(520)는 선택된 압축 메서드들에 대해 파라미터들의 값들로서 [PR 0.4, FR 2]나 [PR 0.3, FR 4]를 선택할 수 있다.Thereafter, the
또한, 파라미터들의 값들의 조합을 선택하기 위해, 하이퍼밴드(hyperband) 또는 베이지안 최적화(Bayesian Optimization)와 같은 기법들이 활용될 수도 있다. 이러한 기법들은 추후 다수의 성능들에 따라 최적의 파라미터 조합을 선택하기 위해 활용될 수도 있다.Also, techniques such as hyperband or Bayesian optimization may be utilized to select a combination of values of the parameters. These techniques may later be utilized to select an optimal parameter combination according to multiple capabilities.
또한, 이미 설명한 바와 같이 하나의 추론모델에 서로 다른 조합의 압축 메서드들을 병렬적으로 적용하여 다수의 압축된 추론모델들을 병렬적으로 생성할 수도 있다. 일례로, HPO(310)가 다수의 압축 파이프라인들을 운용하여 다수의 경량화 모델들을 동시에 생성할 수 있음을 설명한 바 있다. 이때, 하나의 압축 파이프라인을 통해 압축된 추론모델에 대해 얻어진 성능치가 다른 압축 파이프라인을 위한 파라미터 조합을 선택하는데 활용될 수 있다. 일례로, HPO(310)가 압축 파이프라인 A에서 압축 메서드들의 조합 a와 파라미터들의 값들의 조합 b를 이용하여 제1 압축된 추론모델을 생성한 후, 성능치 1을 얻었다고 가정한다. 또한, HPO(310)가 병렬적으로 운영되는 압축 파이프라인 B에서 압축 메서드들의 조합 c와 파라미터 조합 d를 이용하여 제2 압축된 추론모델을 생성한 후, 성능치 2를 얻었다고 가정한다. 이때, HPO(310)는 압축 파이프라인 B에서 압축 메서드들의 조합 a에 대한 파라미터들의 값들의 조합을 선택할 때, 파라미터들의 값들의 조합 b와 성능치 1을 고려하여 압축 메서드들의 조합 a를 위한 새로운 파라미터들의 값들의 조합 e를 선택할 수 있다. 보다 구체적인 예로, HPO(310)는 성능치 1이 상대적으로 높은 경우(일례로, 성능치 2나 다른 압축 메서드들의 조합에 대한 성능치보다 성능치 1이 더 높은 경우)에는 파라미터들의 값들의 조합 b에서 일부만을 변경하여 새로운 파라미터들의 값들의 조합 e를 선택할 수 있다. 반면, HPO(310)는 성능치 1이 상대적으로 낮은 경우(일례로, 성능치 2나 다른 압축 메서드들의 조합에 대한 성능치보다 성능치 1이 더 낮은 경우)에는 파라미터들의 값들의 조합 b에서 전체를 변경하여 새로운 파라미터들의 값들의 조합 e를 선택할 수 있다.In addition, as already described, multiple compressed inference models may be generated in parallel by applying different combinations of compression methods to one inference model in parallel. As an example, it has been described that the
단계(620)에서 모델 경량화부(520)는 선택된 파라미터 조합을 이용하여 입력된 추론모델을 압축할 수 있다. 일례로, 모델 경량화부(520)는 단계(610)에서 선택된 복수의 압축 메서드들을 순차적으로 적용하여 입력된 추론모델을 압축할 수 있다. 이때, 모델 경량화부(520)는 적용되는 압축 메서드에 대해 선택된 파라미터의 값을 이용하여 추론모델을 압축할 수 있다. 다시 말해, 모델 경량화부(520)는 선택된 파라미터의 값들이 적용된 압축 메서드들을 추론모델에 순차적으로 적용하여 압축된 추론모델을 생성할 수 있다.In
단계(630)에서 모델 송신부(530)는 압축된 추론모델을 타겟 디바이스로 전송할 수 있다. 여기서, 타겟 디바이스는 타겟 디바이스 풀(320)에서 선택된 타겟 디바이스(350)에 대응될 수 있다. 타겟 디바이스는 이후 도 7 및 도 8을 통해 설명하는 바와 같이 압축된 추론모델의 성능을 측정하여 HPO(310)로 전달할 수 있다.In
단계(640)에서 결과 수신부(540)는 타겟 디바이스로부터 압축된 추론모델의 성능을 수신할 수 있다. 일례로, 수신되는 성능은 타겟 디바이스가 압축된 추론모델에 데이터를 입력하여 측정되는 지연 시간 및 정확도를 포함할 수 있다.In
단계(650)에서 반복 결정부(550)는 수신된 성능에 기반하여 단계(610) 내지 단계(640)를 반복 수행할 것인지 여부를 결정할 수 있다. 이때, 반복 결정부(550)는 수신된 성능이 해당 추론모델에 대해 입력(또는 설정)된 제약을 만족하는지 여부에 따라 반복 여부를 결정할 수 있다. 예를 들어, 반복 결정부(550)는 수신된 성능이 입력(또는 설정)된 제약을 만족하는 경우, 단계(610) 내지 단계(640)를 반복할 필요 없이 추론모델의 압축을 위해 사용된 파라미터 조합을 타겟 디바이스에 최적화된 파라미터 조합으로서 제공할 수 있다. 또한, 압축된 추론모델을 타겟 디바이스를 위한 최종 경량화 추론모델로서 제공할 수 있다. 역으로, 반복 결정부(550)는 수신된 성능이 입력(또는 설정)된 제약을 만족하지 않는 경우, 단계(610) 내지 단계(640)를 반복 수행하여 최적의 파라미터 조합을 다시 탐색할 수 있다. 이때, 단계(610)에서는 압축 메서드들의 동일한 조합이 선택되거나 또는 압축 메서드들의 다른 조합이 선택될 수 있다. 만약, 단계(610)에서 압축 메서드들의 동일한 조합이 선택되는 경우, 단계(620)에서는 해당 조합의 압축 메서드들에 대응하는 파라미터들의 다른 값들이 선택될 수 있다. 역으로, 단계(610)에서 압축 메서드들의 다른 조합이 선택되는 경우, 단계(620)에서는 다른 조합의 압축 메서드들에 대응하는 다른 파라미터들의 값들이 선택될 수 있다. 다시 말해, 압축 메서드들의 조합이 변경되면, 파라미터들의 조합도 변경될 수 있으며, 따라서 변경된 파라미터들의 값들이 선택될 수 있다. 만약, 압축 메서드들의 조합이 유지되면, 파라미터들의 조합도 유지될 수 있으며, 이 경우에는 동일한 파라미터들에 대해 값들만이 변경되어 선택될 수 있다.In
한편, 실시예에 따라, 반복 결정부(550)는 기설정된 횟수만큼 단계(610) 내지 단계(640)가 반복 수행되도록 할 수도 있다. 이를 위해, 반복 결정부(550)는 반복 횟수와 기설정된 횟수를 비교하여 반복 횟수가 기설정된 횟수를 초과할 때까지 단계(610) 내지 단계(640)가 반복 수행되도록 할 수도 있다. 이 경우, 매 반복 수행마다 압축 메서드들의 조합 및/또는 파라미터들의 값의 조합이 변경될 수 있어, 다양한 압축 메서드들의 조합 및/또는 파라미터들의 값의 조합별로 경량화된 추론모델의 성능 측정이 가능해진다.Meanwhile, according to embodiments, the
단계(660)에서 최적 파라미터 결정부(560)는 수신된 성능에 따라 최적 파라미터 조합을 결정할 수 있다. 일례로, 단계(610) 내지 단계(640)를 반복 수행함에 따라 타겟 디바이스로부터 복수의 성능들이 수신된 경우, 가장 좋은 성능을 이끌어낸 파라미터 조합을 타겟 디바이스를 위한 최적 파라미터 조합으로 결정할 수 있다. 이미 설명한 바와 같이, 파라미터 조합은 압축 메서드들의 조합에 따른 파라미터들의 값의 조합을 의미할 수 있다.In
도 7은 본 발명의 일실시예에 따른 타겟 디바이스의 내부 구성의 예를 도시한 블록도이고, 도 8은 본 발명의 일실시예에 따른 타겟 디바이스의 최적 파라미터 결정 방법의 예를 도시한 흐름도이다. 앞서 설명한 타겟 디바이스(350) 역시 컴퓨터 장치(200)에 의해 구현될 수 있다. 본 실시예에 따른 타겟 디바이스(350)는 모델 수신부(710), 모델 테스트부(720) 및 결과 송신부(730)를 포함할 수 있다. 이때, 모델 수신부(710), 모델 테스트부(720) 및 결과 송신부(730)는 타겟 디바이스(350)를 구현하는 컴퓨터 장치(200)의 프로세서(220)가 컴퓨터 프로그램의 제어에 따라 동작하는 기능의 기능적 표현일 수 있다. 일례로, 컴퓨터 장치(200)의 프로세서(220)는 메모리(210)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(220)는 컴퓨터 장치(200)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(200)가 도 8의 방법이 포함하는 단계들(810 내지 830)을 수행하도록 컴퓨터 장치(200)를 제어할 수 있다. 이때, 각 단계들(810 내지 830)의 수행을 위한 프로세서(220)의 기능적 표현으로서 모델 수신부(710), 모델 테스트부(720) 및 결과 송신부(730)가 사용될 수 있다.7 is a block diagram illustrating an example of an internal configuration of a target device according to an embodiment of the present invention, and FIG. 8 is a flowchart illustrating an example of a method for determining optimal parameters of a target device according to an embodiment of the present invention. . The
단계(810)에서 모델 수신부(710)는 HPO(310)에 의해 압축된 추론모델을 수신할 수 있다. 이때, 모델 수신부(710)는 HPO(310)로 추론모델과 함께 입력된 데이터셋(데이터, 라벨)을 함께 수신할 수 있다.In
단계(820)에서 모델 테스트부(720)는 압축된 추론모델을 테스트할 수 있다. 이때, 모델 테스트부(720)는 지연 시간 및 정확도 중 적어도 하나를 압축된 추론모델의 테스트 결과로서 생성할 수 있다. 일례로, 모델 테스트부(720)는 압축된 추론모델에 데이터셋의 데이터를 입력할 수 있으며, 데이터가 입력된 시각 및 압축된 추론모델이 입력된 데이터에 대한 결과를 출력하는 시각에 기초하여 지연 시간을 측정할 수 있다. 다른 예로, 모델 테스트부(720)는 출력된 결과와 데이터에 대한 정답인 라벨을 비교하여 압축된 추론모델의 정확성을 측정할 수 있다.In
단계(830)에서 결과 송신부(730)는 테스트 결과를 압축된 추론모델의 성능으로서 HPO(310)로 송신할 수 있다. 이때, HPO(310)의 결과 수신부(540)가 추론모델의 성능을 수신할 수 있으며, HPO(310)는 타겟 디바이스로부터 수신된 성능에 기반하여 최적의 파라미터 조합을 결정할 수 있다.In
이처럼, 본 발명의 실시예들에 따르면, 추론모델을 압축하여 타겟 디바이스로 제공하고, 타겟 디바이스로부터 제공되는 압축된 추론모델의 성능에 기반하여 최적의 파라미터 조합을 결정할 수 있다.As described above, according to embodiments of the present invention, an inference model may be compressed and provided to a target device, and an optimal parameter combination may be determined based on performance of the compressed inference model provided from the target device.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or device described above may be implemented as a hardware component or a combination of hardware components and software components. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , a programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may run an operating system (OS) and one or more software applications running on the operating system. A processing device may also access, store, manipulate, process, and generate data in response to execution of software. For convenience of understanding, there are cases in which one processing device is used, but those skilled in the art will understand that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that it can include. For example, a processing device may include a plurality of processors or a processor and a controller. Other processing configurations are also possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of the foregoing, which configures a processing device to operate as desired or processes independently or collectively. You can command the device. Software and/or data may be any tangible machine, component, physical device, virtual equipment, computer storage medium or device, intended to be interpreted by or provide instructions or data to a processing device. can be embodied in Software may be distributed on networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The medium may continuously store programs executable by a computer or temporarily store them for execution or download. In addition, the medium may be various recording means or storage means in the form of a single or combined hardware, but is not limited to a medium directly connected to a certain computer system, and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROM and DVD, magneto-optical media such as floptical disks, and ROM, RAM, flash memory, etc. configured to store program instructions. In addition, examples of other media include recording media or storage media managed by an app store that distributes applications, a site that supplies or distributes various other software, and a server. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, those skilled in the art can make various modifications and variations from the above description. For example, the described techniques may be performed in an order different from the method described, and/or components of the described system, structure, device, circuit, etc. may be combined or combined in a different form than the method described, or other components may be used. Or even if it is replaced or substituted by equivalents, appropriate results can be achieved.
그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims are within the scope of the following claims.
Claims (18)
추론모델, 데이터셋 및 제약을 입력받는 단계;
상기 제약을 고려하여, 상기 추론모델에 적용될 압축 메서드 조합 및 상기 압축 메서드 조합을 위한 파라미터 조합을 선택하는 단계;
압축 파이프라인을 통해, 상기 선택된 압축 메서드 조합에 포함된 제1 압축 메서드 및 상기 제1 압축 메서드와 관련된 제1 파라미터를 상기 추론모델에 적용하는 단계;
상기 압축 파이프라인을 통해 상기 추론모델로부터 압축된 추론모델이 생성되었는지 판단하는 단계;
상기 압축된 추론모델이 생성되지 않았으면, 상기 압축 파이프라인을 통해, 상기 선택된 파라미터 조합 중 제2 파라미터와 상기 선택된 압축 메서드의 조합에 포함된 제2 압축 메서드를 상기 제1 압축 메서드에 이어 상기 추론모델에 적용하는 단계;
상기 압축된 추론모델이 생성되었다면, 상기 압축된 추론모델을 상기 타겟 디바이스로 전송하는 단계; 및
상기 타겟 디바이스로부터 수신한 상기 압축된 추론모델의 성능에 기반하여, 상기 최적 파라미터 조합을 결정하는 단계를 포함하되,
상기 압축된 추론모델의 성능은, 상기 데이터셋을 이용하여 상기 타겟 디바이스에 의해 측정된, 방법.An optimal parameter determination method performed by a computer device including at least one processor,
Receiving an inference model, data set, and constraints;
selecting a compression method combination to be applied to the inference model and a parameter combination for the compression method combination in consideration of the constraint;
applying a first compression method included in the selected compression method combination and a first parameter related to the first compression method to the inference model through a compression pipeline;
determining whether a compressed inference model is generated from the inference model through the compression pipeline;
If the compressed inference model is not generated, a second compression method included in a combination of a second parameter among the selected parameter combinations and the selected compression method is followed by the first compression method through the compression pipeline, followed by the inference. applying to the model;
If the compressed inference model is generated, transmitting the compressed inference model to the target device; and
Determining the optimal parameter combination based on the performance of the compressed inference model received from the target device,
The performance of the compressed inference model is measured by the target device using the dataset.
상기 압축 메서드 조합 및 상기 파라미터 조합을 선택하는 단계는,
상기 제1 압축 메서드 및 상기 제1 압축 메서드를 위한 상기 제1 파라미터를 선택하는 단계;
상기 제약 및 상기 제1 압축 메서드에 기초하여 압축 메서드 및 파라미터를 더 선택할 것인지 여부를 결정하는 단계; 및
압축 메서드 및 파라미터를 더 선택하는 것으로 결정된 경우, 상기 제1 압축 메서드를 고려하여 상기 제2 압축 메서드 및 상기 제2 압축 메서드를 위한 상기 제2 파라미터를 선택하는 단계
를 포함하는, 방법.According to claim 1,
Selecting the compression method combination and the parameter combination comprises:
selecting the first compression method and the first parameter for the first compression method;
determining whether to further select a compression method and parameters based on the constraint and the first compression method; and
if it is determined to further select a compression method and parameters, selecting the second compression method and the second parameter for the second compression method in consideration of the first compression method;
Including, method.
상기 압축된 추론 모델의 성능이 상기 제약을 만족하는 경우, 상기 선택된 파라미터 조합이 상기 최적 파라미터 조합으로 결정되고,
상기 압축된 추론 모델의 성능이 상기 제약을 만족하지 않는 경우, 상기 압축 메서드 조합 및 상기 파라미터 조합을 선택하는 단계, 상기 제1 압축 메서드 및 상기 제1 파라미터를 상기 추론모델에 적용하는 단계, 상기 압축된 추론모델이 생성되었는지 판단하는 단계, 상기 제2 압축 메서드 및 상기 제2 파라미터를 상기 추론모델에 적용하는 단계, 상기 압축된 추론모델을 상기 타겟 디바이스로 전송하는 단계, 및 상기 최적 파라미터 조합을 결정하는 단계가 반복 수행되는 것을 특징으로 하는, 방법.According to claim 1,
When performance of the condensed inference model satisfies the constraint, the selected parameter combination is determined as the optimal parameter combination;
When performance of the compressed inference model does not satisfy the constraint, selecting the compression method combination and the parameter combination, applying the first compression method and the first parameter to the inference model, and the compression method. Determining whether the generated inference model is generated, applying the second compression method and the second parameter to the inference model, transmitting the compressed inference model to the target device, and determining the optimal parameter combination. Characterized in that the step of doing is repeatedly performed, the method.
상기 제약은,
디바이스, 정확도(accuracy), 모델 크기, 지연 시간(latency), 압축 시간 또는 에너지 소모량 중 적어도 하나의 항목에 대한 값을 포함하는, 방법.According to claim 1,
The constraints are
A method comprising a value for at least one of device, accuracy, model size, latency, compression time, or energy consumption.
상기 제약에는 우선순위가 지정되어 있고,
상기 최적 파라미터 조합을 결정하는 단계는,
상기 압축된 추론모델의 성능에 기반하여 상기 압축된 추론모델이 상기 우선순위에 기반한 상기 제약을 일정 기준 이상 만족하는 지 여부를 판단하는 단계
를 포함하는, 방법.According to claim 1,
Priorities are assigned to the constraints,
Determining the optimal parameter combination,
Determining whether or not the compressed inference model satisfies the constraint based on the priority based on the performance of the compressed inference model or more than a predetermined criterion
Including, method.
상기 압축 메서드 조합은,
가지치기(Pruning), 필터 분해(Filter Decomposition), 양자화(Quantization) 및 지식 증류(Knowledge Distillation)를 포함하는 압축 메서드 풀에서 선택되는, 방법.According to claim 1,
The compression method combination,
A method, selected from a pool of compression methods including Pruning, Filter Decomposition, Quantization, and Knowledge Distillation.
상기 타겟 디바이스는 상기 압축된 추론모델의 성능을 측정하도록 구현되며,
상기 압축된 추론모델의 성능은 지연 시간 또는 정확도 중 적어도 하나를 포함하는, 방법.According to claim 1,
The target device is implemented to measure the performance of the compressed inference model,
Wherein the performance of the condensed inference model includes at least one of latency or accuracy.
상기 타겟 디바이스는 상기 제약에 기초하여 타겟 디바이스 풀에서 선택되는, 방법.According to claim 1,
The method of claim 1 , wherein the target device is selected from a target device pool based on the constraint.
적어도 하나의 인스트럭션을 저장하는 메모리; 및
상기 메모리에 작동적으로 연결된 프로세서;를 포함하고,
상기 프로세서는, 상기 적어도 하나의 인스트럭션을 실행함으로써,
추론모델, 데이터셋 및 제약을 입력받고,
상기 제약을 고려하여, 상기 추론모델에 적용될 압축 메서드 조합 및 상기 압축 메서드 조합을 위한 파라미터 조합을 선택하고,
압축 파이프라인을 통해, 상기 선택된 압축 메서드 조합에 포함된 제1 압축 메서드 및 상기 제1 압축 메서드와 관련된 제1 파라미터를 상기 추론모델에 적용하고,
상기 압축 파이프라인을 통해 상기 추론모델로부터 압축된 추론모델이 생성되었는지 판단하고,
상기 압축된 추론모델이 생성되지 않았으면, 상기 압축 파이프라인을 통해, 상기 선택된 파라미터 조합 중 제2 파라미터와 상기 선택된 압축 메서드의 조합에 포함된 제2 압축 메서드를 상기 제1 압축 메서드에 이어 상기 추론모델에 적용하고,
상기 압축된 추론모델이 생성되었다면, 상기 압축된 추론모델을 상기 타겟 디바이스로 전송하고,
상기 타겟 디바이스로부터 수신한 상기 압축된 추론모델의 성능에 기반하여, 상기 최적 파라미터 조합을 결정하되,
상기 압축된 추론모델의 성능은, 상기 데이터셋을 이용하여 상기 타겟 디바이스에 의해 측정된, 컴퓨터 장치.In a computer device,
a memory storing at least one instruction; and
a processor operatively coupled to the memory;
The processor, by executing the at least one instruction,
Inference model, dataset and constraints are input,
Considering the constraints, selecting a compression method combination to be applied to the inference model and a parameter combination for the compression method combination;
Applying a first compression method included in the selected compression method combination and a first parameter related to the first compression method to the inference model through a compression pipeline;
Determining whether a compressed inference model has been generated from the inference model through the compression pipeline;
If the compressed inference model is not generated, a second compression method included in a combination of a second parameter among the selected parameter combinations and the selected compression method is followed by the first compression method through the compression pipeline, followed by the inference. applied to the model,
If the compressed inference model is generated, transmit the compressed inference model to the target device;
Based on the performance of the compressed inference model received from the target device, determining the optimal parameter combination;
Performance of the compressed inference model is measured by the target device using the dataset.
상기 프로세서는,
상기 제1 압축 메서드 및 상기 제1 압축 메서드를 위한 상기 제1 파라미터를 선택하고,
상기 제약 및 상기 제1 압축 메서드에 기초하여 압축 메서드 및 파라미터를 더 선택할 것인지 여부를 결정하고,
압축 메서드 및 파라미터를 더 선택하는 것으로 결정된 경우, 상기 제1 압축 메서드를 고려하여 상기 제2 압축 메서드 및 상기 제2 압축 메서드를 위한 상기 제2 파라미터를 선택하는, 컴퓨터 장치.According to claim 11,
the processor,
select the first compression method and the first parameter for the first compression method;
determine whether to further select a compression method and parameters based on the constraint and the first compression method;
and selecting the second compression method and the second parameter for the second compression method in view of the first compression method if it is determined to further select a compression method and parameters.
상기 프로세서는,
상기 압축된 추론 모델의 성능이 상기 제약을 만족하는 경우, 상기 선택된 파라미터 조합을 상기 최적 파라미터 조합으로 결정하고,
상기 압축된 추론 모델의 성능이 상기 제약을 만족하지 않는 경우, 상기 압축 메서드 조합 및 상기 파라미터 조합을 선택하는 동작, 상기 제1 압축 메서드 및 상기 제1 파라미터를 상기 추론모델에 적용하는 동작, 상기 압축된 추론모델이 생성되었는지 판단하는 동작, 상기 제2 압축 메서드 및 상기 제2 파라미터를 상기 추론모델에 적용하는 동작, 상기 압축된 추론모델을 상기 타겟 디바이스로 전송하는 동작, 및 상기 최적 파라미터 조합을 결정하는 동작을 반복 수행하는 것을 특징으로 하는, 컴퓨터 장치.According to claim 11,
the processor,
When performance of the condensed inference model satisfies the constraint, determining the selected parameter combination as the optimal parameter combination;
When the performance of the compressed inference model does not satisfy the constraint, selecting the compression method combination and the parameter combination, applying the first compression method and the first parameter to the inference model, and performing the compression An operation of determining whether the generated inference model is generated, an operation of applying the second compression method and the second parameter to the inference model, an operation of transmitting the compressed inference model to the target device, and an operation of determining the optimal parameter combination. A computer device, characterized in that repeatedly performing the operation.
상기 제약은,
디바이스, 정확도(accuracy), 모델 크기, 지연 시간(latency), 압축 시간 또는 에너지 소모량 중 적어도 하나의 항목에 대한 값을 포함하는, 컴퓨터 장치.According to claim 11,
The constraints are
A computer device including a value for at least one item of a device, accuracy, model size, latency, compression time, or energy consumption.
상기 제약에는 우선순위가 지정되어 있고,
상기 프로세서는,
상기 압축된 추론모델의 성능에 기반하여 상기 압축된 추론모델이 상기 우선순위에 기반한 상기 제약을 일정 기준 이상 만족하는 지 여부를 판단하는, 컴퓨터 장치.According to claim 11,
Priorities are assigned to the constraints,
the processor,
Based on the performance of the compressed inference model, it is determined whether the compressed inference model satisfies the constraint based on the priority at least a predetermined criterion.
상기 압축 메서드 조합은,
가지치기(Pruning), 필터 분해(Filter Decomposition), 양자화(Quantization) 및 지식 증류(Knowledge Distillation)를 포함하는 압축 메서드 풀에서 선택되는, 컴퓨터 장치.According to claim 11,
The compression method combination,
A computational device, selected from a pool of compression methods including Pruning, Filter Decomposition, Quantization, and Knowledge Distillation.
상기 타겟 디바이스는 상기 압축된 추론모델의 성능을 측정하도록 구현되며,
상기 압축된 추론모델의 성능은 지연 시간 또는 정확도 중 적어도 하나를 포함하는, 컴퓨터 장치.According to claim 11,
The target device is implemented to measure the performance of the compressed inference model,
Wherein the performance of the condensed inference model includes at least one of latency or accuracy.
상기 타겟 디바이스는 상기 제약에 기초하여 타겟 디바이스 풀에서 선택되는, 컴퓨터 장치.
According to claim 11,
wherein the target device is selected from a target device pool based on the constraint.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20200161046 | 2020-11-26 | ||
KR1020200161046 | 2020-11-26 | ||
KR1020210013289A KR102499517B1 (en) | 2020-11-26 | 2021-01-29 | Method and system for determining optimal parameter |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210013289A Division KR102499517B1 (en) | 2020-11-26 | 2021-01-29 | Method and system for determining optimal parameter |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20230024950A true KR20230024950A (en) | 2023-02-21 |
KR102580428B1 KR102580428B1 (en) | 2023-09-20 |
Family
ID=81983742
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210013289A KR102499517B1 (en) | 2020-11-26 | 2021-01-29 | Method and system for determining optimal parameter |
KR1020230017102A KR102580428B1 (en) | 2020-11-26 | 2023-02-09 | Method and system for determining optimal parameter |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210013289A KR102499517B1 (en) | 2020-11-26 | 2021-01-29 | Method and system for determining optimal parameter |
Country Status (1)
Country | Link |
---|---|
KR (2) | KR102499517B1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102556334B1 (en) * | 2023-02-27 | 2023-07-17 | 주식회사 노타 | Device and method for providing benchmark result of artificial intelligence based model |
KR102587263B1 (en) | 2023-02-27 | 2023-10-12 | 주식회사 노타 | Device and method for providing benchmark result of artificial intelligence based model |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20180084289A (en) * | 2017-01-16 | 2018-07-25 | 한국전자통신연구원 | Compressed neural network system using sparse parameter and design method thereof |
KR20190041791A (en) * | 2017-10-13 | 2019-04-23 | 한국전자통신연구원 | Apparatus for embedded software development of multi target and method for the same |
KR102037279B1 (en) * | 2019-02-11 | 2019-11-15 | 주식회사 딥노이드 | Deep learning system and method for determining optimum learning model |
US20190370658A1 (en) * | 2018-05-31 | 2019-12-05 | Kneron (Taiwan) Co., Ltd. | Self-Tuning Incremental Model Compression Solution in Deep Neural Network with Guaranteed Accuracy Performance |
KR20200052182A (en) * | 2018-11-06 | 2020-05-14 | 한국전자통신연구원 | Method and apparatus for compressing/decompressing deep learning model |
KR20200094056A (en) * | 2019-01-29 | 2020-08-06 | 주식회사 디퍼아이 | Convolution neural network parameter optimization method, neural network computing method and apparatus |
US20200257960A1 (en) * | 2019-02-12 | 2020-08-13 | XNOR.ai, Inc. | Compressed convolutional neural network models |
KR20200104201A (en) * | 2019-02-25 | 2020-09-03 | 주식회사 딥엑스 | Method and system for bit quantization of artificial neural network |
JP2020144482A (en) * | 2019-03-04 | 2020-09-10 | 株式会社東芝 | Machine learning model compression system, machine learning model compression method and program |
KR20200132627A (en) * | 2019-05-16 | 2020-11-25 | 삼성전자주식회사 | Neural network model apparatus and compressing method of neural network model |
-
2021
- 2021-01-29 KR KR1020210013289A patent/KR102499517B1/en active IP Right Grant
-
2023
- 2023-02-09 KR KR1020230017102A patent/KR102580428B1/en active IP Right Grant
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20180084289A (en) * | 2017-01-16 | 2018-07-25 | 한국전자통신연구원 | Compressed neural network system using sparse parameter and design method thereof |
KR20190041791A (en) * | 2017-10-13 | 2019-04-23 | 한국전자통신연구원 | Apparatus for embedded software development of multi target and method for the same |
US20190370658A1 (en) * | 2018-05-31 | 2019-12-05 | Kneron (Taiwan) Co., Ltd. | Self-Tuning Incremental Model Compression Solution in Deep Neural Network with Guaranteed Accuracy Performance |
KR20200052182A (en) * | 2018-11-06 | 2020-05-14 | 한국전자통신연구원 | Method and apparatus for compressing/decompressing deep learning model |
KR20200094056A (en) * | 2019-01-29 | 2020-08-06 | 주식회사 디퍼아이 | Convolution neural network parameter optimization method, neural network computing method and apparatus |
KR102037279B1 (en) * | 2019-02-11 | 2019-11-15 | 주식회사 딥노이드 | Deep learning system and method for determining optimum learning model |
US20200257960A1 (en) * | 2019-02-12 | 2020-08-13 | XNOR.ai, Inc. | Compressed convolutional neural network models |
KR20200104201A (en) * | 2019-02-25 | 2020-09-03 | 주식회사 딥엑스 | Method and system for bit quantization of artificial neural network |
JP2020144482A (en) * | 2019-03-04 | 2020-09-10 | 株式会社東芝 | Machine learning model compression system, machine learning model compression method and program |
KR20200132627A (en) * | 2019-05-16 | 2020-11-25 | 삼성전자주식회사 | Neural network model apparatus and compressing method of neural network model |
Also Published As
Publication number | Publication date |
---|---|
KR20220073600A (en) | 2022-06-03 |
KR102580428B1 (en) | 2023-09-20 |
KR102499517B1 (en) | 2023-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111406267B (en) | Neural architecture search using performance prediction neural networks | |
EP3711000B1 (en) | Regularized neural network architecture search | |
EP3446260B1 (en) | Memory-efficient backpropagation through time | |
WO2018044633A1 (en) | End-to-end learning of dialogue agents for information access | |
CN110366734B (en) | Optimizing neural network architecture | |
US11449744B2 (en) | End-to-end memory networks for contextual language understanding | |
US10268679B2 (en) | Joint language understanding and dialogue management using binary classification based on forward and backward recurrent neural network | |
KR102191444B1 (en) | Training of neural networks using prioritized experiential memory | |
KR102580428B1 (en) | Method and system for determining optimal parameter | |
KR20190086134A (en) | Method and apparatus for selecting optiaml training model from various tarining models included in neural network | |
KR20190089980A (en) | Attention-Based Sequence Conversion Neural Networks | |
WO2021254114A1 (en) | Method and apparatus for constructing multitask learning model, electronic device and storage medium | |
US20240127058A1 (en) | Training neural networks using priority queues | |
CN115066694A (en) | Computation graph optimization | |
US20230145452A1 (en) | Method and apparatus for training a model | |
US20220058477A1 (en) | Hyperparameter Transfer Via the Theory of Infinite-Width Neural Networks | |
CN112823362A (en) | Hyper-parameter adjustment method, device, and program | |
US20220114479A1 (en) | Systems and methods for automatic mixed-precision quantization search | |
KR20220009682A (en) | Method and system for distributed machine learning | |
CN111368973A (en) | Method and apparatus for training a hyper-network | |
CN111353601A (en) | Method and apparatus for predicting delay of model structure | |
CN115841366A (en) | Article recommendation model training method and device, electronic equipment and storage medium | |
CN111667069A (en) | Pre-training model compression method and device and electronic equipment | |
CN116684330A (en) | Traffic prediction method, device, equipment and storage medium based on artificial intelligence | |
KR102511225B1 (en) | Method and system for lighting artificial intelligence model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A107 | Divisional application of patent | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |