KR102477243B1 - Machine learning training method based on parametric synchronization model and training system thereof - Google Patents

Machine learning training method based on parametric synchronization model and training system thereof Download PDF

Info

Publication number
KR102477243B1
KR102477243B1 KR1020200084221A KR20200084221A KR102477243B1 KR 102477243 B1 KR102477243 B1 KR 102477243B1 KR 1020200084221 A KR1020200084221 A KR 1020200084221A KR 20200084221 A KR20200084221 A KR 20200084221A KR 102477243 B1 KR102477243 B1 KR 102477243B1
Authority
KR
South Korea
Prior art keywords
mini
processing units
neural network
virtual
batches
Prior art date
Application number
KR1020200084221A
Other languages
Korean (ko)
Other versions
KR20220006360A (en
Inventor
최영리
박재형
윤경찬
이창민
이승민
응우엔 타잉 응우엔
Original Assignee
울산과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 울산과학기술원 filed Critical 울산과학기술원
Priority to KR1020200084221A priority Critical patent/KR102477243B1/en
Publication of KR20220006360A publication Critical patent/KR20220006360A/en
Application granted granted Critical
Publication of KR102477243B1 publication Critical patent/KR102477243B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0454

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

일 실시예에 따른 클러스터 시스템은 클러스터 시스템은 프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 자원 할당자, 신경망 모델을 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할하는 모델 분할자, 및 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 파라미터 서버를 포함한다. The cluster system according to an embodiment includes a resource allocator for allocating processing units to each of virtual workers corresponding to a neural network model to be trained, and a number of processing units corresponding to processing units allocated to each of the virtual workers. and a parameter server that maintains global model parameters to support parallel processing of data between virtual workers.

Description

파라미터 동기화 모델에 기반한 기계 학습 트레이닝 방법 및 그 트레이닝 시스템{MACHINE LEARNING TRAINING METHOD BASED ON PARAMETRIC SYNCHRONIZATION MODEL AND TRAINING SYSTEM THEREOF}Machine learning training method and training system based on parameter synchronization model

실시예들은 파이프라인 기반 모델 병렬화 및 데이터 병렬화 통합을 위한 파라미터 동기화 모델에 기반한 기계 학습 트레이닝 방법 및 그 트레이닝 시스템에 관한 것이다.Embodiments relate to a machine learning training method and a training system thereof based on a parameter synchronization model for integrating pipeline-based model parallelism and data parallelism.

인공 지능(Artificial Intelligence; AI)의 응용 범위가 넓고 다양해짐에 따라 응용들의 성능을 높이기 위해 다양한 방식으로 딥러닝 모델이 진화하고 있으며, 이러한 발전 추세에 따라 딥러닝 모델의 규모 또한 커지고 있다. 딥러닝 모델의 규모가 커진다는 것은 모델을 구성하는 뉴런들이 많아지고 뉴런들을 연결하는 은닉 계층들(Hidden layers)의 깊이가 깊어짐을 의미한다. 이에 따라, 딥러닝의 추론(inference)이나 트레이닝 과정에서 계산량이 많아지고 메모리 요구량이 커져서 하나의 컴퓨터 또는 하나의 계산 디바이스의 한계를 넘는 상황이 종종 발생할 수 있어 적절한 대응이 요구된다. As the application range of artificial intelligence (AI) becomes wider and more diverse, deep learning models are evolving in various ways to improve the performance of applications, and the size of deep learning models is also increasing in accordance with this development trend. An increase in the size of a deep learning model means that the number of neurons constituting the model increases and the depth of hidden layers connecting the neurons increases. Accordingly, in the process of inference or training of deep learning, the amount of calculation and the amount of memory demand increase, which may sometimes exceed the limits of one computer or one computing device, and appropriate countermeasures are required.

전술한 배경기술은 발명자가 본원의 개시 내용을 도출하는 과정에서 보유하거나 습득한 것으로서, 반드시 본 출원 전에 일반 공중에 공개된 공지기술이라고 할 수는 없다.The above background art is possessed or acquired by the inventor in the process of deriving the disclosure of the present application, and cannot necessarily be said to be known art disclosed to the general public prior to the present application.

일 실시예에 따르면, 파이프라인 모델 병렬화(Pipeline Model Parallelism; PMP)와 데이터 병렬화(Data Parallelism DP)를 함께 이용하여 거대 심층 신경망 모델을 트레이닝 함으로써 클러스터의 동일 기종 GPU 자원 및/또는 이기종 GPU 자원의 활용도뿐만 아니라 성능 또한 향상시킬 수 있다. According to an embodiment, by training a large deep neural network model using both Pipeline Model Parallelism (PMP) and Data Parallelism DP, utilization of the same type of GPU resources and/or heterogeneous GPU resources of the cluster can be improved. In addition, performance can also be improved.

일 실시예에 따르면, 여러 개의 GPU들에 의해 하나의 가상 작업자를 구성하고, 신경망 모델을 분할(partition)하여 각 GPU에 할당된 하나의 미니 배치를 실행하도록 함으로써 가상 작업자들이 하나의 단일 GPU 메모리에 올라가지 않는 거대 심층 신경망 모델을 트레이닝하도록 할 수 있다. According to an embodiment, one virtual worker is configured by multiple GPUs, and a neural network model is partitioned to execute one mini-batch assigned to each GPU, so that the virtual workers are stored in a single GPU memory. You can train a huge deep neural network model that doesn't climb.

일 실시예에 따르면, 파이프라인 모델 병렬화의 다수의 가상 작업자들이 데이터 병렬화를 통해 병렬화를 극대화함으로써 거대 심층 신경망 모델의 트레이닝 속도를 높일 수 있다.According to an embodiment, multiple virtual workers of the pipeline model parallelization maximize parallelism through data parallelization, thereby increasing the training speed of the massive deep neural network model.

일 실시예에 따르면, 파라미터를 동기화하기 위해 가상 작업자들 각각이 모델 파라미터의 갱신치를 계산하여 파라미터 서버로 푸시하고, 가상 작업자들 각각이 파라미터 서버로부터 필요한 모델 파라미터의 갱신치를 동기식 또는 비동기식으로 가져옴으로써 데이터 병렬 처리를 가능하게 할 수 있다. According to an embodiment, in order to synchronize the parameters, each of the virtual workers calculates updated values of the model parameters and pushes them to the parameter server, and each of the virtual workers synchronously or asynchronously retrieves the necessary updated values of the model parameters from the parameter server, thereby data data Parallel processing is possible.

일 실시예에 따르면, 미니 배치들을 파이프라인 모델 병렬화 및 데이터 병렬화를 통합한 파라미터 동기화 모델에 기반하여 처리함으로써 가상 작업자의 GPU 활용도를 향상시킬 수 있다. According to an embodiment, GPU utilization of virtual workers may be improved by processing mini-batches based on a parameter synchronization model integrating pipeline model parallelism and data parallelism.

일 실시예에 따르면, 이기종 GPU 클러스터에서 성능이 다른 여러 GPU들을 모아 유사한 성능을 가진 가상 작업자들을 구성함으로써 가상 작업자들 간의 데이터 병렬화 시에 발생하는 가장 느린 작업자가 전체 성능을 결정하게 되는 스트래글러(Straggler) 문제를 해결할 수 있다. According to an embodiment, a straggler in which a plurality of GPUs having different performance are gathered in a heterogeneous GPU cluster to configure virtual workers having similar performance, so that the slowest worker that occurs during data parallelization between virtual workers determines the overall performance ( Straggler) problem can be solved.

일 실시예에 따르면, 하나의 가상 작업자 내에서 발생하는 모델 파라미터를 관리하기 위한 로컬 스테일니스(local staleness)와 다수의 가상 작업자들 간에 발생하는 모델 파라미터를 관리하기 위해 글로벌 스테일니스(global staleness)를 정의함으로써 심층 신경망의 트레이닝 성능을 향상시킬 수 있다.According to an embodiment, local staleness for managing model parameters occurring within one virtual worker and global staleness for managing model parameters occurring among a plurality of virtual workers By defining it, the training performance of deep neural networks can be improved.

일 실시예에 따르면, 클러스터 시스템은 프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 자원 할당자(Resource Allocator); 상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할하는 모델 분할자(model petitioner); 및 상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 파라미터 서버(Parameter server)를 포함한다. According to one embodiment, the cluster system includes a resource allocator for allocating processing units to virtual workers corresponding to a neural network model to be trained; a model petitioner dividing the neural network model into a number of partitions corresponding to processing units assigned to each of the virtual workers; and a parameter server that maintains global model parameters to support parallel processing of data between the virtual workers.

상기 자원 할당자는 상기 가상 작업자들에 대한 자원 할당 정책에 기초하여 상기 프로세싱 유닛들을 상기 신경망 모델에 대응하는 상기 가상 작업자들 각각에게 할당할 수 있다. The resource allocator may allocate the processing units to each of the virtual workers corresponding to the neural network model based on a resource allocation policy for the virtual workers.

상기 자원 할당 정책은 상기 가상 작업자들의 활성화(activation) 값과 그래디언트(gradient)의 전송 및 상기 가상 작업자들과 상기 파라미터 서버 간의 모델 파라미터의 동기화 시에 발생하는 통신 오버 헤드 및 상기 프로세싱 유닛들 각각의 성능 중 적어도 하나에 기초하여 결정될 수 있다. The resource allocation policy determines the transmission of activation values and gradients of the virtual workers and synchronization of model parameters between the virtual workers and the parameter server and communication overhead and performance of each of the processing units. It may be determined based on at least one of

상기 자원 할당자는 이기종 또는 동일 기종의 상기 프로세싱 유닛들을 상기 가상 작업자들 각각에게 동일 개수로 균등하게 할당하거나, 상기 이기종 또는 동일 기종의 프로세싱 유닛들을 상기 가상 작업자들 각각에게 상이한 개수로 할당할 수 있다. The resource allocator may equally allocate the same number of processing units of the same or heterogeneous type to each of the virtual workers, or may allocate different numbers of the processing units of the heterogeneous or the same type to each of the virtual workers.

상기 자원 할당자가 상기 프로세싱 유닛들을 상기 가상 작업자들 각각에게 동일 개수로 균등하게 할당하고, 상기 가상 작업자들에 대한 데이터 병렬화가 수행되는 경우, 상기 파라미터 서버는 상기 클러스터 시스템의 어느 한 노드에서 실행되는 파티션에 해당하는 레이어를 상기 프로세싱 유닛들에게 분산하여 배치할 수 있다. When the resource allocator equally allocates the same number of processing units to each of the virtual workers, and data parallelization is performed for the virtual workers, the parameter server is a partition running on any one node of the cluster system. A layer corresponding to may be disposed in a distributed manner among the processing units.

상기 모델 분할자는 상기 프로세싱 유닛들이 사용되는 파이프라인의 처리 과정에서 변화되는 메모리 요구 사항 및 상기 파티션들의 실행 시간 중 적어도 하나를 고려하여 상기 신경망 모델을 상기 가상 작업자들에 대응하는 개수의 파티션들로 분할할 수 있다. The model divider divides the neural network model into the number of partitions corresponding to the virtual workers in consideration of at least one of memory requirements and execution times of the partitions, which are changed during processing of pipelines in which the processing units are used. can do.

상기 가상 작업자들 각각은 상기 가상 작업자들 각각에서 이전의 미니 배치로부터 계산된 모델 파라미터에 대한 갱신없이 동시에 처리되는 미니 배치들을 포함하는 웨이브(Wave)를 기초로, 상기 웨이브에 포함된 미니 배치들에서 집계된 상기 모델 파라미터에 대한 갱신치를 한번에 상기 파라미터 서버로 푸시할 수 있다. Each of the virtual workers is based on a wave including mini-batches that are simultaneously processed without updating model parameters calculated from previous mini-batches in each of the virtual workers, in mini-batches included in the wave. The updated values for the aggregated model parameters may be pushed to the parameter server at once.

상기 가상 작업자들 각각은 데이터 병렬화를 위해 파이프라인을 구성하는 상기 가상 작업자들 각각에서 동시에 실행되는 미니 배치들을 포함하는 하나의 웨이브의 종료 시점에, 해당 웨이브에 포함된 미니 배치들에서 집계된 갱신치를 상기 파라미터 서버로 푸시(Push)하고, 상기 파라미터 서버에 저장된 갱신치를 풀(Pull) 함으로써 상기 모델 파라미터를 동기화할 수 있다.At the end of one wave including mini-batches simultaneously executed in each of the virtual workers constituting the pipeline for data parallelism, each of the virtual workers returns an aggregated update from mini-batches included in the wave. The model parameters may be synchronized by pushing to the parameter server and pulling updated values stored in the parameter server.

상기 글로벌 모델 파라미터는 상기 가상 작업자들 각각에서 동시에 실행되는 미니 배치들을 포함하는 하나의 웨이브의 종료 시점에 대응하는 로컬 클럭(clock) 단위로 정기적으로 갱신된 값에 의해 동기화될 수 있다. The global model parameter may be synchronized by a value regularly updated in units of a local clock corresponding to an end point of one wave including mini-batches simultaneously executed in each of the virtual workers.

상기 가상 작업자들 각각은 모든 웨이브들에 대한 갱신치를 상기 파라미터 서버로 푸시함으로써 상기 글로벌 모델 파라미터들을 갱신할 수 있다. Each of the virtual workers may update the global model parameters by pushing updates for all waves to the parameter server.

상기 가상 작업자들 각각은 상기 미니 배치들 중 제1 미니 배치를 처리함으로써 산출된 상기 제1 미니 배치에 대응하는 갱신치에 의해 로컬 모델 파라미터를 갱신하고, 상기 제1 미니 배치에 연속하는 제2 미니 배치의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 상기 로컬 모델 파라미터의 가장 최근 값을 사용하여 상기 신경망 모델의 트레이닝을 수행할 수 있다. Each of the virtual workers updates a local model parameter with an update value corresponding to the first mini-batch calculated by processing a first mini-batch among the mini-batches, and second mini-batch successive to the first mini-batch. During batch processing, the neural network model may be trained using the most recent values of the local model parameters without waiting for local model parameters to be updated by other mini-batches.

상기 가상 작업자들 각각에서 동시에 실행되는 최대 미니 배치들의 개수는 상기 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 기초하여 결정될 수 있다. The maximum number of mini-batches concurrently executed in each of the virtual workers may be determined based on memory requirements for training of the neural network model.

상기 가상 작업자들 각각에서 실행되는 최대 미니 배치들의 개수는 상기 가상 작업자들 각각에 할당된 프로세싱 유닛들에서 미니 배치의 역방향 패스의 동작을 실행하기 전에 정방향 패스의 동작을 위해 상기 프로세싱 유닛들에서 처리할 수 있는 최대 미니 배치들의 개수에 의해 결정될 수 있다. The maximum number of mini-batches executed on each of the virtual workers is the number of processing units assigned to each of the virtual workers to be processed by the processing units for the forward pass operation before executing the reverse pass operation of a mini-batch in the processing units assigned to each of the virtual workers. It can be determined by the maximum number of possible mini-batches.

상기 최대 미니 배치들의 개수는 상기 정방향 패스의 동작과 상기 역방향 패스의 동작 간의 실행 비율, 및 파이프라인 방식에 의한 상기 미니 배치들의 처리 시에 사용되는 상기 프로세싱 유닛들의 개수에 기초하여 결정될 수 있다. The maximum number of mini-batches may be determined based on an execution ratio between the forward pass operation and the reverse pass operation, and the number of processing units used when processing the mini-batches by a pipeline method.

일 실시예에 따르면, 클러스터 시스템의 동작 방법은 프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계; 상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계; 상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및 상기 가상 작업자들에 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계를 포함한다. According to one embodiment, a method of operating a cluster system includes allocating processing units to virtual workers corresponding to a neural network model to be trained; Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of the plurality of layers; scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to the virtual workers.

상기 분할하는 단계는 상기 미니 배치들의 처리에 따른 상기 프로세싱 유닛들의 메모리 요구 사항 및 상기 파티션들의 실행 시간 중 적어도 하나에 기초하여 상기 신경망 모델을 상기 파티션들로 분할하는 단계를 포함할 수 있다. The dividing may include dividing the neural network model into the partitions based on at least one of a memory requirement of the processing units according to processing of the mini-batches and an execution time of the partitions.

상기 가상 작업자들 각각에서 동시에 진행되는 미니 배치들의 개수는 상기 가상 작업자들 각각에서 진행되는 미니 배치에 대한 가장 최신의 미니 배치로부터 누락된 갱신치들의 최대 개수에 해당하는 로컬 스테일니스(local staleness)의 임계값에 기초하여 결정될 수 있다. The number of mini-batches simultaneously running on each of the virtual workers is the local staleness of the maximum number of missing updates from the most recent mini-batch for the mini-batches running on each of the virtual workers. It can be determined based on a threshold value.

상기 가상 작업자들 각각에서의 미니 배치의 처리 여부는 상기 클러스터 시스템 내의 다른 모든 가상 작업자들이 전역적으로 계산한 가장 최신의 미니 배치에서 누락된 갱신치들의 최대 개수에 해당하는 글로벌 스테일니스 경계에 기초하여 결정될 수 있다. Whether to process the mini-batch in each of the virtual workers is based on the global staleness boundary corresponding to the maximum number of missing updates in the most recent mini-batch calculated globally by all other virtual workers in the cluster system. can be determined

상기 스케줄링하는 단계는 상기 미니 배치들에 대한 역방향 패스 작업들에 정방향 패스 작업들보다 높은 우선 순위를 부여하여 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및 상기 미니 배치들에 대한 역방향 패스 작업들과 상기 정방향 패스 작업들을 선입 선출(First In First Out; FIFO) 스케줄링 정책에 따라 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계 중 적어도 하나를 포함할 수 있다.The scheduling may include assigning a higher priority to reverse pass tasks for the mini-batches than forward pass tasks and scheduling each of the processing units allocated to the virtual workers; and scheduling the reverse pass jobs for the mini-batches and the forward pass jobs to each of the processing units assigned to the virtual workers according to a First In First Out (FIFO) scheduling policy. can include

상기 신경망 모델은 상기 신경망 모델의 트레이닝에 필요한 메모리 용량이 상기 프로세싱 유닛들 중 어느 하나의 프로세싱 유닛의 메모리를 초과하는 거대 심층 신경망 모델을 포함할 수 있다. The neural network model may include a large deep neural network model in which a memory capacity required for training the neural network model exceeds a memory of any one of the processing units.

상기 가상 작업자들 각각은 상기 미니 배치들 중 제1 미니 배치를 처리함으로써 산출된 상기 제1 미니 배치에 대응하는 갱신치에 의해 로컬 모델 파라미터를 갱신하고, 상기 제1 미니 배치에 연속하는 제2 미니 배치의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 상기 로컬 모델 파라미터의 가장 최근 값을 사용하여 상기 신경망 모델의 트레이닝을 수행할 수 있다. Each of the virtual workers updates a local model parameter with an update value corresponding to the first mini-batch calculated by processing a first mini-batch among the mini-batches, and second mini-batch successive to the first mini-batch. During batch processing, the neural network model may be trained using the most recent values of the local model parameters without waiting for local model parameters to be updated by other mini-batches.

상기 가상 작업자들 각각에서 동시에 실행되는 최대 미니 배치들의 개수는 상기 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 기초하여 결정될 수 있다. The maximum number of mini-batches concurrently executed in each of the virtual workers may be determined based on memory requirements for training of the neural network model.

상기 프로세싱 유닛들은 이종의 그래픽 프로세싱 유닛들(GPUs)을 포함할 수 있다. The processing units may include heterogeneous graphics processing units (GPUs).

상기 클러스터 시스템의 동작 방법은 상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 단계를 더 포함할 수 있다.The operating method of the cluster system may further include maintaining global model parameters to support data parallel processing among the virtual workers.

일 측에 따르면, 파이프라인 모델 병렬화(Pipeline Model Parallelism; PMP)와 데이터 병렬화(Data Parallelism DP)를 함께 이용하여 거대 심층 신경망 모델을 트레이닝 함으로써 클러스터의 동일 기종 GPU 자원 및/또는 이기종 GPU 자원의 활용도뿐만 아니라 성능 또한 향상시킬 수 있다. According to one side, by training a large deep neural network model using Pipeline Model Parallelism (PMP) and Data Parallelism DP together, the utilization of GPU resources of the same type and / or GPU resources of the cluster It can also improve performance.

일 측에 따르면, 여러 개의 GPU들에 의해 하나의 가상 작업자를 구성하고, 신경망 모델을 분할(partition)하여 각 GPU에 할당된 하나의 미니 배치를 실행하도록 함으로써 가상 작업자들이 하나의 단일 GPU 메모리에 올라가지 않는 거대 심층 신경망 모델을 트레이닝하도록 할 수 있다. According to one side, one virtual worker is configured by multiple GPUs, and the neural network model is partitioned to execute one mini-batch allocated to each GPU, so that the virtual workers are not loaded into a single GPU memory. It can be used to train a large deep neural network model that does not

일 측에 따르면, 파이프라인 모델 병렬화의 다수의 가상 작업자들이 데이터 병렬화를 통해 병렬화를 극대화함으로써 거대 심층 신경망 모델의 트레이닝 속도를 높일 수 있다. According to one side, multiple virtual workers of pipeline model parallelization can speed up the training of large deep neural network models by maximizing parallelism through data parallelization.

일 측에 따르면, 파라미터를 동기화하기 위해 가상 작업자들 각각이 모델 파라미터의 갱신치를 계산하여 파라미터 서버로 푸시하고, 가상 작업자들 각각이 파라미터 서버로부터 필요한 모델 파라미터의 갱신치를 동기식 또는 비동기식으로 가져옴으로써 데이터 병렬 처리를 가능하게 할 수 있다. According to one side, in order to synchronize the parameters, each of the virtual workers calculates updated values of the model parameters and pushes them to the parameter server, and each of the virtual workers synchronously or asynchronously retrieves the necessary updated values of the model parameters from the parameter server, thereby enabling data parallelism. processing can be made possible.

일 측에 따르면, 미니 배치들을 파이프라인 모델 병렬화 및 데이터 병렬화를 통합한 파라미터 동기화 모델에 기반하여 처리함으로써 가상 작업자의 GPU 활용도를 향상 시킬 수 있다. According to one side, GPU utilization of virtual workers can be improved by processing mini-batches based on a parameter synchronization model that integrates pipeline model parallelism and data parallelism.

일 실시예에 따르면, 이기종 GPU 클러스터에서 성능이 다른 여러 GPU들을 모아 유사한 성능을 가진 가상 작업자들을 구성함으로써 가상 작업자들 간의 데이터 병렬화 시에 발생하는 가장 느린 작업자가 전체 성능을 결정하게 되는 스트래글러(Straggler) 문제를 해결할 수 있다.According to an embodiment, a straggler in which a plurality of GPUs having different performance are gathered in a heterogeneous GPU cluster to configure virtual workers having similar performance, so that the slowest worker that occurs during data parallelization between virtual workers determines the overall performance ( Straggler) problem can be solved.

일 측에 따르면, 하나의 가상 작업자 내에서 발생하는 모델 파라미터를 관리하기 위한 로컬 스테일니스(local staleness)와 다수의 가상 작업자들 간에 발생하는 모델 파라미터를 관리하기 위해 글로벌 스테일니스(global staleness)를 정의함으로써 심층 신경망의 트레이닝 성능을 향상시킬 수 있다.According to one side, local staleness for managing model parameters occurring within one virtual worker and global staleness for managing model parameters occurring between multiple virtual workers are defined. This can improve the training performance of deep neural networks.

도 1은 일 실시예에 따른 다수의 작업자들이 있는 데이터 병렬 처리의 기본 형태를 도시한 도면.
도 2는 일 실시예에 따른 모델 병렬 처리의 기본 형태를 도시한 도면.
도 3은 일 실시예에 따른 클러스터 시스템의 구조를 도시한 도면.
도 4는 일 실시예에 따른 미니 배치들이 파이프라인 방식으로 실행되는 과정을 도시한 도면.
도 5는 일 실시예에 따라 파이프 라인 방식으로 실행되는 여러 가상 작업자들이 데이터 병렬화를 실행하는 방법을 설명하기 위한 도면.
도 6은 일 실시예에 따른 클러스터 시스템의 동작 방법을 나타낸 흐름도.
1 illustrates a basic form of data parallel processing with multiple workers according to one embodiment;
2 illustrates a basic form of model parallel processing according to one embodiment;
3 is a diagram showing the structure of a cluster system according to an embodiment;
4 is a diagram illustrating a process in which mini-batches are executed in a pipeline manner according to an embodiment;
5 is a diagram for explaining a method of executing data parallelization by several virtual workers executed in a pipeline manner according to an embodiment;
6 is a flowchart illustrating a method of operating a cluster system according to an exemplary embodiment;

이하에서, 첨부된 도면을 참조하여 실시예들을 상세하게 설명한다. 그러나, 실시예들에는 다양한 변경이 가해질 수 있어서 특허출원의 권리 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 실시예들에 대한 모든 변경, 균등물 내지 대체물이 권리 범위에 포함되는 것으로 이해되어야 한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. However, since various changes can be made to the embodiments, the scope of the patent application is not limited or limited by these embodiments. It should be understood that all changes, equivalents or substitutes to the embodiments are included within the scope of rights.

실시예에서 사용한 용어는 단지 설명을 목적으로 사용된 것으로, 한정하려는 의도로 해석되어서는 안된다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Terms used in the examples are used only for descriptive purposes and should not be construed as limiting. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as "include" or "have" are intended to designate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, but one or more other features It should be understood that the presence or addition of numbers, steps, operations, components, parts, or combinations thereof is not precluded.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the art to which the embodiment belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and unless explicitly defined in the present application, they should not be interpreted in an ideal or excessively formal meaning. don't

또한, 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조부호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 실시예의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.In addition, in the description with reference to the accompanying drawings, the same reference numerals are given to the same components regardless of reference numerals, and overlapping descriptions thereof will be omitted. In describing the embodiment, if it is determined that a detailed description of a related known technology may unnecessarily obscure the gist of the embodiment, the detailed description will be omitted.

또한, 실시 예의 구성 요소를 설명하는 데 있어서, 제1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다. In addition, in describing the components of the embodiment, terms such as first, second, A, B, (a), and (b) may be used. These terms are only used to distinguish the component from other components, and the nature, order, or order of the corresponding component is not limited by the term. When an element is described as being “connected,” “coupled to,” or “connected” to another element, that element may be directly connected or connected to the other element, but there may be another element between the elements. It should be understood that may be "connected", "coupled" or "connected".

어느 하나의 실시 예에 포함된 구성요소와, 공통적인 기능을 포함하는 구성요소는, 다른 실시 예에서 동일한 명칭을 사용하여 설명하기로 한다. 반대되는 기재가 없는 이상, 어느 하나의 실시 예에 기재한 설명은 다른 실시 예에도 적용될 수 있으며, 중복되는 범위에서 구체적인 설명은 생략하기로 한다.Components included in one embodiment and components having common functions will be described using the same names in other embodiments. Unless stated to the contrary, descriptions described in one embodiment may be applied to other embodiments, and detailed descriptions will be omitted to the extent of overlap.

도 1은 일 실시예에 따른 다수의 작업자들에 의해 데이터 병렬 처리가 수행되는 기본 형태를 도시한 도면이다. 1 is a diagram illustrating a basic form in which data parallel processing is performed by a plurality of workers according to an embodiment.

심층 신경망(Deep Neural Network; DNN) 모델은 입력 계층, 은닉 계층들, 및 출력 계층을 포함하는 다수의 계층들로 구성될 수 있다. 심층 신경망 모델에서 노드로 표현되는 뉴런(neuron)은 활성화 함수(activation function)를 의미하며, 입력 데이터가 뉴런을 통해 전달되어 가는 동안 동일한 단계에서 동일한 활성화 함수를 실행하는 뉴런들을 묶어 '계층(layer)'이라 부를 수 있다. 뉴런들을 연결하는 에지(edge)는 입력 계층으로부터 출력 계층으로 나아가는 정방향 패스(forward pass)와 출력 계층으로부터 입력 계층으로 오류가 역전파되는 역방향 패스(backward pass)를 내포하며, 연결된 뉴런들 사이의 모델 파라미터를 포함할 수 있다. A deep neural network (DNN) model can be composed of multiple layers including an input layer, hidden layers, and an output layer. A neuron, represented as a node in a deep neural network model, means an activation function, and while input data is passed through neurons, neurons that execute the same activation function at the same stage are grouped together to form a 'layer'. '. The edge connecting neurons involves a forward pass from the input layer to the output layer and a backward pass in which errors are back-propagated from the output layer to the input layer. Can contain parameters.

심층 신경망 모델의 트레이닝 과정 및 추론 과정에서 에지는 뉴런들 사이의 데이터를 전달할 수 있다. 에지는 이전 뉴런의 계산 결과에 모델 파라미터를 곱하여 예를 들어, 벡터(vector), 매트릭스(matrix), 또는 텐서(tensor) 등의 형태로 다음 뉴런으로 전달할 수 있다. 예를 들어, 입력 계층의 입력값이 벡터값 I인 경우, I에 입력 계층과 첫번째 은닉 계층 H1사이의 모델 파라미터 매트릭스 W를 곱한 결과가 첫번째 은닉 계층 H1에 입력으로 전달될 수 있다. Edges can transfer data between neurons in the training and inference processes of deep neural network models. The edge may multiply a calculation result of a previous neuron by a model parameter and transmit the result to the next neuron in the form of a vector, matrix, or tensor, for example. For example, when an input value of an input layer is a vector value I, a result obtained by multiplying I by a model parameter matrix W between the input layer and the first hidden layer H1 may be passed as an input to the first hidden layer H1.

심층 신경망 모델의 트레이닝 목표는 트레이닝 샘플 및 트레이닝 샘플에 대응하는 레이블(label)로 구성된 트레이닝 데이터 세트의 손실 함수의 합계를 최소화하는 심층 신경망 모델의 모델 파라미터, 다시 말해, 가중치(weight)를 찾는 것이다. 여기서, '모델 파라미터(model parameter)'는 예를 들어, 신경망의 모델 파라미터, 또는 그래디언트(gradient) 등과 같이 심층 신경망의 각 계층들에서 사용되는 값에 해당할 수 있다. A training goal of the deep neural network model is to find model parameters of the deep neural network model, that is, weights, that minimize the sum of loss functions of a training data set composed of training samples and labels corresponding to the training samples. Here, the 'model parameter' may correspond to values used in each layer of the deep neural network, such as, for example, a model parameter of the neural network or a gradient.

예를 들어, 널리 사용되는 트레이닝 방법인 확률적 기울기 강하(stochastic gradient descent; SGD)에서는 모델 파라미터 w의 갱신치를 산출하여 모델 파라미터 w를 갱신할 수 있다. 이때, 모델 파라미터의 갱신치는 예를 들어, 미니 배치(mini-batch)라고 하는 트레이닝 샘플의 하위 집합의 기울기에 해당할 수 있다. For example, in stochastic gradient descent (SGD), which is a widely used training method, the model parameter w may be updated by calculating an updated value of the model parameter w. At this time, the updated value of the model parameter may correspond to, for example, a gradient of a subset of training samples called a mini-batch.

심층 신경망 모델의 트레이닝 과정은 예를 들어, 정방향 패스(forward pass)와 역방향 패스(backward pass)를 오가는 반복 동작들을 통해 수행될 수 있으며, 이러한 반복 동작들에 의해 많은 파라미터들이 생성될 수 있다. 심층 신경망 모델은 정방향 패스(forward pass)에서 미니 배치 처리를 통해 각 샘플의 레이블(label)을 예측할 수 있다. 이때, 심층 신경망 모델의 각 계층은 주어진 입력 데이터와 현재 파라미터를 사용하여 다음 계층의 활성화(activation)를 계산할 수 있다. 심층 신경망 모델의 마지막 계층은 역방향 패스(backward pass)에서의 예측 및 실제 레이블을 기반으로 손실(loss)을 계산할 수 있다. 손실은 모델의 모든 계층들에게 역전파(backpropagate)되며, 각 계층들은 상위 계층에 의해 계산된 그래디언트(gradients)와 정방향 패스(forward pass)에서 이전에 계산된 활성화(activations) 값을 사용하여 그래디언트를 갱신할 수 있다. The training process of the deep neural network model may be performed through, for example, iterative operations of going back and forth between a forward pass and a backward pass, and many parameters may be generated by these iterative operations. The deep neural network model can predict the label of each sample through mini-batch processing in the forward pass. In this case, each layer of the deep neural network model may calculate activation of the next layer using given input data and current parameters. The last layer of the deep neural network model can compute the loss based on the predicted and actual labels in the backward pass. The loss is backpropagated to all layers in the model, each layer using the gradients computed by the upper layer and the activations previously computed in the forward pass to generate the gradient. can be renewed

도 1을 참조하면, 예를 들어, 파라미터 서버(parameter server)(110)와 4 개의 작업자들(Workers; R)(120,130,140,150)이 데이터 병렬 처리(Data Parallelism; DP)를 수행하는 기본 형태가 도시된다.Referring to FIG. 1, for example, a basic form in which a parameter server 110 and four workers (R) 120, 130, 140, and 150 perform data parallelism (DP) is shown. .

데이터 병렬 처리는 트레이닝 데이터를 다수의 컴퓨터들에서 분산 처리하는 기법으로서 일 실시예에서는 다수의 작업자들(120,130,140,150)을 이용하여 심층 신경망 모델의 트레이닝 속도를 높일 수 있다. 일 실시예에서는 트레이닝 데이터 세트를 서브 셋들(sub sets)로 나누고 작업자들(120,130,140,150) 각각에게 서로 다른 서브셋을 할당할 수 있다. 작업자들(120,130,140,150) 각각은 예를 들어, 서로 다른 GPU들(G1, G2, G3, 및 G4) 각각에 대응할 수 있다. 이때, 서로 다른 GPU들은 예를 들어, 이기종의 GPU들일 수 있으며, 반드시 이에 한정되지는 않는다. Data parallel processing is a technique of distributing and processing training data on a plurality of computers, and in one embodiment, it is possible to increase the training speed of a deep neural network model by using a plurality of workers 120 , 130 , 140 , and 150 . In one embodiment, the training data set may be divided into sub sets, and different subsets may be allocated to each of the workers 120 , 130 , 140 , and 150 . Each of the workers 120 , 130 , 140 , and 150 may correspond to different GPUs G 1 , G 2 , G 3 , and G 4 , respectively. In this case, the different GPUs may be, for example, heterogeneous GPUs, but are not necessarily limited thereto.

작업자들(120,130,140,150) 각각은 심층 신경망 모델의 적어도 일부(예를 들어, 서브 셋)를 포함하는 복제본을 포함할 수 있다. 작업자들(120,130,140,150) 각각은 복제본(서브 셋)에 의해 자신에게 할당된 미니 배치를 처리함으로써 파라미터 서버(110)가 여러 작업자들(120,130,140,150) 간에 파라미터를 동기화하는 데 사용되는 (모델 파라미터의) 갱신치를 산출할 수 있다. Each of the workers 120 , 130 , 140 , and 150 may include a replica including at least a portion (eg, a subset) of the deep neural network model. Each of the workers 120, 130, 140, 150 processes a mini-batch assigned to it by the replica (subset) so that the parameter server 110 generates updates (of model parameters) that are used to synchronize the parameters among the workers 120, 130, 140, 150. can be calculated

예를 들어, 심층 신경망 모델이 거대 심층 신경망 모델(Giant Deep Neural Network Model)의 경우, 작업자들(120,130,140,150)과 파라미터 서버(110) 간의 통신 오버 헤드가 클 수 있다. 일 실시예에서는 파라미터를 동기화하기 위해 작업자들(120,130,140,150) 각각이 모델 파라미터의 갱신치(update value)를 계산하여 파라미터 서버(110)로 푸시(push)하고, 작업자들(120,130,140,150) 각각이 파라미터 서버(110)로부터 필요한 모델 파라미터의 갱신치를 동기식 또는 비동기식으로 가져올 수 있다. For example, when the deep neural network model is a giant deep neural network model, communication overhead between the workers 120 , 130 , 140 , and 150 and the parameter server 110 may be large. In one embodiment, in order to synchronize parameters, each of the workers 120, 130, 140, and 150 calculates an update value of the model parameter and pushes it to the parameter server 110, and each of the workers 120, 130, 140, and 150 calculates an update value of the model parameter and pushes it to the parameter server ( 110), the updated values of the model parameters can be obtained synchronously or asynchronously.

데이터 병렬 처리를 위해 다수의 작업자들(120,130,140,150)에서 분산 처리된 모델 파라미터 갱신치들에 의해 파라미터를 동기화하는 데에는 예를 들어, BSP(Bulk Synchronous Parallel) 모델, ASP(Asynchronous Parallel) 모델, 및 SSP(stale synchronous parallel) 모델 등과 같은 다양한 동기화 모델들이 사용될 수 있으며, 반드시 이에 한정되지는 않는다. For data parallel processing, synchronization of parameters by distributedly processed model parameter update values in a plurality of workers 120, 130, 140, 150 includes, for example, a Bulk Synchronous Parallel (BSP) model, an Asynchronous Parallel (ASP) model, and a stale SSP (SSP) model. Various synchronization models such as a synchronous parallel) model may be used, but are not necessarily limited thereto.

BSP 모델은 예를 들어, 장벽(barrier)에 도달하는 작업자가 다른 모든 작업자들이 장벽에 도달할 때까지 기다림으로써 모든 작업자들에서 동기화가 함께 진행되도록 할 수 있다. 다시 말해, BSP 모델의 경우, 각 작업자가 다음 미니 배치 p+1의 처리를 시작하기 전에 다른 모든 작업자들이 현재 미니 배치 p의 처리를 완료할 때까지 기다려야 갱신된 모델 파라미터를 미니 배치 p + 1에 사용할 수 있다.The BSP model allows synchronization to proceed across all workers together, for example, by allowing a worker to reach a barrier to wait until all other workers have reached the barrier. In other words, for the BSP model, each worker must wait until all other workers have finished processing the current mini-batch p before starting processing the next mini-batch p + 1 to transfer the updated model parameters to mini-batch p + 1. can be used

ASP 모델은 모델 파라미터 동기화 시에 작업자가 항상 반복할 때마다 클러스터에 포함된 서버 또는 프로세싱 유닛에서 서로 다른 버전의 모델 파라미터를 수신하지 않도록 할 수 있다. 다시 말해, ASP 모델의 경우, 각 작업자는 다른 작업자들이 미니 배치 p의 처리를 완료할 때까지 기다릴 필요가 없다. 따라서, 각 작업자에 의해 미니 배치 p+1에 사용된 파라미터는 다른 작업자의 미니 배치 p에서 갱신된 모델 파라미터를 반영하지 않을 수 있다. When synchronizing model parameters, the ASP model can ensure that workers do not always receive different versions of model parameters from servers or processing units included in the cluster each time it iterates. In other words, with the ASP model, each worker does not have to wait for other workers to finish processing mini-batch p. Thus, the parameters used for mini-batch p+1 by each operator may not reflect the updated model parameters in the other operator's mini-batch p.

BSP 모델을 사용하면, 특히 다른 GPU를 가진 각 작업자가 서로 다른 트레이닝 성능을 제공하는 이기종 GPU 클러스터에서 시스템의 동기화 오버 헤드가 높아질 수 있다. 반면에 ASP 모델은 수렴을 보장하지 않으며, 동기화 오버 헤드가 없다. Using the BSP model can increase the synchronization overhead of the system, especially in heterogeneous GPU clusters where each worker with a different GPU provides different training performance. On the other hand, the ASP model does not guarantee convergence and has no synchronization overhead.

SSP 모델은 동기화를 수행하지만 BSP 모델의 엄격한 동기화 요구 사항을 완화한 것으로서, ASP 모델과 BSP 모델의 중간 접근 방식을 제공한다. SSP 모델은 원칙적으로, 가장 빠른 작업자와 가장 느린 작업자 간의 반복 횟수의 차이를 모니터링하고, 반복 횟수의 차이가 일정 임계값을 초과하면 두 작업자에 대한 동기화를 시행하여 반복 차이가 임계 값 내에 있도록 제한할 수 있다. The SSP model performs synchronization but relaxes the strict synchronization requirements of the BSP model, providing an intermediate approach between the ASP model and the BSP model. In principle, the SSP model would monitor the difference in iteration counts between the fastest and slowest workers, and if the difference in iteration counts exceeds a certain threshold, it would enforce synchronization of the two workers, limiting the iteration difference to be within the threshold. can

SSP모델을 사용하면 각 작업자는 다른 작업자가 계산한 최신의 갱신치를 반영하지 않고 갱신 이전의 모델 파라미터를 사용하여 미니 배치의 트레이닝을 진행할 수 있다. 따라서, 작업자는 미니 배치 처리가 완료될 때마다 다른 작업자와 동기화 할 필요가 없습니다. 따라서, SSP 모델을 사용하는 경우, 파라미터의 스테일니스가 발생할 수 있다. 여기서, '스테일니스(staleness)'는 예를 들어,다른 작업자(130)가 산출한 모델 파라미터의 갱신치 b에 의해 파라미터 서버(110)에 저장된 파라미터가 갱신이 된 후, 작업자(120)는 갱신치 a를 산출하여 자신이 로컬에 가지고 있는 로컬 파라미터에 적용하고, 파라미터 서버(110)의 최신 갱신치를 반영하지 않은 로컬 파라미터를 이용하여 다음의 미니 배치를 트레이닝하는 상태로 이해될 수 있다. '스테일니스'는 '스테일(stale)'이라고도 불릴 수 있다. 그러나 이러한 스테일니스는 사용자가 정의한 대로 제한(bounded)될 수 있으며, 일 실시예에서는 사용자 정의에 의해 제한되는 반복 횟수의 차이를 '스테일니스 임계값(staleness threshold)'이라고 부를 수 있다. Using the SSP model, each worker can train a mini-batch using the model parameters before the update without reflecting the latest update calculated by other workers. Thus, a worker does not have to synchronize with another worker every time a mini-batch processing is completed. Therefore, when using the SSP model, the staleness of parameters may occur. Here, 'staleness' means, for example, after the parameter stored in the parameter server 110 is updated by the update value b of the model parameter calculated by another operator 130, the operator 120 updates It can be understood as a state in which a value a is calculated and applied to a local parameter it has locally, and the next mini-batch is trained using a local parameter that does not reflect the latest updated value of the parameter server 110. 'Staleness' can also be called 'stale'. However, this staleness may be bounded as defined by the user, and in one embodiment, a difference in the number of repetitions limited by the user definition may be referred to as a 'staleness threshold'.

SSP 모델은 작업자의 성능이 다양할 때 유리하므로 특히 이기종 시스템과 관련하여 사용될 수 있다. SSP 모델에서 작업자들(120,130,140,150) 각각은 주기적으로 모델 파라미터의 갱신치를 파라미터 서버(110)에 푸시할 수 있다. The SSP model is advantageous when the performance of the operators varies, so it can be used especially in the context of heterogeneous systems. In the SSP model, each of the workers 120 , 130 , 140 , and 150 may periodically push updated values of model parameters to the parameter server 110 .

일 실시예에서는 작업자들(120,130,140,150) 각각이 모델 파라미터의 갱신치를 파라미터 서버(110)에 갱신하는 동기화 간격(synchronization interval)을 '클럭(clock)'이라 부를 수 있다. In one embodiment, a synchronization interval at which each of the workers 120 , 130 , 140 , and 150 updates updated values of model parameters to the parameter server 110 may be referred to as a 'clock'.

작업자들(120,130,140,150) 각각은 트레이닝을 반복할 때마다 로컬 클럭(local clock)을 하나씩 증가시킬 수 있으며, 로컬 클럭은 작업자들(120,130,140,150) 각각에서 처리하는 미니 배치의 트레이닝 기간(training period)에 해당할 수 있다. Each of the workers 120, 130, 140, and 150 may increase a local clock by one each time the training is repeated, and the local clock may correspond to a training period of a mini-batch processed by each of the workers 120, 130, 140, and 150. can

예를 들어, 스테일니스 임계값 s(s ≥ 0임)가 주어진 경우, 클럭 c를 가진 작업자들(120,130,140,150) 각각은 갱신되기 전의 모델 파라미터들을 사용할 수 있다. 이때, 갱신되기 전의 모델 파라미터들은 예를 들어, 반복 0에서 c-(s-l)까지의 모든 갱신된 모델 파라미터들을 포함할 수 있으며, 반복 c-(s-l) 이후의 최신의 갱신된 모델 파라미터가 포함될 수도 있다. 즉, 작업자는 파라미터들을 사용하여 다음 미니 매치에 대한 트레이닝을 계속할 수 있으며, 이러한 파라미터들의 갱신에서 최신의 미니 배치들 s이 누락될 수도 있다. For example, when the staleness threshold value s (s ≥ 0) is given, each of the workers 120, 130, 140, and 150 having a clock c may use the model parameters before being updated. At this time, the model parameters before updating may include, for example, all updated model parameters from iteration 0 to c-(s-l), and the latest updated model parameters after iteration c-(s-l) may be included. have. That is, the operator can continue training for the next mini-match using the parameters, and the latest mini-batches s may be missing in the update of these parameters.

도 2는 일 실시예에 따른 모델 병렬 처리의 기본 형태를 도시한 도면이다. 도 2를 참조하면, 일 실시예에 따라 4개의 GPU들에서 모델 병렬 처리가 실행되는 과정이 도시된다. 2 is a diagram illustrating a basic form of model parallel processing according to an embodiment. Referring to FIG. 2 , a process in which model parallel processing is performed on four GPUs according to an embodiment is illustrated.

모델 병렬 처리(Model parallelism; MP)는 예를 들어, 거대 심층 신경망 모델(Giant Deep Neural Network Model)과 같이 딥러닝 네트워크를 하나의 프로세싱 유닛(예를 들어, 단일 GPU 등)의 메모리에 로드하기에는 너무 큰 경우, 딥러닝 네트워크를 분할하여 다수의 프로세싱 유닛들에서 처리하는 기법이다. Model parallelism (MP) is too much to load deep learning networks into the memory of one processing unit (e.g. a single GPU, etc.), for example a Giant Deep Neural Network Model. In a large case, it is a technique to divide the deep learning network and process it in multiple processing units.

다시 말해, 모델 병렬 처리는 예를 들어, 1개의 GPU의 메모리 크기를 초과하는 심층 신경망 모델을 여러 부분으로 나누어 각각 서로 다른 GPU에 배정하는 기법에 해당할 수 있다. 예를 들어, 학습에 필요한 메모리가 60GB인 심층 신경망 모델 A이 있다고 하자. 이때, 메모리 크기가 20GB인 1개의 GPU로는 이 심층 신경망 모델 A를 트레이닝할 수 없다. 따라서, 필요한 메모리가 60GB인 심층 신경망 모델 A를 3개의 GPU들에 각각 20GB씩 나눠서 분산 처리할 수 있다. In other words, model parallel processing may correspond to, for example, a technique of dividing a deep neural network model exceeding the memory size of one GPU into several parts and assigning them to different GPUs. For example, suppose there is a deep neural network model A with 60 GB of memory required for training. At this time, this deep neural network model A cannot be trained with one GPU with a memory size of 20 GB. Therefore, the deep neural network model A, which requires 60 GB of memory, can be distributed and processed by dividing 20 GB each among the three GPUs.

여러 계층들로 구성된 거대 심층 신경망 모델은 계층들을 한 계층씩 또는 여러 계층들의 묶음으로 나누어, 예를 들어, k 개의 파티션들(partitions)(예를 들어, k = 4)(P1, P2, P3, P4)로 구분할 수 있다. 이때, 파티션들(P1, P2, P3, P4) 각각은 서로 다른 GPU들(G1, G2, G3, G4)에게 할당될 수 있다. GPU들(G1, G2, G3, G4)은 합쳐져 하나의 가상 작업자 역할을 수행할 수 있다. 일 실시예에서, '가상 작업자'는 여러 GPU들이 자원을 총합(aggregate)하여 하나의 작업자처럼 행동하는 것으로 이해될 수 있다. GPU들(G1, G2, G3, G4) 각각은 자신에게 할당된 파티션의 계층에 대해 정방향 패스 및 역방향 패스를 모두 실행할 수 있다. A large deep neural network model composed of several layers divides the layers into one layer or a group of several layers, for example, k partitions (eg, k = 4) (P 1 , P 2 , P 3 , P 4 ). In this case, each of the partitions P 1 , P 2 , P 3 , and P 4 may be assigned to different GPUs G 1 , G 2 , G 3 , and G 4 . The GPUs (G 1 , G 2 , G 3 , and G 4 ) may be combined to serve as one virtual worker. In one embodiment, a 'virtual worker' may be understood as multiple GPUs acting as a single worker by aggregating resources. Each of the GPUs (G 1 , G 2 , G 3 , G 4 ) can execute both a forward pass and a backward pass for the hierarchy of the partition assigned to it.

일 실시예에서 정방향 패스의 동작 동안 어느 하나의 미니 배치에 해당하는 입력 데이터에 대해 계산된 활성화 값은 어느 하나의 미니 배치의 역방향 패스의 동작이 실행될 때까지 해당 GPU의 메모리에 유지될 수 있다. 이때, 파티션의 정방향 패스 및 역방향 패스는 동일한 GPU에서 실행될 수 있다. 예를 들어, 정방향 패스 동안 미니 배치에 대해 계산된 활성화 값이 미니 배치의 역방향 패스가 실행될 때까지 GPU의 메모리에 유지되지 않는다면, 결과를 유지하기 위한 활성화 값을 재계산하거나, 또는 메모리 관리를 통해 활성화 값을 관리하는 데 상당한 추가 오버 헤드가 발생할 수 있다. In an embodiment, an activation value calculated for input data corresponding to one mini-batch during a forward pass operation may be maintained in a memory of a corresponding GPU until a backward pass operation of one mini-batch is executed. In this case, the forward pass and backward pass of the partition can be executed on the same GPU. For example, if activations computed for a mini-batch during the forward pass do not persist in the GPU's memory until the reverse pass of the mini-batch is executed, the activations to hold the result are recalculated, or through memory management. Significant additional overhead can be incurred in managing activation values.

도 2에서 Mp .k은 파티션 k에서 미니 배치 p의 실행을 나타내며, 파티션 k는 GPU k에서 실행될 수 있다. 도 2에 도시된 4개의 작업자들(R1, R2, R3, R4)이 하나의 가상 작업자로 합쳐져 미니 배치를 수행하는 과정은 다음과 같다. In FIG. 2, M p .k represents the execution of mini-batch p on partition k, and partition k can be executed on GPU k. The process of performing a mini-batch by merging the four workers (R 1 , R 2 , R 3 , R 4 ) shown in FIG. 2 into one virtual worker is as follows.

Step 1: 각 미니 배치에 대해 정방향 패스의 실행은 GPU1에서 시작하여 GPUk까지 수행된다. l ≤ i < k 인 각 GPUi 가 할당된 파티션의 순방향 패스 전달을 완료하면, 파티션의 마지막 계층에서 계산된 활성화 값(activations)을 GPUi +1로 전달할 수 있다. Step 1 : For each mini-batch, forward pass execution starts on GPU 1 and runs through GPU k . When each GPU i with l ≤ i < k completes the forward pass of the partition to which it is assigned, activations calculated in the last layer of the partition can be delivered to GPU i +1 .

Step 2: GPUk는 파티션의 순방향 패스 전달을 완료한다. Step 2 : GPU k completes the forward pass of the partition.

Step 3: 미니 배치의 역방향 패스가 GPUk에서 GPU1 까지 실행된다. 예를 들어, l ≤ i' < k 인 각 GPUi '가 역방향 패스를 마치면, 할당된 파티션에서 첫 번째 계층의 계산된 로컬 그래디언트만을 GPUi '- 1 로 전달할 수 있다. Step 3 : The reverse pass of the mini-batch is from GPU k to GPU 1 runs up to For example, when each GPU i ' with l ≤ i'< k completes the backward pass, only the computed local gradient of the first layer in the assigned partition can be passed to GPU i ' -1 .

보다 구체적으로, 도 2에서 하나의 심층 신경망은 4개의 파티션들(P1, P2, P3, P4)로 구분되고, 파티션들(P1, P2, P3, P4) 각각은 서로 다른 작업자들(R1, R2, R3, R4에게 할당될 수 있다. 이때, 작업자들(R1, R2, R3, R4)각각은 GPU들(GPU1 , GPU2 , GPU3, GPU4)에 대응될 수 있다. More specifically, in FIG. 2, one deep neural network is divided into four partitions (P 1 , P 2 , P 3 , P 4 ), and each of the partitions (P 1 , P 2 , P 3 , P 4 ) is It can be assigned to different workers (R 1 , R 2 , R 3 , R 4 ). At this time, each of the workers (R 1 , R 2 , R 3 , R 4 ) is GPU (GPU 1 , GPU 2 , GPU 3, GPU 4 ) may correspond.

예를 들어, 시간 t1에 작업자 R1이 자신에게 할당된 파티션 P1에 의해 미니 배치 M1.1을 처리한 경우, 미니 배치 M1.1의 처리 결과는 정방향 패스에 따라 작업자 R2에게 전달될 수 있다. 작업자 R2는 미니 배치 M1.1의 처리 결과를 기초로, 시간 t2에서 자신에게 할당된 파티션 P2에 의해 미니 배치 M1. 2을 처리할 수 있다. 미니 배치 M1.2의 처리 결과는 정방향 패스에 따라 작업자 R3에게 전달될 수 있다. 작업자 R3는 미니 배치 M1.2의 처리 결과를 기초로, 시간 t3에서 자신에게 할당된 파티션 P3에서 미니 배치 M1.3을 처리할 수 있다. 미니 배치 M1.3의 처리 결과는 정방향 패스에 따라 작업자 R4에게 전달될 수 있다. 이에 따라, 작업자 R4는 미니 배치 M1.3의 처리 결과를 기초로, 시간 t4에서 자신에게 할당된 파티션 P4에 의해 미니 배치 M1. 4을 처리할 수 있다. For example, if worker R 1 processes mini-batch M 1.1 by partition P 1 assigned to it at time t 1 , then the processing result of mini-batch M 1.1 can be delivered to worker R 2 according to the forward pass. . Based on the processing result of mini-batch M 1.1 , worker R 2 can process mini-batch M 1. 2 at time t 2 by partition P 2 assigned to it. The processing result of mini-batch M 1.2 can be delivered to worker R 3 according to the forward pass. Based on the processing result of mini-batch M 1.2 , worker R 3 can process mini-batch M 1.3 in partition P 3 assigned to him at time t 3 . The processing result of mini-batch M 1.3 can be delivered to worker R 4 according to the forward pass. Accordingly, worker R 4 can process mini-batch M 1.4 according to the partition P 4 assigned to him at time t 4 based on the processing result of mini - batch M 1.3 .

이때, 작업자 R4는 미니 배치 M1.4의 처리 결과(즉, 정방향 패스에서의 예측)와 실제 레이블을 기반으로 손실(loss)을 산출할 수 있다. 손실은 역방향 패스를 통해 심층 신경망의 모든 계층들, 다시 말해, 모든 파티션들에게 전달될 수 있다. 이때, 각 파티션들은 이전 파티션에서 계산된 그래디언트(gradients)와 정방향 패스에서 이전에 계산된 활성화(activations) 값을 사용하여 그래디언트를 산출할 수 있다. At this time, worker R 4 may calculate a loss based on the processing result of mini-batch M 1.4 (ie, prediction in the forward pass) and the actual label. The loss can propagate through the backward pass to all layers of the deep neural network, i.e. to all partitions. In this case, each partition may calculate a gradient using gradients calculated in the previous partition and activation values previously calculated in the forward pass.

다시 말해, 작업자 R4는 작업자 R3, R2, R1에게 역방향 패스를 통해 손실을 전달할 수 있다. 각 작업자들은 전달된 손실을 기초로 시간 t5, 시간 t6 시간 t7 시간 t8에서 각각 미니 배치 M1.4, 미니 배치 M1.3, 미니 배치 M1.2, 미니 배치 M1. 1를 순차적으로 처리할 수 있다. 이때, 각 작업자는 할당된 파티션에서 계산된 로컬 그래디언트를 역방향 패스를 통해 다음 작업자에게 전달할 수 있다. 예를 들어, 단일 GPU에서만 정방향 패스 또는 역방향 패스를 실행하는 경우 GPU 활용도가 낮을 수 있지만, 모델 병렬 처리를 사용하면 단일 GPU에 비해 매우 큰 거대 심층 신경망 모델을 실행할 수 있다.In other words, worker R 4 can pass the loss to workers R 3 , R 2 , and R 1 through the reverse pass. Each worker will sequentially process mini-batch M 1.4, mini-batch M 1.3, mini-batch M 1.2, and mini-batch M 1. 1 respectively at time t 5, time t 6 , time t 7 and time t 8 based on the delivered loss. can At this time, each worker can pass the local gradient calculated in the assigned partition to the next worker through a backward pass. For example, GPU utilization may be low if you run forward or backward passes on only a single GPU, but with model parallelism you can run very large deep neural network models on a single GPU.

일 실시예에서는 작업자의 GPU 활용도를 높이기 위해 미니 배치를 예를 들어, 아래의 도 4와 같은 파이프라인 방식으로 처리할 수 있다. 예를 들어, 심층 신경망 모델에 대한 역방향 패스의 실행 시간이 정방향 패스의 실행 시간의 두 배라고 가정하자. 이 경우, GPU1이 이전 미니 배치의 처리를 완료하면, 후속 미니 배치를 하나씩 GPU1에 공급할 수 있다. 이를 통해 여러 GPU들이 서로 다른 미니 배치들에 대해 할당된 계층의 정방향 패스 또는 역방향 패스를 동시에 실행할 수 있다. 미니 배치들을 파이프파인 방식을 통해 처리하는 방법은 아래의 도 4를 참조하여 구체적으로 설명한다. In one embodiment, mini-batches may be processed in a pipeline manner as shown in FIG. 4 below in order to increase worker's GPU utilization. For example, assume that the running time of the backward pass for a deep neural network model is twice the running time of the forward pass. In this case, when GPU 1 finishes processing the previous mini-batch, it can feed the subsequent mini-batch to GPU 1 one by one. This allows multiple GPUs to simultaneously execute forward or backward passes of an assigned layer on different mini-batches. A method of processing mini-batches through the pipe fine method will be described in detail with reference to FIG. 4 below.

도 3은 일 실시예에 따른 클러스터 시스템의 아키텍쳐를 도시한 도면이다. 도 3을 참조하면, 일 실시예에 따라 N 개의 노드들로 구성된 클러스터 시스템(300)의 아키텍처가 도시된다. 각 노드는 예를 들어, 동종 또는 이종의 GPU들의 집합으로 구성될 수 있고, 노드들 간의 GPU 및 메모리 또한 서로 동종 또는 이기종일 수 있습니다.3 is a diagram illustrating the architecture of a cluster system according to an embodiment. Referring to FIG. 3 , an architecture of a cluster system 300 consisting of N nodes according to one embodiment is shown. Each node may be composed of, for example, a set of homogeneous or heterogeneous GPUs, and GPUs and memories between nodes may also be homogeneous or heterogeneous.

일 실시예에 따른 클러스터 시스템(300)은 계산 능력과 메모리 용량이 다른 다양한 유형의 GPU들로 구성된 이기종 GPU 클러스터를 포함하며, 거대 심층 신경망 모델(305)을 트레이닝할 수 있다. 일 실시예에 따른 클러스터 시스템은 파이프라인 모델 병렬 처리(Pipeline Model Parallelism; PMP)와 데이터 병렬 처리(DP)를 통해 거대 심층 신경망 모델(305)을 트레이닝 함으로써 클러스터의 이기종 GPU 자원의 활용도 뿐만 아니라 클러스터의 성능 또한 향상시킬 수 있다. The cluster system 300 according to an embodiment includes a heterogeneous GPU cluster composed of various types of GPUs having different computational capabilities and memory capacities, and may train a massive deep neural network model 305 . The cluster system according to an embodiment trains the massive deep neural network model 305 through Pipeline Model Parallelism (PMP) and Data Parallelism (DP), thereby improving utilization of heterogeneous GPU resources of the cluster as well as cluster Performance can also be improved.

일 실시예에 따른 클러스터 시스템(300)은 k개의 이기종의 GPU들로 구성된 가상 작업자를 통해 데이터 병렬 처리(DP)를 수행할 수 있으며, 가상 작업자들에 의해 심층 신경망 모델을 트레이닝할 수 있다. The cluster system 300 according to an embodiment may perform data parallel processing (DP) through a virtual worker composed of k heterogeneous GPUs, and may train a deep neural network model by the virtual workers.

일 실시예에 따른 클러스터 시스템(300)은 예를 들어, N 개의 노드들(Node 1, .. , Node N-1, Node N)을 포함할 수 있다. N개의 노드들은 예를 들어, N개의 가상 작업자들(Virtual Worker; VW)(VW 1, .. ,VW N-1, VW N)에 1:1로 대응할 수도 있고, 또는 다수:1, 또는 1:다수로 대응할 수도 있다. 하나의 가상 작업자(VW 1)는 예를 들어, 4개의 GPU들(GA, GA, GA, GA)을 포함할 수 있다. 또한, 가상 작업자(VW N-1) 및 가상 작업자(VW N1) 각각은 예를 들어, 4개의 GPU들(GB, GB, GC, GC)을 포함할 수 있다. 이때, 가상 작업자들(VW1, ..VW N-1, VW N) 각각을 구성하는 GPU들의 개수(k)는 각 가상 작업자(VW)마다 다를 수 있다. 일 실시예에서는 설명의 편의를 위하여, GPU들의 개수(k)가 각 가상 작업자(VW)에 대해 일정한 경우를 예로 들어 설명하지만, 반드시 이에 한정되는 것은 아니고, GPU들의 개수(k)는 가상 작업자(VW)마다 달라질 수도 있다. 일 실시예에서는 가상 작업자(VW)가 개별 GPU에 자원 기능이 없는 경우에도 GPU를 집계하여 데이터 병렬 처리를 허용할 수 있다. The cluster system 300 according to an embodiment may include, for example, N nodes (Node 1, .., Node N-1, Node N). The N nodes may correspond 1:1 to, for example, N Virtual Workers (VWs) (VW 1, .. , VW N-1, VW N), or many:1, or 1 : You can respond to multiple. One virtual worker (VW 1) may include, for example, 4 GPUs ( GA , GA , GA , GA ). Also, each of the virtual worker VW N−1 and the virtual worker VW N1 may include, for example, four GPUs GB , GB , G C , and G C . In this case, the number k of GPUs constituting each of the virtual workers VW1, ..VW N−1, and VW N may be different for each virtual worker VW. In one embodiment, for convenience of description, a case in which the number k of GPUs is constant for each virtual worker VW is described as an example, but is not necessarily limited thereto, and the number k of GPUs is a virtual worker ( VW) may vary. In one embodiment, virtual workers (VWs) may aggregate GPUs to allow data parallelism even when individual GPUs do not have resource capabilities.

또한, 일 실시예에 따른 클러스터 시스템(300)은 거대 심층 신경망 모델(305)을 수용하기 위해 각 가상 작업자(VW)가 모델 병렬 처리를 기반으로 아래의 도 4와 같은 파이프라인 방식에 의해 각 미니 배치들을 처리함으로써 GPU 자원을 완전히 활용할 수 있다. In addition, in the cluster system 300 according to an embodiment, in order to accommodate the huge deep neural network model 305, each virtual worker (VW) uses a pipeline method as shown in FIG. 4 below based on model parallel processing for each mini By processing batches, GPU resources can be fully utilized.

클러스터 시스템(300)은 이기종 설정(heterogeneous setting)에서의 파이프라인 모델 병렬 처리(Pipelined Model Parallelism)를 수행할 수 있다. The cluster system 300 may perform Pipelined Model Parallelism in a heterogeneous setting.

클러스터 시스템(300)은 자원 할당자(Resource Allocator)(310), 모델 분할자(model partitioner)(330), 및 파라미터 서버(Parameter server)(350)를 포함할 수 있다. The cluster system 300 may include a resource allocator 310, a model partitioner 330, and a parameter server 350.

가상 작업자의 파이프라인 모델 병렬 처리를 기반으로 DNN 모델을 트레이닝하기 위해, 자원 할당자(310)는 프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당한다. 자원 할당자(310)는 예를 들어, 자원 할당 정책에 따라 k 개의 GPU들을 가상 작업자들 각각에게 할당할 수 있다. In order to train the DNN model based on the parallel processing of the pipeline model of virtual workers, the resource allocator 310 allocates processing units to each of the virtual workers corresponding to the neural network model to be trained. The resource allocator 310 may allocate k GPUs to each of the virtual workers according to, for example, a resource allocation policy.

일 실시예에 따른 자원 할당 정책은 이기종 GPU들을 가상 작업자들에게 할당하기 위해, 예를 들어, 복수 개의 프로세싱 유닛들 각각의 성능 및 통신 오버 헤드 등과 같은 요소들을 고려하여 결정될 수 있다. 통신 오버 헤드는 예를 들어, 가상 작업자들의 활성화(activation) 값과 그래디언트(gradient)의 전송 및 상기 가상 작업자들과 파라미터 서버 간의 모델 파라미터 동기화 시에 발생할 수 있다. A resource allocation policy according to an embodiment may be determined in consideration of factors such as, for example, performance of each of a plurality of processing units and communication overhead, in order to allocate heterogeneous GPUs to virtual workers. Communication overhead may occur, for example, when transmitting activation values and gradients of virtual workers and synchronizing model parameters between the virtual workers and a parameter server.

실시예에 따라서, 자원 할당자(310)는 이기종 및/또는 동일 기종의 프로세싱 유닛들을 가상 작업자들 각각에게 동일 개수로 균등하게 할당할 수도 있고, 또는 이기종 또는 동일 기종의 프로세싱 유닛들을 가상 작업자들 각각에게 상이한 개수로 할당할 수도 있다. 자원 할당자(310)는 예를 들어, 같은 GPU들로 구성된 각 노드의 GPU를 모든 가상 작업자들에게 균등하게 분배할 수 있다. 따라서, 모든 가상 작업자들에게 서로 다른 종류의 GPU들이 할당될 수 있지만 모든 가상 작업자들은 동일한 개수의 리소스를 가질 수 있다. 다시 말해, 4개의 노드들이 각각 A, B, C, D라는 GPU를 4개씩 가지고 있고, 가상 작업자가 4개라고 하면, 자원 할당자(310)는 각 가상 작업자를 A, B, C, D와 같이 4개의 GPU로 구성할 수 있다. 이러한 균등한 자원 할당 방식은 신경망 모델의 파티셔닝에도 동일하게 적용될 수 있고, 자원의 균등 분배에 따라 가상 작업자들 간에 성능이 동일하게 되어 스트래글러(straggler) 문제를 완화할 수 있습니다. Depending on the embodiment, the resource allocator 310 may equally allocate the same number of heterogeneous and/or the same type of processing units to each of the virtual workers, or may equally allocate heterogeneous or the same type of processing units to each of the virtual workers. may be assigned to different numbers. The resource allocator 310 may equally distribute GPUs of each node composed of the same GPUs to all virtual workers, for example. Thus, different types of GPUs may be assigned to all virtual workers, but all virtual workers may have the same number of resources. In other words, if four nodes each have four GPUs A, B, C, and D, and four virtual workers, the resource allocator 310 assigns each virtual worker A, B, C, and D. It can be configured with 4 GPUs. This equal resource allocation method can be equally applied to the partitioning of the neural network model, and the straggler problem can be alleviated as performance becomes equal among virtual workers according to the equal distribution of resources.

이 밖에도, 자원 할당자(310)가 프로세싱 유닛들을 가상 작업자들 각각에게 동일 개수로 균등하게 할당하고, 가상 작업자들에 대한 데이터 병렬화(DP)를 수행하는 경우, 파라미터 서버(350)는 클러스터 시스템(300)의 어느 한 노드에서 실행되는 파티션에 해당하는 레이어를 GPU 노드들에게 분산하여 배치할 수 있다. 파라미터 서버(350)가 GPU 노드들에게 균등 분배된 경우, 동일한 노드에서 실행되는 파티션의 파라미터(모델의 layer들)는 해당 노드에서 실행되는 파라미터 서버(350)에 배치됨으로써 파라미터 동기화를 위해 실제 네트워크 트래픽을 발생시키지 않을 뿐만 아니라, 각 노드 안에서 파라미터를 주고 받음으로써 파라미터의 업데이트에 따른 통신 오버헤드를 크게 줄일 수 있다. 예를 들어, 노드 A에 할당된 파티션에 해당하는 파라미터를 관리하는 파라미터 서버(의 일부)가 노드 A에 분산 배치되면, 각 가상 작업자가 파라미터 서버에게 파라미터 갱신치를 전송하고, 파라미터 서버로부터 동기화된 파라미터를 수신할 때, 노드 A 안에서만 통신을 하면 되므로 통신 오버헤드를 크게 줄일 수 있다. In addition, when the resource allocator 310 equally allocates the same number of processing units to each of the virtual workers and performs data parallelization (DP) on the virtual workers, the parameter server 350 is a cluster system ( 300), a layer corresponding to a partition executed on any one node may be distributed to GPU nodes. When the parameter server 350 is evenly distributed to GPU nodes, the parameters of the partition (layers of the model) running on the same node are placed on the parameter server 350 running on the node, so that the actual network traffic for parameter synchronization. not only does not occur, but by exchanging parameters within each node, communication overhead according to parameter update can be greatly reduced. For example, if (a part of) a parameter server that manages parameters corresponding to a partition assigned to node A is distributed to node A, each virtual worker transmits parameter updates to the parameter server, and synchronized parameters from the parameter server. When receiving, it is necessary to communicate only within node A, so communication overhead can be greatly reduced.

클러스터 시스템(300)의 가상 작업자들이 파이프라인 모델 병렬 처리를 수행하는 방법은 아래의 도 4를 참조하여 구체적으로 설명한다. A method for the virtual workers of the cluster system 300 to perform pipeline model parallel processing will be described in detail with reference to FIG. 4 below.

모델 분할자(model practitioner)(330)는 자원 할당자(310)에 의해 할당된 프로세싱 유닛들을 기초로, 트레이닝하고자 하는 신경망 모델(305)을 가상 작업자들에 대응하는 개수의 파티션들로 분할한다. 모델 분할자(330)는 주어진 심층 신경망 모델(305)과 할당된 k개의 GPU들을 기초로, 심층 신경망 모델을 가상 작업자들에 대응하는 k 개의 파티션들로 분할하여 가상 작업자들에서 실행되는 파이프라인의 성능을 최대화할 수 있다.A model practitioner 330 divides the neural network model 305 to be trained into partitions corresponding to the number of virtual workers, based on processing units allocated by the resource allocator 310 . The model divider 330 divides the deep neural network model into k partitions corresponding to virtual workers, based on the given deep neural network model 305 and the allocated k GPUs, so as to determine the number of pipelines executed on the virtual workers. performance can be maximized.

파라미터 서버(350)는 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터(global weight)를 유지(maintain)한다. 이때, 가상 작업자들 각각은 예를 들어, 글로벌 모델 파라미터의 로컬 복사본을 포함하고, 전술한 다양한 동기화 정책에 따라 파라미터 서버(350)와 주기적으로 글로벌 모델 파라미터의 갱신치를 동기화할 수 있다. The parameter server 350 maintains a global model parameter (global weight) to support parallel processing of data between virtual workers. In this case, each of the virtual workers may include, for example, a local copy of the global model parameters, and periodically synchronize updated values of the global model parameters with the parameter server 350 according to various synchronization policies described above.

일 실시예에서는 하나의 가상 작업자 내에서 발생하는 모델 파라미터와 다수의 가상 작업자들 간에 발생하는 모델 파라미터를 관리하기 위해 '로컬 스테일니스(local staleness)'와 '글로벌 스테일니스(global staleness)'이라는 두 가지 유형의 스테일니스를 정의함으로써 심층 신경망의 트레이닝 성능을 향상시킬 수 있다. In one embodiment, two types of 'local staleness' and 'global staleness' are used to manage model parameters occurring within one virtual worker and model parameters occurring between multiple virtual workers. We can improve the training performance of deep neural networks by defining branch types of stiffness.

로컬 스테일니스는 개별 가상 작업자에서 발생하는 스테일니스를 나타낸다. 각 가상 작업자가 파이프라인 방식으로 복수 개의 미니 배치들을 처리할 때 미니 배치들은 병렬로 처리될 수 있다. 따라서, 가상 작업자가 하나의 미니 배치를 처리하는 경우에 볼 수 있는 모델 파라미터가 이전의 모든 미니 배치들에서의 갱신치를 반영하지 않을 수 있다. 이와 같이 하나의 가상 작업자에서 미니 배치를 처리할 때에 이전의 미니 배치들의 갱신치가 반영되지 않음에 따라 해당 미니 배치의 모델 파라미터가 최신의 값을 가지지 못하게 되는 것을 '로컬 스테일니스'라고 부를 수 있다. Local stiffness represents the stiffness generated by individual virtual workers. When each virtual worker processes multiple mini-batches in a pipelined manner, the mini-batches can be processed in parallel. Thus, when a virtual worker processes one mini-batch, the visible model parameters may not reflect the updates in all previous mini-batches. In this way, when a mini-batch is processed by one virtual worker, the updated values of previous mini-batches are not reflected, so that the model parameters of the corresponding mini-batch do not have the latest value, which can be called 'local staleness'.

또한, 글로벌 스테일니스는 다수의 가상 작업자들 간에 발생하는 스테일니스를 의미한다. In addition, global stability refers to the stability that occurs between multiple virtual workers.

일 실시예에 따른 클러스터 시스템(300)은 파라미터 서버(350)와 가상 작업자들 간의 통신 오버 헤드를 줄여야 한다. 또한, 클러스터 시스템(300)은 이기종의 프로세싱 유닛들로 구성된 가상 작업자들로 인한 동기화 오버 헤드를 완화해야 한다. 따라서, 글로벌 모델 파라미터의 로컬 복사본이 너무 오래되어 다른 가상 작업자들이 최근에 갱신을 누락한 모델 파라미터들이 너무 많지 않은 한, 각 가상 작업자는 모든 미니 배치들에 대한 전체 모델 파라미터를 쿼리(query)하지 않고 트레이닝을 진행할 수 있다. 이때, 미니 배치들 간의 반복 횟수의 차이를 제한하는 스테일니스 임계치 또는 스테일니스 조건(staleness condition)은 사용자에 의해 설정될 수 있다. The cluster system 300 according to an embodiment should reduce communication overhead between the parameter server 350 and virtual workers. In addition, the cluster system 300 should mitigate synchronization overhead due to virtual workers composed of heterogeneous processing units. Thus, each virtual worker does not query the full model parameters for all mini-batches, unless the local copy of the global model parameters is too old and there are too many model parameters that other virtual workers have recently missed updating. training can proceed. In this case, a staleness threshold or staleness condition limiting the difference in the number of repetitions between mini-batches may be set by the user.

도 4는 일 실시예에 따른 가상 작업자에서 미니 배치들이 파이프라인 방식으로 처리되는 과정을 도시한 도면이다. 도 4를 참조하면, 예를 들어, 4 개의 GPU들을 가진 가상 작업자가 파이프라인 모델 병렬 처리에 의해 미니 배치들을 처리하는 상황이 도시된다. 4 is a diagram illustrating a process of processing mini-batches in a pipeline method in a virtual worker according to an embodiment. Referring to FIG. 4 , a situation is shown in which a virtual worker with, for example, 4 GPUs processes mini-batches by pipeline model parallelism.

일 실시예에서는 모델 파라미터의 동기화를 위해 WSP(Wave Synchronous Parallel) 모델을 사용할 수 있다. 여기서, 웨이브(Wave; W)는 가상 작업자들 각각에서 이전의 미니 배치로부터 계산된 모델 파라미터에 대한 갱신없이 동시에 처리되는 일련의 미니 배치들로 이해될 수 있다. 예를 들어, 웨이브에 포함되는 미니 배치들의 개수를 Nm라고 하자. 이 경우, 가상 작업자는 웨이브 내에서 이전 미니 배치 i'의 처리가 완료될 때까지 기다리지 않고, i 번째 미니 배치의 처리를 진행할 수 있다. 여기서 1 < i ≤ Nm 이고, 1 ≤ i' < i 일 수 있다. In one embodiment, a Wave Synchronous Parallel (WSP) model may be used for synchronization of model parameters. Here, a wave (W) can be understood as a series of mini-batches that are simultaneously processed without any update to the model parameters calculated from the previous mini-batches in each of the virtual workers. For example, let N m be the number of mini-batches included in a wave. In this case, the virtual worker may proceed with the processing of the i-th mini-batch within the wave without waiting for the processing of the previous mini-batch i' to be completed. Here, 1 < i ≤ N m , and 1 ≤ i'< i.

가상 작업자는 웨이브의 첫 번째 미니 배치에서의 갱신이 마지막 미니 배치에 의해 사용되는 모델 파라미터에 반영되도록 강제하지 않기 때문에, WSP 모델의 로컬 스테일니스 임계값은 Nm -1이 될 수 있다. 또한, 가상 작업자들 각각은 가상 작업자들 각각에서 동시에 처리되는 미니 배치들을 포함하는 웨이브(Wave)를 기초로, 웨이브에 포함된 미니 배치들에서 집계된 모델 파라미터에 대한 갱신치를 한번에 파라미터 서버로 푸시할 수 있다. 가상 작업자들 각각은 예를 들어, 데이터 병렬화를 위한 파이프라인을 구성하는 가상 작업자들 각각에서 동시에 실행되는 미니 배치들에 해당하는 웨이브를 기초로, 하나의 웨이브가 종료하는 시점에서 해당 웨이브에 포함된 미니 배치들에서 집계된 갱신치를 파라미터 서버로 푸시(Push)하고, 파라미터 서버에 저장된 갱신치를 풀(Pull) 함으로써 모델 파라미터를 동기화할 수 있다. Since the virtual worker does not force updates in the first mini-batch of the wave to be reflected in the model parameters used by the last mini-batch, the local staleness threshold of the WSP model is N m can be -1. In addition, each of the virtual workers may push updated values for model parameters aggregated in mini-batches included in the wave to the parameter server at once, based on a wave including mini-batches simultaneously processed in each of the virtual workers. can Each of the virtual workers, for example, based on a wave corresponding to mini-batches that are simultaneously executed in each of the virtual workers constituting a pipeline for data parallelization, at the point where one wave ends, included in the corresponding wave Model parameters can be synchronized by pushing updated values aggregated in mini-batches to the parameter server and pulling updated values stored in the parameter server.

가상 작업자들 각각은 모든 미니 배치들에 대한 갱신치들을 파라미터 서버로 푸시하는 대신에, 해당 웨이브에 포함된 모든 미니 배치들에서 집계된 갱신치만을 푸시하므로 통신 오버 헤드를 크게 줄일 수 있다. Instead of pushing the update values for all mini-batches to the parameter server, each of the virtual workers pushes only the aggregated update values from all mini-batches included in the wave, so communication overhead can be greatly reduced.

도 3의 클러스터 시스템에서 각 가상 작업자(VW)는 파이프라인 방식으로 최대 Nm 개의 미니 배치들을 동시에 처리하므로 미니 배치들의 실행이 겹칠 수 있다. 심층 신경망 모델과 k 개의 GPU들을 고려할 때 가상 작업자들에서 동시에 실행되는 최대 미니 배치들의 개수는 기본적으로 심층 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 의해 결정될 수 있다. In the cluster system of FIG. 3 , since each virtual worker (VW) simultaneously processes up to N m mini-batches in a pipeline manner, mini-batches may overlap each other. Considering the deep neural network model and k number of GPUs, the maximum number of mini-batches concurrently executed on virtual workers may be basically determined by the memory requirements for training the deep neural network model.

예를 들어, 신경망 모델이 출력 활성화(output activations) 및 가중치를 위해 많은 양의 메모리를 필요로 하는 거대 심층 신경망 모델인 경우, 가상 작업자들의 수(Maxm)는 GPU들의 개수(k)보다 작을 수 있다. 이러한 경우 각 GPU의 사용률이 높지 않을 수 있다. 한편, 신경망 모델이 적은 양의 메모리를 필요로 하는 소형 모델의 경우, 가상 작업자의 수(Maxm)는 k 개 이상일 수 있다. For example, if the neural network model is a large deep neural network model that requires large amounts of memory for output activations and weights, the number of virtual workers (Max m ) can be less than the number of GPUs (k). have. In this case, the utilization rate of each GPU may not be high. Meanwhile, in the case of a small model in which a neural network model requires a small amount of memory, the number of virtual workers (Max m ) may be k or more.

메모리 요구 사항에 제한이 없는 경우, 가상 작업자의 수(Maxm)는 가상 작업자가 GPU1에서 미니 배치 1의 역방향 패스를 실행하기 전에 정방향 패스를 위해 파티션 1을 실행하는 GPU1에 주입할 수 있는 최대 미니 배치들의 개수에 의해 결정될 수 있다. 이때, 최대 미니 배치들의 개수는 예를 들어, 정방향 패스와 역방향 패스 사이의 실행 비율과 파이프라인에 사용된 GPU들의 개수(즉, k개)에 따라 달라질 수 있다. 정방향 패스의 실행에 소요되는 시간이 역방향 패스의 실행에 소요되는 시간보다 짧으므로, 정방향 패스와 역방향 패스 사이의 실행 비율이 작을수록 GPU들의 개수(k)가 커질 수 있다. If the memory requirements are not limited, the number of virtual workers (Max m ) is the maximum mini-worker that can inject into GPU1 running partition 1 for the forward pass before running the reverse pass of mini-batch 1 on GPU1. It can be determined by the number of batches. In this case, the maximum number of mini-batches may vary depending on, for example, an execution ratio between a forward pass and a backward pass and the number of GPUs used in the pipeline (ie, k). Since the time required to execute the forward pass is shorter than the time required to execute the backward pass, the number k of GPUs may increase as the execution ratio between the forward and reverse passes decreases.

파이프라인의 실제 미니 배치의 수(Nm)는 가상 작업자들의 수(Maxm)보다 작거나 같을 수 있다. The number of actual mini-batches in the pipeline (N m ) may be less than or equal to the number of virtual workers (Max m ).

신경망 모델을 트레이닝하기 위해, 예를 들어, k 개의 GPU 세트가 자원 할당 정책에 의해 가상 작업자에게 할당될 수 있다. 예를 들어, k 개의 이기종 GPU들 및 파이프라인의 실제 미니 배치 수 Nm 가 주어진다고 가정하자. To train a neural network model, for example, a set of k GPUs may be assigned to a virtual worker by a resource allocation policy. For example, assume that k heterogeneous GPUs and the actual number of mini-batches N m in the pipeline are given.

클러스터 시스템(300)은 분할 알고리즘(partitioning algorithm)을 사용하여 신경망 모델의 여러 계층들을 k 개의 파티션들(partitions)로 나누고, 이를 k 개의 다른 GPU들에 할당할 수 있다. 분할 알고리즘의 목표는 파이프라인의 성능을 최대화하는 동시에 Nm 개의 미니 배치들을 처리하기 위해 각 파티션의 메모리 요구 사항을 충족시키는 것이다. 특히, 일 실시예에서는 메모리 요구 사항이 GPU가 사용되는 파이프라인의 단계에 따라 달라진다는 점을 고려하여 신경망 모델을 분할할 수 있다. The cluster system 300 may divide the layers of the neural network model into k partitions using a partitioning algorithm and allocate them to k different GPUs. The goal of the partitioning algorithm is to maximize the performance of the pipeline while meeting the memory requirements of each partition to process N m mini-batches. In particular, in one embodiment, the neural network model may be partitioned considering that memory requirements vary depending on the stage of the pipeline in which the GPU is used.

예를 들어, 도 4의 파이프라인에서 GPU1(G1)과 GPU4(G4)를 비교하자. For example, compare GPU1 (G 1 ) and GPU4 (G 4 ) in the pipeline of FIG. 4 .

파이프라인의 마지막 단계를 처리하는 GPU4(G4)는 한 번에 하나의 미니 배치만 처리하며, 해당 미니 배치는 연속하는 포워드 패스와 백워드 패스의 미니 배치의 쌍(Mi,4)(i = 1, 2, ..인 자연수)에 의해 즉시 수행될 수 있다. GPU4 (G 4 ), which processes the last stage of the pipeline, processes only one mini-batch at a time, and that mini-batch is a pair (M i,4 ) of successive forward and backward pass mini-batches (i = 1, 2, .. natural numbers).

이와 달리, 파이프라인의 첫 단계를 처리하는 GPU1(G1)은 포워드 패스와 백워드 패스의 미니 배치의 쌍(Mi,1)이 서로 멀리 떨어져 있다. 따라서, GPU1(G1)은 정방향 패스의 미니 배치(Mi,1)를 역방향 패스의 미니 배치(Mi , 1)의 실행이 끝날 때까지 메모리에 유지해야 한다. 이와 같이, GPU1(G1)에서는 파이프라인의 모든 단계에서 정방향 패스의 결과를 유지해야 하므로 메모리 요구 사항이 높아질 수 있다.In contrast, GPU1 (G 1 ), which processes the first stage of the pipeline, has forward and backward pass mini-batch pairs (M i,1 ) that are far apart from each other. Therefore, GPU1(G 1 ) must keep the mini-batch (M i, 1 ) in the forward pass in memory until the mini-batch (M i , 1 ) in the backward pass is finished executing. As such, GPU1 (G 1 ) must maintain the result of the forward pass at every stage of the pipeline, which can increase memory requirements.

또한, 신경망 모델의 계층을 분할할 때에는 이러한 메모리 요구 사항의 차이뿐만 아니라, 파티션의 실행 시간 또한 고려되어야 한다. 일 실시예에 따른 클러스터 시스템(300)은 파티션의 실행 시간을 파티션에 있는 모든 계층의 계산 시간과 정방향 패스에서 발생하는 활성화 및 역방향 패스에서 발생하는 로컬 그래디언트를 수신하는 데에 필요한 통신 시간의 합으로 계산할 수 있다. 따라서, 일 실시예에서는 메모리 요구 사항을 충족시키는 범위 내에서 파티션의 최대 실행 시간을 최소화하도록 신경망 모델의 파티셔닝할 수 있다. In addition, when partitioning the layers of the neural network model, not only these differences in memory requirements, but also the execution time of the partitions should be considered. In the cluster system 300 according to an embodiment, the execution time of a partition is calculated as the sum of the calculation time of all layers in the partition and the communication time required to receive the activation occurring in the forward pass and the local gradient occurring in the backward pass. can be calculated Accordingly, in one embodiment, the neural network model may be partitioned to minimize the maximum execution time of the partition within a range that satisfies memory requirements.

신경망 모델의 파티셔닝이 완료되면, 클러스터 시스템(300)은 각 GPU에 대해 파티션들을 스케줄링(scheduling)할 수 있다. When the partitioning of the neural network model is completed, the cluster system 300 may schedule partitions for each GPU.

예를 들어, 1 ≤ q <k 인 파티션 q를 담당하는 각 GPUq는 다수의 정방향 패스 작업과 역방향 패스 작업을 한 번에 스케줄링할 수 있다. 클러스터 시스템(300)에서 각 GPU는 다음 조건을 적용하여 작업(task)을 스케줄링할 수 있다. For example, each GPU q responsible for a partition q such that 1 ≤ q < k can schedule multiple forward pass and reverse pass tasks at once. In the cluster system 300, each GPU may schedule a task by applying the following conditions.

1. 미니 배치 p에 대한 정방향 패스 작업은 l ≤ p' < p 인 모든 미니 배치 p'에 대한 정방향 패스 작업이 수행된 후에만 실행된다. 1. Forward pass operations on mini-batch p are executed only after forward pass operations on all mini-batches p' where l ≤ p' < p have been performed.

2. 유사하게, 미니 배치 p에 대한 역방향 패스 작업은 l ≤ p' < p에서 모든 미니 배치 p'에 대한 역방향 패스 작업이 수행된 후에만 실행된다.2. Similarly, the backward pass operation on mini-batch p is executed only after all the backward pass operations on mini-batch p' have been performed, where l ≤ p' < p.

3. 신경망 모델의 종류와 분할된 파티션 개수의 특성에 따라 미니 배치들에 대한 정방향 패스 작업과 역방향 패스 작업 실행 순서에 대한 다양한 스케줄링 정책을 가질 수 있다. 스케줄링 정책의 예시는 다음과 같다.3. Depending on the type of neural network model and the number of partitions, it is possible to have various scheduling policies for the execution order of forward pass and reverse pass tasks for mini-batches. An example of a scheduling policy is as follows.

3-1. 미니 배치들에 대한 역방향 패스 작업과 정방향 패스 작업을 선입선출(First In First Out; FIFO) 스케줄링 정책에 따라 처리할 수 있다. 3-1. Reverse pass and forward pass operations for mini-batches can be processed according to a First In First Out (FIFO) scheduling policy.

3-2. 미니 배치들에 대한 역방향 패스 작업들은 정방향 패스 작업들보다 높은 우선순위를 두고 스케줄링할 수 있다.3-2. Reverse pass jobs for mini-batches can be scheduled with a higher priority than forward pass jobs.

또한, 일 실시예에 따른 클러스터 시스템(300)은 미니 배치들의 처리 시에 사용되는 모델 파라미터들의 스테일니스를 고려하여 작업을 스케줄링할 수 있다. In addition, the cluster system 300 according to an embodiment may schedule jobs in consideration of the staleness of model parameters used when processing mini-batches.

미니 배치가 스케줄링되면, 신경망 모델의 계층들은 가장 최신의 모델 파라미터들을 사용하지 않을 수 있다. 예를 들어, 도 4에서 GPU1(G1)에 의해 두 번째 미니 배치인 정방향 패스 M2, 1 가 처리되는 시점에는 아직 첫 번째 미니 배치 M1,1에 대한 역방향 패스의 처리가 완료되지 않았다. 이와 같이, 파이프라인 방식으로 미니 배치들을 스케줄링하는 경우, 첫 번째 미니 배치로 인한 모델 파라미터의 변화가 아직 적절하게 반영되지 않았으며, GPU1(G1)가 미니 배치 M2,1의 처리 시에 가장 최신이 아닌 모델 파라미터, 다시 말해, 스테일 모델 파라미터들(stale weights)을 사용해야 한다. 이는 미니 배치들이 한 번에 하나씩 처리되는 일반적인 처리와 대조적이다. When mini-batches are scheduled, the layers of the neural network model may not use the most up-to-date model parameters. For example, in FIG. 4 , when the forward pass M 2, 1 , which is the second mini-batch, is processed by GPU1 (G 1 ), the backward pass processing of the first mini-batch M 1,1 has not yet been completed. As such, when mini-batches are scheduled in a pipeline manner, changes in model parameters due to the first mini-batch have not yet been properly reflected, and GPU1 (G 1 ) is the most You must use model parameters that are out of date, i.e., stale weights. This is in contrast to normal processing where mini-batches are processed one at a time.

가상 작업자에서 진행되는 미니 배치에 대해 가장 최신의 미니 배치들로부터 누락된 갱신치들의 최대 개수를 '로컬 스테일니스(local staleness)의 임계값(slocal)'라고 하자. Let the maximum number of missing updates from the most recent mini-batches for a mini-batch running on a virtual worker be 'local staleness threshold (s local )'.

일 실시예에서는 Nm개의 미니 배치들에 대한 트레이닝이 가상 작업자들에서 동시에 진행될 수 있으므로, 로컬 스테일니스의 임계값(slocal)을 미니 배치들의 개수(Nm) - 1(여기서, 1 ≤ Nm ≤ Maxm 임)로 결정할 수 있다. In one embodiment, since training for N m mini-batches can be simultaneously performed on virtual workers, the local stiffness threshold (s local ) is set to the number of mini-batches (N m ) - 1 (where 1 ≤ N m ≤ Max m ).

일 실시예에서 가상 작업자에게 주어지는 모델 파라미터들의 초기 값을 초기 모델 파라미터(w0)라 하고, 미니 배치 p에 의해 사용되는 모델 파라미터를 wp라고 하자. In one embodiment, let the initial values of the model parameters given to the virtual worker be the initial model parameter w 0 , and let the model parameter used by the mini-batch p be w p .

첫 번째 (slocal + 1) 개의 미니 배치들이 모델 파라미터 w0 = w1 = ... = w_slocal = w_slocal +1에 의해 파이프라인 방식으로 처리될 수 있다. 일 실시예에서는 클러스터 시스템의 스테일니스를 수용하기 위해 미니 배치p의 처리가 완료되면, 가상 작업자는 로컬 모델 파라미터들(wlocal)을 wlocal = wlocal + up 와 같이 갱신할 수 있다. 여기서 up는 미니 배치 p를 처리함으로써 산출된 갱신치(updated value)에 해당할 수 있다. The first (s local + 1) mini-batches can be processed in a pipelined fashion by the model parameter w 0 = w 1 = ... = w_s local = w_s local +1 . In one embodiment, when processing of the mini-batch p is completed to accommodate the staleness of the cluster system, the virtual worker may update the local model parameters (w local ) as w local = w local + u p . Here, u p may correspond to an updated value calculated by processing the mini-batch p.

가상 작업자가 새 미니 배치를 처리하기 시작하면, 다른 미니 배치들에 의해 모델 파라미터들이 갱신될 때까지 기다리지 않고, 로컬 모델 파라미터(wlocal)의 가장 최근 값을 사용할 수 있다. 예를 들어, 가상 작업자가 미니 배치 1를 처리함으로써 산출된 미니 배치 1에 대응하는 갱신치(u1)에 의해 로컬 모델 파라미터(wlocal)를 갱신했다고 하자. 이 경우, 가상 작업자는 미니 배치 1에 연속하는 미니 배치 2의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 로컬 모델 파라미터의 가장 최근 값을 사용하여 신경망 모델의 트레이닝을 수행할 수 있다. 즉, 가상 작업자는 미니 배치 slocal + 1까지의 작업이 완료될 때까지 기다리지 않고 갱신된 모델 파라미터를 사용하여 미니 배치 slocal + 2의 처리를 시작할 수 있다. When a virtual worker starts processing a new mini-batch, it can use the most recent value of the local model parameter (w local ) without waiting for the model parameters to be updated by other mini-batches. For example, suppose that the virtual worker updated the local model parameter (w local ) with an update value (u 1 ) corresponding to mini-batch 1 calculated by processing mini-batch 1. In this case, the virtual worker trains the neural network model using the most recent values of the local model parameters without waiting until the local model parameters are updated by other mini-batches when processing mini-batch 2 following mini-batch 1. can be performed. That is, the virtual worker has a mini-batch s local Without waiting for the jobs up to + 1 to complete, we can start processing the mini-batch s local + 2 using the updated model parameters.

이와 유사하게, 가상 작업자가 미니 배치 slocal + 1의 작업을 완료하고, 갱신치(uslocal+ 1)에 의해 로컬 모델 파라미터(wlocal)를 갱신하면, 가상 작업자는 이전의 가장 최근의 slocal 미니 배치의 처리가 완료되기를 기다리지 않고 미니 배치 2 X (slocal + 1)의 처리를 시작할 수 있다. 따라서, 미니 배치 1에서 slocal + 1까지의 초기 미니 배치들을 제외하고, 미니 배치 p에 대해 가상 작업자는 미니 배치 1에서 미니 배치 p-(slocal + 1)까지의 모든 갱신치들을 반영하는 로컬 모델 파라미터들을 사용할 수 있다. 이때, 미니 배치 p를 처리하는 GPU는 모든 미니 배치 p에 대해, 미니 배치 p의 역방향 패스가 실행될 때까지 미니 배치 p에 대응한 모델 파라미터(wp)를 메모리에 보관해야 한다. Similarly, when a virtual worker completes work in mini-batch s local + 1 and updates a local model parameter (w local ) by an update value (us local+ 1 ), the virtual worker returns to the previous most recent s local mini-batch. You can start processing mini-batch 2 X (s local + 1) without waiting for the batch to finish processing. Thus, for mini-batch p, except for the initial mini-batches from mini-batch 1 to s local + 1, the virtual worker is a local that reflects all updates from mini-batch 1 to mini-batch p-(s local + 1). Model parameters can be used. At this time, the GPU processing mini-batch p must store model parameters (w p ) corresponding to mini-batch p in memory until the reverse pass of mini-batch p is executed for all mini-batch p.

이하에서는 일 실시예에 따른 클러스터 시스템이 다수의 가상 작업자들을 이용하여 데이터 병렬 처리를 수행하는 방법을 설명한다. Hereinafter, a method of performing data parallel processing using a plurality of virtual workers in a cluster system according to an embodiment will be described.

일 실시예에 따르면, 이기종의 GPU들로 구성된 가상 작업자들에 의해 데이터 병렬 처리(DP)를 수행할 수 있다. According to an embodiment, data parallel processing (DP) may be performed by virtual workers composed of heterogeneous GPUs.

데이터 병렬 처리가 심층 신경망의 실행을 촉진하는 데 도움이 되는 것으로 잘 알려져 있다. 하지만, 작업자들이 거대의 심층 신경망 모델을 처리하기에 충분한 자원을 가지고 있지 않으므로 일반적인 시스템에서의 데이터 병렬 처리는 개별 GPU들에서는 불가능하다. It is well known that data parallelism helps facilitate the execution of deep neural networks. However, parallel processing of data in a general system is not possible on discrete GPUs because workers do not have enough resources to process large deep neural network models.

일 실시예에서는 자원이 부족한 이기종의 GPU들에 의해 가상 작업자를 구성함으로써, 이기종의 GPU들이 데이터 병렬 처리를 수행하도록 할 수 있다. 또한, 일 실시예에서는 가상 작업자들 각각의 로컬 스테일니스를 고려하여 가상 작업자들에 의한 데이터 병렬 처리를 수행할 수 있다. In an embodiment, by configuring a virtual worker with heterogeneous GPUs having insufficient resources, the heterogeneous GPUs may perform data parallel processing. In addition, in an embodiment, data parallel processing by virtual workers may be performed in consideration of local staleness of each of the virtual workers.

이하에서는 전술한 가상 작업자들 각각의 로컬 스테일니스에 더하여, 가상 작업자들 사이에서 데이터 병렬 처리로부터 얻은 결과를 처리하는 방법을 설명한다. Hereinafter, in addition to the aforementioned local staleness of each of the virtual workers, a method of processing results obtained from data parallel processing among virtual workers will be described.

전형적인 데이터 분산 처리로서, 가상 작업자들은 정기적으로 갱신된 값을 파라미터 서버(410)로 보내 글로벌 모델 파라미터들(global model parameters)을 동기화할 수 있다. As a typical data distribution process, virtual workers can synchronize global model parameters by periodically sending updated values to parameter server 410 .

일 실시예에서 글로벌 파라미터들의 동기화는 클럭 단위(clock)로 발생한다고 가정할 수 있다. 여기서, '클럭 단위'는 하나의 웨이브(Wave; W)를 완료하는 진행으로 정의될 수 있다. 웨이브는 전술한 것과 같이 가상 작업자에서 동시에 처리되는 일련의 미니 배치들에 해당할 수 있다. In one embodiment, it may be assumed that synchronization of global parameters occurs clockwise. Here, 'clock unit' may be defined as a progress to complete one wave (Wave; W). A wave may correspond to a series of mini-batches that are simultaneously processed on a virtual worker as described above.

보다 구체적으로, 웨이브(wave)는 가상 작업자가 동일한 웨이브에서 이전의 미니 배치로부터의 갱신없이 해당 웨이브에서 이후의 미니 배치를 처리할 수 *?*있도록 동시에 실행되는 일련의 slocal + 1 개의 미니 배치들일 수 있다. More specifically, a wave is a series of s locals + 1 mini-batches running concurrently to allow virtual workers to process subsequent mini-batches in that wave without updating from previous mini-batches in the same wave. can be picked up

SSP 모델과 유사하게, 일 실시예에 따른 가상 작업자들 각각은 파라미터 서버(410)가 모든 가상 작업자들의 로컬 클럭 clocal의 최소 값을 가지는 글로벌 클럭 cglobal을 유지하는 동안 로컬 클럭 clocal을 유지할 수 있다. Similar to the SSP model, each of the virtual workers according to an embodiment may maintain the local clock c local while the parameter server 410 maintains the global clock c global having the minimum value of the local clock c local of all virtual workers. there is.

초기에, 로컬 클럭과 글로벌 클럭은 0으로 설정될 수 있고, 매 클럭 c의 끝에서, 각 가상 작업자는 웨이브 c에서의 모든 미니 배치들의 실행을 완료할 수 있다. Initially, the local clock and global clock may be set to 0, and at the end of every clock c, each virtual worker may complete execution of all mini-batches in wave c.

가상 작업자는 모든 미니 배치들의 실행이 완료되는 시점에, 미니 배치 c x (slocal + 1) + 1로부터 미니 배치 (c + 1) x (slocal + 1)까지의 집계된 갱신치

Figure 112020071041009-pat00001
를 산출하고, 집계된 갱신치
Figure 112020071041009-pat00002
를 파라미터 서버(410)로 푸시할 수 있다. 집계된 갱신치
Figure 112020071041009-pat00003
는 클럭 값 c와 동기화될 수 있다. The virtual worker is the aggregated update from mini-batch cx (s local + 1) + 1 to mini-batch (c + 1) x (s local + 1) at the time all mini-batches have finished running.
Figure 112020071041009-pat00001
, and the aggregated update value
Figure 112020071041009-pat00002
can be pushed to the parameter server 410. aggregated update
Figure 112020071041009-pat00003
may be synchronized with the clock value c.

예를 들어, 로컬 스테일니스의 임계값(slocal) = 3인 경우, 도 4에서 볼 수 있듯이 가상 작업자는 클럭 0의 끝에서 (1에서 4까지의 미니 배치들로 구성된) 웨이브 0의 집계된 갱신치를 파라미터 서버(410)에 푸시할 수 있다. 또한, 가상 작업자는 클럭 1의 끝에서 (5에서 8까지의 미니 배치들로 구성된) 웨이브 1의 집계된 갱신치를 파라미터 서버(410)에 푸시할 수 있다. For example, if the threshold of local stiffness (s local ) = 3, as shown in FIG. Updates can be pushed to the parameter server 410 . Also, the virtual worker can push the aggregated updates of wave 1 (consisting of mini-batches from 5 to 8) to the parameter server 410 at the end of clock 1.

일 실시예에 따른 WSP(Wave Synchronous Parallel) 모델에서 가상 작업자는 모든 미니 배치에 대한 갱신치를 푸시하는 대신, 모든 웨이브에 대한 갱신치

Figure 112020071041009-pat00004
를 파라미터 서버(410)로 푸시하므로 통신 오버 헤드를 크게 줄일 수 있다. In the Wave Synchronous Parallel (WSP) model according to an embodiment, virtual workers push updates for all mini-batches instead of pushing updates for all waves.
Figure 112020071041009-pat00004
Since is pushed to the parameter server 410, communication overhead can be greatly reduced.

일 실시예에 따른 파라미터 서버(410)는 가상 작업자로부터 갱신치를 수신하면, 다음과 같이 모델 파라미터들의 글로벌 버전을 갱신할 수 있다. Upon receiving updated values from the virtual worker, the parameter server 410 according to an embodiment may update the global version of model parameters as follows.

Wglobal = Wglobal +

Figure 112020071041009-pat00005
W global = W global +
Figure 112020071041009-pat00005

파라미터 서버(410)는 모든 가상 작업자들이 웨이브 c의 집계된 갱신치들을 푸시한 후에야 글로벌 클럭 Cglobal을 c + 1로 할 수 있다. The parameter server 410 can set the global clock C global to c + 1 only after all virtual workers have pushed the aggregated updates of wave c.

WSP(Wave Synchronous Parallel) 모델에서, 각 가상 작업자는 모든 웨이브에 대한 글로벌 모델 파라미터와 동기화하지 않고 트레이닝을 진행할 수 있다. 따라서, 파라미터 서버(410)에 의해 수신된 가장 최신의 갱신치가 로컬 버전의 모델 파라미터에 반영되지 않을 수 있으므로, 글로벌 관점에서 볼 때 가상 작업자는 갱신되지 않은 모델 파라미터를 사용할 수 있다. In the Wave Synchronous Parallel (WSP) model, each virtual operator can train without synchronization with the global model parameters for all waves. Therefore, since the most recent updates received by the parameter server 410 may not be reflected in the model parameters of the local version, the virtual worker may use the model parameters that are not updated from a global perspective.

이하에서는 일 실시예에서 가상 작업자들 사이에 발생하는 글로벌 스테일니스가 제한되는지를 해결하는 방법을 설명한다. Hereinafter, a method for solving whether global staleness occurring between virtual workers is limited in one embodiment will be described.

예를 들어, 일 실시예에 따른 클러스터 시스템에서 두 가상 작업자의 로컬 클럭 clocal 값들 사이의 최대 차이를 '클럭 거리(clock distance; D)'라고 정의할 수 있다. 즉, 클럭 거리는 클러스터 시스템 내의 가장 빠른 가상 작업자와 가장 느린 가상 작업자 간의 로컬 클럭(Clocal)의 차이에 해당할 수 있다. For example, in a cluster system according to an embodiment, a maximum difference between local clock c local values of two virtual workers may be defined as 'clock distance (D)'. That is, the clock distance may correspond to a difference in local clocks (C local ) between the fastest virtual worker and the slowest virtual worker in the cluster system.

WSP(Wave Synchronous Parallel) 모델에서 최대 클럭 거리는 최대 D이고, D는 사용자에 의해 설정되는 임계 값일 수 있다. In the Wave Synchronous Parallel (WSP) model, the maximum clock distance is maximum D, and D may be a threshold value set by the user.

따라서, c ≥ D + 1 인 로컬 클럭 c을 가진 가상 작업자는 웨이브 0에서 c-D-1까지 또는 그 이상으로부터 모든 (집계된) 갱신치들을 포함하는 모델 파라미터들을 사용해야 한다. 즉, 0에서 c-D-1 사이의 웨이브들로부터의 어떤 갱신치라도 배제된 모델 파라미터를 사용하는 것은 허용되지 않는다. 따라서 가상 작업자는 가장 최근의 웨이브 D 까지의 갱신치가 없이 다음 미니 배치에 대한 트레이닝을 진행할 수 있다.Thus, a hypothetical worker with a local clock c such that c ≥ D + 1 should use model parameters that include all (aggregated) updates from wave 0 to c-D-1 or beyond. That is, it is not allowed to use model parameters excluded from any updates from waves from 0 to c-D-1. Therefore, the virtual worker can proceed with training for the next mini-batch without update values up to the most recent wave D.

이러한 클럭 거리를 유지하기 위해, 가상 작업자가 클럭 c의 끝에서 파라미터 서버(410)로부터 글로벌 모델 파라미터들을 풀(pull)하는 경우, 다른 가상 작업자들이 웨이브 c-D의 완료에 의한 갱신치를 파라미터 서버(410)에 푸시할 때까지 기다려야 할 수도 있다.To maintain this clock distance, if a virtual worker pulls the global model parameters from parameter server 410 at the end of clock c, other virtual workers will return updates by the completion of wave c-D to parameter server 410. You may have to wait until you push to .

하지만, 가상 작업자가 다른 가상 작업자들이 클럭 c의 끝에서 따라잡을 때까지 기다리는 동안, 미니 배치가 파이프 라인 방식으로 실행됨에 따라 웨이브 c + 1의 slocal 미니 배치들의 처리가 이미 진행됐을 수 있다. However, while the virtual worker waits for the other virtual workers to catch up at the end of clock c, processing of the s local mini-batches of wave c + 1 may have already progressed as the mini-batches are executed in a pipelined fashion.

예를 들어, 도 4에서 D = 0 이라고 가정하자. For example, assume that D = 0 in FIG. 4 .

이 경우, 미니 배치 4의 처리가 완료되면, 가상 작업자 1은 미니 배치 1~ 4로 구성된 웨이브 0에서 집계된 갱신치

Figure 112020071041009-pat00006
를 계산하고, 집계된 갱신치
Figure 112020071041009-pat00007
를 파라미터 서버(410)로 푸시할 수 있다. 가상 작업자 1은 웨이브 0의 처리가 완료된 클럭 1에서 미니 배치 8의 처리를 진행하기 전에 다른 가상 작업자가 웨이브 0을 완료할 때까지 기다릴 수 있다. 하지만, 이때에 가상 작업자 1은 웨이브 1에 속하는 미니 배치 5, 6 및 7에 대한 처리를 이미 시작한 상황이다. In this case, when processing of mini-batch 4 is complete, virtual worker 1 is the aggregated update from wave 0 consisting of mini-batches 1 to 4.
Figure 112020071041009-pat00006
, and the aggregated update value
Figure 112020071041009-pat00007
can be pushed to the parameter server 410. Virtual worker 1 may wait until another virtual worker completes wave 0 before proceeding to process mini-batch 8 at clock 1 when processing of wave 0 is complete. However, at this time, virtual worker 1 has already started processing mini-batches 5, 6, and 7 belonging to wave 1.

마찬가지로, 미니 배치 8의 처리를 완료하면, 가상 작업자 1은 미니 배치 5 ~ 8로 구성된 웨이브 1에서 집계된 갱신치

Figure 112020071041009-pat00008
를 계산하고, 집계된 갱신치
Figure 112020071041009-pat00009
를 파라미터 서버(410)로 푸시할 수 있다. 그동안 가상 작업자 1은 웨이브 2에 속하는 미니 배치 9, 10 및 11에 대한 처리를 이미 시작한 상황이다. Similarly, upon completion of processing of mini-batches 8, virtual worker 1 is the aggregated update from wave 1 consisting of mini-batches 5 to 8.
Figure 112020071041009-pat00008
, and the aggregated update value
Figure 112020071041009-pat00009
can be pushed to the parameter server 410. In the meantime, virtual worker 1 has already started processing mini-batches 9, 10 and 11 belonging to wave 2.

가상 작업자에서 이러한 로컬 미니 배치들의 처리는 로컬 스테일니스 경계(local staleness bound)를 위반하지 않는다. 또한, D = 0 인 경우, 각 가상 작업자는 모든 클럭의 끝에서 서로를 기다려 모든 웨이브의 모델 파라미터를 동기화하고, 이는 실제로 각 가상 작업자에서 파이프라인 방식에 의해 BSP 모델과 유사한 동작을 보여준다. The processing of these local mini-batches in the virtual worker does not violate the local staleness bound. In addition, when D = 0, each virtual worker waits for each other at the end of every clock to synchronize the model parameters of all waves, which actually shows a behavior similar to the BSP model by pipeline method in each virtual worker.

일 실시예에 따른 클러스터 시스템은 가상 작업자가 미니 배치의 처리를 진행할 수 있도록, 시스템 내의 다른 모든 가상 작업자들이 전역적으로 계산한 가장 최근의 미니 배치에서 누락된 갱신치들의 최대 개수를 '글로벌 스테일니스 경계(sglobal)'로 정의할 수 있다. A cluster system according to an embodiment sets the maximum number of missing updates in the most recent mini-batch computed globally by all other virtual workers in the system to 'global staleness' so that the virtual worker can proceed with processing the mini-batch. Boundary (s global )' can be defined.

클러스터 시스템의 각 가상 작업자는 글로벌 스테일니스 경계(sglobal)를 통해 현재 미니 배치의 처리를 진행할 수 있는지 여부를 결정할 수 있다.Each virtual worker in the cluster system has a global staleness boundary ( s global ) that allows it to decide whether it can proceed with processing of the current mini-batch.

우선, 클러스터 시스템의 모든 가상 작업자들은 파라미터 서버(410)에 글로벌 모델 파라미터들을 쿼리(query)하지 않고, 첫 번째 (D + 1) 웨이브들의 처리를 시작할 수 있다. 또한, 가상 작업자들은 전술한 최신의 갱신치들을 포함하는 글로벌 모델 파라미터들을 수신하기 전에 다음 웨이브의 로컬 스테일니스(slocal) 미니 배치들을 처리할 수 있다. 따라서, 가상 작업자들은 초기 미니 배치들을 처리하는 경우, 초기 모델 파라미터(w0) 또는 최근 로컬 갱신치들을 포함하는 모델 파라미터를 사용할 수 있다. First, all virtual workers in the cluster system can start processing the first (D + 1) waves without querying the parameter server 410 for global model parameters. Additionally, virtual workers can process local s local mini-batches of the next wave before receiving the global model parameters containing the latest updates described above. Thus, virtual workers can use initial model parameters (w 0 ) or model parameters that include recent local updates when processing initial mini-batches.

이후, p > (D+ 1) x (slocal + 1) + slocal 인 미니 배치 p에 대해, 미니 배치 p는 최소한 미니 배치 1에서 미니 배치 p-(sglobal + 1)까지의 다른 모든 가상 작업자들로부터의 모든 글로벌 갱신치들을 반영하는 모델 파라미터를 사용할 수 있다. 여기서 sglobal = (D + 1) x (slocal + 1) + slocal - 1 일 수 있다. Then, for a mini-batch p such that p > (D+ 1) x (s local + 1) + s local , mini-batch p is equal to all other virtual workers from at least mini-batch 1 to mini-batch p - (s global + 1). We can use model parameters that reflect all global updates from Here, s global = (D + 1) x (s local + 1) + s local - 1.

이 방정식의 첫 번째 텀은 가상 작업자가 다음 (D+1) 웨이브들(즉, (D + 1) x (slocal + 1 )인 미니 배치들로 구성됨)로 진행하도록 허용될 수 있음에 따른 것이고, 두 번째 텀은 추가적인 로컬 미니 배치들 slocal 이 파이프라인 실행으로 인해 시작될 수 있음에 따른 것이다.The first term of this equation states that the virtual operator can generate the next (D+1) waves (i.e., (D + 1) x (s local + 1 ), the second term according to which additional local mini-batches s local may be started due to pipeline execution.

또한, 가상 작업자는 미니 배치들 5 ~ 8로 구성된 웨이브 1로부터의 글로벌 갱신치들 및/또는 로컬 갱신치들, 또는 미니 배치들 9와 10으로부터의 2 개의 로컬 갱신치들이 없이 미니 배치 11의 트레이닝을 진행할 수 있다. 하지만, 가상 작업자들은 미니 배치들 1~4로부터의 모든 글로벌 갱신치들은 있어야 트레이닝을 진행할 수 있다. In addition, the virtual worker will undergo training on mini-batch 11 without global updates and/or local updates from wave 1 consisting of mini-batches 5-8, or two local updates from mini-batches 9 and 10. can However, virtual workers must have all global updates from mini-batches 1-4 to proceed with training.

도 5는 일 실시예에 따라 파이프 라인 방식으로 실행되는 여러 가상 작업자들이 데이터 병렬화를 실행하는 방법을 설명하기 위한 도면이다. 도 5를 참조하면, 일 실시예에 따라 n 개의 가상 작업자들을 포함하는 클러스터 시스템이 도시된다. 5 is a diagram for explaining a method of executing data parallelization by several virtual workers executed in a pipeline manner according to an embodiment. Referring to FIG. 5 , a cluster system including n virtual workers is shown according to an embodiment.

일 실시예에 따른 파이프라인 모델은 단일 GPU에서 실행할 수 없는 거대 심층 신경망 모델의 실행을 위한 것이다. 일 실시예에 따른 파이프라인 모델은 이기종의 GPU들로 구성된 n개의 가상 작업자들에 의해 데이터 병렬 처리를 수행하는 한편, 웨이브의 종료 시마다 가상 작업자에 의해 파라미터 서버(510)로 푸시되는 갱신치에 의해 파이프라인 모델이 수렴(convergence)한다는 정확한 결과를 제공할 수 있다. A pipeline model according to an embodiment is for execution of a large deep neural network model that cannot be executed on a single GPU. The pipeline model according to an embodiment performs data parallel processing by n virtual workers composed of heterogeneous GPUs, and updates are pushed to the parameter server 510 by the virtual workers every time a wave ends. It can provide accurate results that the pipeline model converges.

도 6은 일 실시예에 따른 클러스터 시스템의 동작 방법을 나타낸 흐름도이다. 도 6을 참조하면, 일 실시예에 따른 클러스터 시스템은 프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당한다(610). 신경망 모델은 예를 들어, 신경망 모델의 트레이닝에 필요한 메모리 용량이 프로세싱 유닛들 중 어느 하나의 프로세싱 유닛의 메모리를 초과하는 거대 심층 신경망 모델일 수 있다.6 is a flowchart illustrating a method of operating a cluster system according to an exemplary embodiment. Referring to FIG. 6 , the cluster system according to an embodiment allocates processing units to virtual workers corresponding to a neural network model to be trained (610). The neural network model may be, for example, a large deep neural network model in which a memory capacity required for training the neural network model exceeds the memory of any one of the processing units.

클러스터 시스템은 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할한다(620). 이때, 파티션들은 복수의 계층들 중 적어도 일부의 계층을 복제한 것이다. The cluster system partitions the neural network model into a number of partitions corresponding to the processing units assigned to each of the virtual workers (620). At this time, the partitions are duplicates of at least some of the layers among the plurality of layers.

단계(620)에서, 클러스터 시스템은 미니 배치들의 처리에 따른 프로세싱 유닛들의 메모리 요구 사항 및 파티션들의 실행 시간 중 적어도 하나에 기초하여 신경망 모델을 파티션들로 분할할 수 있다. 이때, 프로세싱 유닛들의 메모리 요구 사항은 예를 들어, 파이프라인 방식에서 미니 배치들을 처리하는 단계 별로 달라질 수 있다. 또한, 파티션들의 실행 시간은 예를 들어, 파티션에 포함된 모든 계층의 계산 시간과 정방향 패스에서 발생하는 활성화 값 및 역방향 패스에서 발생하는 로컬 그래디언트를 수신하는 데에 필요한 통신 시간의 합으로 계산될 수 있다.In step 620, the cluster system may divide the neural network model into partitions based on at least one of memory requirements of processing units according to processing of mini-batches and execution times of partitions. At this time, the memory requirements of the processing units may vary for each stage of processing mini-batches in a pipeline method, for example. In addition, the execution time of the partitions may be calculated as, for example, the sum of the computation time of all layers included in the partition and the communication time required to receive the activation value occurring in the forward pass and the local gradient occurring in the backward pass. there is.

클러스터 시스템은 단계(620)에서 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링한다(630). 단계(630)에서 클러스터 시스템은 예를 들어, 미니 배치들에 대한 역방향 패스 작업들에 정방향 패스 작업들보다 높은 우선 순위를 부여하여 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링할 수 있다. 또는 클러스터 시스템은 미니 배치들에 대한 역방향 패스 작업들과 정방향 패스 작업들을 선입 선출(FIFO) 스케줄링 정책에 따라 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링할 수 있다. The cluster system schedules mini-batches corresponding to the partitions divided in step 620 to each of the processing units assigned to the virtual workers (630). In step 630, the cluster system may schedule each of the processing units assigned to the virtual workers by assigning a higher priority to the reverse pass tasks for the mini-batches than the forward pass tasks, for example. Alternatively, the cluster system may schedule reverse pass jobs and forward pass jobs for mini-batches to each of the processing units assigned to the virtual workers according to a first-in-first-out (FIFO) scheduling policy.

클러스터 시스템은 예를 들어, 미니 배치들의 처리 시에 사용되는 모델 파라미터들의 스테일니스(staleness)를 고려하여 미니 배치들을 프로세싱 유닛들에게 스케줄링할 수 있다. 프로세싱 유닛들은 예를 들어, 이종의 그래픽 프로세싱 유닛들(GPUs)을 포함할 수 있다. 가상 작업자들 각각에서 동시에 실행되는 최대 미니 배치들의 개수는 예를 들어, 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 기초하여 결정될 수 있다.The cluster system may schedule mini-batches to processing units, for example, taking into account the staleness of model parameters used in the processing of mini-batches. The processing units may include, for example, heterogeneous graphics processing units (GPUs). The maximum number of mini-batches concurrently running on each of the virtual workers may be determined based on memory requirements for training of the neural network model, for example.

클러스터 시스템은 가상 작업자들에 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 단계(630)에서 스케줄링된 미니 배치들을 처리함으로써 신경망 모델을 트레이닝한다(640). 프로세싱 유닛들 각각은 프로세싱 유닛들 각각에게 할당된 파티션의 계층에 대해 정방향 패스의 동작 및 역방향 패스의 동작을 모두 실행할 수 있다.The cluster system trains the neural network model (640) by processing the mini-batches scheduled at step 630 in a pipelined manner by the processing units assigned to the virtual workers. Each of the processing units may execute both forward pass and reverse pass operations for the hierarchy of partitions assigned to each of the processing units.

프로세싱 유닛들 각각은 정방향 패스의 동작 동안 미니 배치들 중 제1 미니 배치에 해당하는 입력 데이터에 대해 계산된 활성화 값을 제1 미니 배치의 역방향 패스의 동작이 실행될 때까지 해당 프로세싱 유닛의 메모리에 유지할 수 있다. 가상 작업자들 각각은 미니 배치들 중 제1 미니 배치를 처리함으로써 산출된 제1 미니 배치에 대응하는 갱신치에 의해 로컬 모델 파라미터를 갱신할 수 있다. 또한, 가상 작업자들 각각은 제1 미니 배치에 연속하는 제2 미니 배치의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 로컬 모델 파라미터의 가장 최근 값을 사용하여 신경망 모델의 트레이닝을 수행할 수 있다. 클러스터 시스템은 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지할 수 있다. Each of the processing units maintains an activation value calculated for input data corresponding to a first mini-batch among mini-batches during the forward pass operation in the memory of the corresponding processing unit until the backward pass operation of the first mini-batch is executed. can Each of the virtual workers may update the local model parameter by an update value corresponding to the first mini-batch calculated by processing the first mini-batch among the mini-batches. In addition, each of the virtual workers does not wait until local model parameters are updated by other mini-batches when processing a second mini-batch following the first mini-batch, and uses the most recent value of the local model parameters to generate a neural network. You can do model training. Cluster systems can maintain global model parameters to support data parallelism among virtual workers.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(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. Program commands recorded on the medium may be specially designed and configured for the embodiment or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media, and ROM, RAM, flash memory, and the like. 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. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(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. , or may be permanently or temporarily embodied in a transmitted signal wave. 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.

이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited drawings, those skilled in the art can apply various technical modifications and variations based on the above. 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.

300: 클러스터 시스템
305: 심층 신경망 모델
310: 자원 할당자
330: 모델 분할자
350: 파라미터 서버
300: cluster system
305: deep neural network model
310: resource allocator
330: model divider
350: parameter server

Claims (25)

프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 자원 할당자(Resource Allocator);
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할하는 모델 분할자(model petitioner); 및
상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 파라미터 서버(Parameter server)
를 포함하고,
상기 가상 작업자들 각각은
상기 가상 작업자들 각각에서 이전의 미니 배치로부터 계산된 모델 파라미터에 대한 갱신없이 동시에 처리되는 미니 배치들을 포함하는 웨이브(Wave)를 기초로, 상기 웨이브에 포함된 미니 배치들에서 집계된 상기 모델 파라미터에 대한 갱신치를 한 번에 상기 파라미터 서버로 푸시하는,
클러스터 시스템.
a resource allocator for allocating processing units to virtual workers corresponding to a neural network model to be trained;
a model petitioner dividing the neural network model into a number of partitions corresponding to processing units assigned to each of the virtual workers; and
A parameter server that maintains global model parameters to support data parallelism among the virtual workers.
including,
Each of the virtual workers
Based on a wave that includes mini-batches that are simultaneously processed without updating the model parameters calculated from previous mini-batches in each of the virtual workers, the model parameters aggregated from the mini-batches included in the wave Pushing updates to the parameter server at a time,
cluster system.
제1항에 있어서,
상기 자원 할당자는
상기 가상 작업자들에 대한 자원 할당 정책에 기초하여 상기 프로세싱 유닛들을 상기 신경망 모델에 대응하는 상기 가상 작업자들 각각에게 할당하는,
클러스터 시스템.
According to claim 1,
The resource allocator
allocating the processing units to each of the virtual workers corresponding to the neural network model based on a resource allocation policy for the virtual workers;
cluster system.
프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 자원 할당자(Resource Allocator);
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할하는 모델 분할자(model petitioner); 및
상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 파라미터 서버(Parameter server)
를 포함하고,
상기 자원 할당자는
상기 가상 작업자들에 대한 자원 할당 정책에 기초하여 상기 프로세싱 유닛들을 상기 신경망 모델에 대응하는 상기 가상 작업자들 각각에게 할당하며,
상기 자원 할당 정책은
상기 가상 작업자들의 활성화(activation) 값과 그래디언트(gradient)의 전송 및 상기 가상 작업자들과 상기 파라미터 서버 간의 모델 파라미터의 동기화 시에 발생하는 통신 오버 헤드 및 상기 프로세싱 유닛들 각각의 성능 중 적어도 하나에 기초하여 결정되는,
클러스터 시스템.
a resource allocator for allocating processing units to virtual workers corresponding to a neural network model to be trained;
a model petitioner dividing the neural network model into a number of partitions corresponding to processing units assigned to each of the virtual workers; and
A parameter server that maintains global model parameters to support data parallelism among the virtual workers.
including,
The resource allocator
Allocating the processing units to each of the virtual workers corresponding to the neural network model based on a resource allocation policy for the virtual workers;
The resource allocation policy is
Based on at least one of performance of each of the processing units and communication overhead occurring when transmitting activation values and gradients of the virtual workers and synchronizing model parameters between the virtual workers and the parameter server. determined by
cluster system.
제1항에 있어서,
상기 자원 할당자는
이기종 또는 동일 기종의 상기 프로세싱 유닛들을 상기 가상 작업자들 각각에게 동일 개수로 균등하게 할당하거나, 또는
상기 이기종 또는 동일 기종의 프로세싱 유닛들을 상기 가상 작업자들 각각에게 상이한 개수로 할당하는,
클러스터 시스템.
According to claim 1,
The resource allocator
The same number of processing units of the same or different types are equally allocated to each of the virtual workers, or
Allocating a different number of the heterogeneous or the same type of processing units to each of the virtual workers,
cluster system.
프로세싱 유닛들을 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 자원 할당자(Resource Allocator);
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들로 분할하는 모델 분할자(model petitioner); 및
상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 파라미터 서버(Parameter server)
를 포함하고,
상기 자원 할당자는
이기종 또는 동일 기종의 상기 프로세싱 유닛들을 상기 가상 작업자들 각각에게 동일 개수로 균등하게 할당하거나, 또는 상기 이기종 또는 동일 기종의 프로세싱 유닛들을 상기 가상 작업자들 각각에게 상이한 개수로 할당하며,
상기 자원 할당자가 상기 프로세싱 유닛들을 상기 가상 작업자들 각각에게 동일 개수로 균등하게 할당하고, 상기 가상 작업자들에 대한 데이터 병렬화가 수행되는 경우,
상기 파라미터 서버는
클러스터 시스템의 어느 한 노드에서 실행되는 파티션에 해당하는 레이어를 상기 프로세싱 유닛들에게 분산하여 배치하는,
클러스터 시스템.
a resource allocator for allocating processing units to virtual workers corresponding to a neural network model to be trained;
a model petitioner dividing the neural network model into a number of partitions corresponding to processing units assigned to each of the virtual workers; and
A parameter server that maintains global model parameters to support data parallelism among the virtual workers.
including,
The resource allocator
equally assigning the same number of processing units of the same or different types to each of the virtual workers, or allocating different numbers of processing units of the same or different types to each of the virtual workers;
When the resource allocator equally allocates the same number of processing units to each of the virtual workers, and data parallelization is performed for the virtual workers,
The parameter server
Distributing and distributing a layer corresponding to a partition executed in any one node of the cluster system to the processing units,
cluster system.
제1항에 있어서,
상기 모델 분할자는
상기 프로세싱 유닛들이 사용되는 파이프라인의 처리 과정에서 변화되는 메모리 요구 사항 및 상기 파티션들의 실행 시간 중 적어도 하나를 고려하여 상기 신경망 모델을 상기 가상 작업자들에 대응하는 개수의 파티션들로 분할하는,
클러스터 시스템.
According to claim 1,
The model divider is
Dividing the neural network model into a number of partitions corresponding to the virtual workers in consideration of at least one of a memory requirement and an execution time of the partitions, which are changed during processing of a pipeline in which the processing units are used,
cluster system.
삭제delete 제1항에 있어서,
상기 가상 작업자들 각각은
데이터 병렬화를 위해 파이프라인을 구성하는 상기 가상 작업자들 각각에서 동시에 실행되는 미니 배치들을 포함하는 하나의 웨이브의 종료 시점에, 해당 웨이브에 포함된 미니 배치들에서 집계된 갱신치를 상기 파라미터 서버로 푸시(Push)하고, 상기 파라미터 서버에 저장된 갱신치를 풀(Pull) 함으로써 상기 모델 파라미터를 동기화하는,
클러스터 시스템.
According to claim 1,
Each of the virtual workers
At the end of one wave including mini-batches simultaneously executed in each of the virtual workers constituting the pipeline for data parallelization, the updated values aggregated in the mini-batches included in the wave are pushed to the parameter server ( Push) and synchronize the model parameters by pulling updated values stored in the parameter server.
cluster system.
제1항에 있어서,
상기 글로벌 모델 파라미터는
상기 가상 작업자들 각각에서 동시에 실행되는 미니 배치들을 포함하는 하나의 웨이브의 종료 시점에 대응하는 로컬 클럭(clock) 단위로 정기적으로 갱신된 값에 의해 동기화되는,
클러스터 시스템.
According to claim 1,
The global model parameters are
Synchronized by a value regularly updated in units of local clocks corresponding to the end of one wave including mini-batches simultaneously executed on each of the virtual workers,
cluster system.
제1항에 있어서,
상기 가상 작업자들 각각은
모든 웨이브들에 대한 갱신치를 상기 파라미터 서버로 푸시함으로써 상기 글로벌 모델 파라미터들을 갱신하는,
클러스터 시스템.
According to claim 1,
Each of the virtual workers
updating the global model parameters by pushing updates for all waves to the parameter server;
cluster system.
제1항에 있어서,
상기 가상 작업자들 각각은
상기 가상 작업자들 각각에서 동시에 실행되는 미니 배치들 중 제1 미니 배치를 처리함으로써 산출된 상기 제1 미니 배치에 대응하는 갱신치에 의해 로컬 모델 파라미터를 갱신하고,
상기 제1 미니 배치에 연속하는 제2 미니 배치의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 상기 로컬 모델 파라미터의 가장 최근 값을 사용하여 상기 신경망 모델의 트레이닝을 수행하는,
클러스터 시스템.
According to claim 1,
Each of the virtual workers
Updating a local model parameter by an update value corresponding to the first mini-batch calculated by processing a first mini-batch among mini-batches simultaneously executed in each of the virtual workers;
When processing a second mini-batch subsequent to the first mini-batch, the neural network model is trained using the most recent value of the local model parameters without waiting for local model parameters by other mini-batches to be updated. performing,
cluster system.
제1항에 있어서,
상기 가상 작업자들 각각에서 동시에 실행되는 최대 미니 배치들의 개수는
상기 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 기초하여 결정되는,
클러스터 시스템.
According to claim 1,
The maximum number of mini-batches concurrently running on each of the virtual workers is
Determined based on memory requirements for training of the neural network model,
cluster system.
제1항에 있어서,
상기 가상 작업자들 각각에서 실행되는 최대 미니 배치들의 개수는
상기 가상 작업자들 각각에 할당된 프로세싱 유닛들에서 미니 배치의 역방향 패스의 동작을 실행하기 전에 정방향 패스의 동작을 위해 상기 프로세싱 유닛들에서 처리할 수 있는 최대 미니 배치들의 개수에 의해 결정되는,
클러스터 시스템.
According to claim 1,
The maximum number of mini-batches executed on each of the virtual workers is
Determined by the maximum number of mini-batches that can be processed by the processing units for the forward pass operation before executing the reverse pass operation of the mini-batch in the processing units assigned to each of the virtual workers.
cluster system.
제13항에 있어서,
상기 최대 미니 배치들의 개수는
상기 정방향 패스의 동작과 상기 역방향 패스의 동작 간의 실행 비율, 및 파이프라인 방식에 의한 상기 미니 배치들의 처리 시에 사용되는 상기 프로세싱 유닛들의 개수에 기초하여 결정되는,
클러스터 시스템.
According to claim 13,
The maximum number of mini-batches is
Determined based on the execution ratio between the operation of the forward pass and the operation of the backward pass, and the number of processing units used in processing the mini-batches by a pipeline method,
cluster system.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 가상 작업자들 각각은
상기 가상 작업자들 각각에서 이전의 미니 배치로부터 계산된 모델 파라미터에 대한 갱신없이 동시에 처리되는 미니 배치들을 포함하는 웨이브(Wave)를 기초로, 상기 웨이브에 포함된 미니 배치들에서 집계된 상기 모델 파라미터에 대한 갱신치를 한 번에 파라미터 서버로 푸시하는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
Each of the virtual workers
Based on a wave that includes mini-batches that are simultaneously processed without updating the model parameters calculated from previous mini-batches in each of the virtual workers, the model parameters aggregated from the mini-batches included in the wave pushes the updates to the parameter server at once,
How cluster systems work.
제15항에 있어서,
상기 분할하는 단계는
상기 미니 배치들의 처리에 따른 상기 프로세싱 유닛들의 메모리 요구 사항 및 상기 파티션들의 실행 시간 중 적어도 하나에 기초하여 상기 신경망 모델을 상기 파티션들로 분할하는 단계
를 포함하는,
클러스터 시스템의 동작 방법.
According to claim 15,
The dividing step is
Dividing the neural network model into the partitions based on at least one of a memory requirement of the processing units according to processing of the mini-batches and an execution time of the partitions.
including,
How cluster systems work.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 가상 작업자들 각각에서 동시에 진행되는 미니 배치들의 개수는
상기 가상 작업자들 각각에서 진행되는 미니 배치에 대한 가장 최신의 미니 배치로부터 누락된 갱신치들의 최대 개수에 해당하는 로컬 스테일니스(local staleness)의 임계값에 기초하여 결정되는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
The number of mini-batches simultaneously running in each of the virtual workers is
Determined based on a threshold of local staleness corresponding to the maximum number of missing updates from the most recent mini-batch for the mini-batch in progress on each of the virtual workers.
How cluster systems work.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 가상 작업자들 각각에서의 미니 배치의 처리 여부는
클러스터 시스템 내의 다른 모든 가상 작업자들이 전역적으로 계산한 가장 최신의 미니 배치에서 누락된 갱신치들의 최대 개수에 해당하는 글로벌 스테일니스 경계에 기초하여 결정되는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
Whether the mini-batch is processed in each of the virtual workers
Determined based on a global staleness boundary equal to the maximum number of missing updates in the most recent mini-batch computed globally by all other virtual workers in the cluster system.
How cluster systems work.
제15항에 있어서,
상기 스케줄링하는 단계는
상기 미니 배치들에 대한 역방향 패스 작업들에 정방향 패스 작업들보다 높은 우선 순위를 부여하여 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 미니 배치들에 대한 역방향 패스 작업들과 상기 정방향 패스 작업들을 선입 선출(First In First Out; FIFO) 스케줄링 정책에 따라 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계
중 적어도 하나를 포함하는,
클러스터 시스템의 동작 방법.
According to claim 15,
The scheduling step is
assigning a higher priority to reverse pass tasks for the mini-batches than forward pass tasks, and scheduling each of the processing units assigned to the virtual workers; and
Scheduling the reverse pass jobs for the mini-batches and the forward pass jobs to each of the processing units assigned to the virtual workers according to a First In First Out (FIFO) scheduling policy.
including at least one of
How cluster systems work.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 신경망 모델은
상기 신경망 모델의 트레이닝에 필요한 메모리 용량이 상기 프로세싱 유닛들 중 어느 하나의 프로세싱 유닛의 메모리를 초과하는 거대 심층 신경망 모델을 포함하는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
The neural network model is
Including a massive deep neural network model in which the memory capacity required for training the neural network model exceeds the memory of any one of the processing units,
How cluster systems work.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 가상 작업자들 각각은
상기 미니 배치들 중 제1 미니 배치를 처리함으로써 산출된 상기 제1 미니 배치에 대응하는 갱신치에 의해 로컬 모델 파라미터를 갱신하고,
상기 제1 미니 배치에 연속하는 제2 미니 배치의 처리 시에 다른 미니 배치들에 의한 로컬 모델 파라미터들이 갱신될 때까지 기다리지 않고, 상기 로컬 모델 파라미터의 가장 최근 값을 사용하여 상기 신경망 모델의 트레이닝을 수행하는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
Each of the virtual workers
Updating a local model parameter by an update value corresponding to the first mini-batch calculated by processing a first mini-batch among the mini-batches;
When processing a second mini-batch subsequent to the first mini-batch, the neural network model is trained using the most recent value of the local model parameters without waiting for local model parameters by other mini-batches to be updated. performing,
How cluster systems work.
프로세싱 유닛들을, 트레이닝하고자 하는 신경망 모델에 대응하는 가상 작업자들 각각에게 할당하는 단계;
상기 신경망 모델을 상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 대응하는 개수의 파티션들- 상기 파티션들은 상기 신경망 모델의 복수의 계층들 중 적어도 일부의 계층을 복제한 것임 -로 분할하는 단계;
상기 분할된 파티션들에 대응하는 미니 배치들을 상기 가상 작업자들에 할당된 프로세싱 유닛들 각각에게 스케줄링하는 단계; 및
상기 가상 작업자들 각각에게 할당된 프로세싱 유닛들에 의해 파이프라인 방식으로 상기 미니 배치들을 처리함으로써 상기 신경망 모델을 트레이닝하는 단계
를 포함하고,
상기 가상 작업자들 각각에서 동시에 실행되는 최대 미니 배치들의 개수는
상기 신경망 모델의 트레이닝을 위한 메모리 요구 사항에 기초하여 결정되는,
클러스터 시스템의 동작 방법.
allocating processing units to virtual workers corresponding to a neural network model to be trained;
Dividing the neural network model into a number of partitions corresponding to processing units allocated to each of the virtual workers, wherein the partitions replicate at least some of a plurality of layers of the neural network model;
scheduling mini-batches corresponding to the divided partitions to each of the processing units allocated to the virtual workers; and
training the neural network model by processing the mini-batches in a pipelined manner by processing units assigned to each of the virtual workers;
including,
The maximum number of mini-batches concurrently running on each of the virtual workers is
Determined based on memory requirements for training of the neural network model,
How cluster systems work.
제15항에 있어서,
상기 프로세싱 유닛들은
이종의 그래픽 프로세싱 유닛들(GPUs)을 포함하는,
클러스터 시스템의 동작 방법.
According to claim 15,
The processing units
Including heterogeneous graphics processing units (GPUs),
How cluster systems work.
제15항에 있어서,
상기 가상 작업자들 간의 데이터 병렬 처리를 지원하기 위해 글로벌 모델 파라미터를 유지하는 단계
를 더 포함하는,
클러스터 시스템의 동작 방법.
According to claim 15,
Maintaining global model parameters to support data parallel processing among the virtual workers.
Including more,
How cluster systems work.
하드웨어와 결합되어 제15항 내지 제24항 중 어느 한 항의 방법을 실행시키기 위하여 컴퓨터로 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램.
A computer program stored in a computer-readable recording medium to execute the method of any one of claims 15 to 24 in combination with hardware.
KR1020200084221A 2020-07-08 2020-07-08 Machine learning training method based on parametric synchronization model and training system thereof KR102477243B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200084221A KR102477243B1 (en) 2020-07-08 2020-07-08 Machine learning training method based on parametric synchronization model and training system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200084221A KR102477243B1 (en) 2020-07-08 2020-07-08 Machine learning training method based on parametric synchronization model and training system thereof

Publications (2)

Publication Number Publication Date
KR20220006360A KR20220006360A (en) 2022-01-17
KR102477243B1 true KR102477243B1 (en) 2022-12-13

Family

ID=80051674

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200084221A KR102477243B1 (en) 2020-07-08 2020-07-08 Machine learning training method based on parametric synchronization model and training system thereof

Country Status (1)

Country Link
KR (1) KR102477243B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024076165A1 (en) * 2022-10-06 2024-04-11 오픈엣지테크놀로지 주식회사 Method for generating command set for neural network operation, and computing device for same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321776A1 (en) 2014-06-20 2016-11-03 Tencent Technology (Shenzhen) Company Limited Model Parallel Processing Method and Apparatus Based on Multiple Graphic Processing Units

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190054449A (en) * 2017-11-13 2019-05-22 한국과학기술원 Method for placing compute node for deep neural network acceleration in heterogeneous cluster

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160321776A1 (en) 2014-06-20 2016-11-03 Tencent Technology (Shenzhen) Company Limited Model Parallel Processing Method and Apparatus Based on Multiple Graphic Processing Units

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"PipeDream: Generalized Pipeline Parallelism for DNN Training", SOSP '19: Proceedings of the 27th ACM Symposium on Operating Systems Principles(pp. 1-15), 2019.10.30.*
"Pipe-torch: Pipeline-Based Distributed Deep Learning in a GPU Cluster with Heterogeneous Networking", 2019 Seventh International Conference on Advanced Cloud and Big Data(CBD)(pp. 55-60), 2019.09.22.

Also Published As

Publication number Publication date
KR20220006360A (en) 2022-01-17

Similar Documents

Publication Publication Date Title
Pal et al. Optimizing multi-GPU parallelization strategies for deep learning training
US9563470B2 (en) Backfill scheduling for embarrassingly parallel jobs
Blythe et al. Task scheduling strategies for workflow-based applications in grids
CN110321222B (en) Decision tree prediction-based data parallel operation resource allocation method
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
WO2012151054A1 (en) Scheduling in mapreduce-like systems for fast completion time
Wang et al. Scalable distributed dl training: Batching communication and computation
US20210304066A1 (en) Partitioning for an execution pipeline
CN115994567B (en) Asynchronous scheduling method for parallel computing tasks of deep neural network model
CN110609736B (en) Deadline constraint scientific workflow scheduling method in cloud environment
WO2016099747A1 (en) Scalable scheduling of parallel iterative seismic jobs
Kim et al. Deepspark: A spark-based distributed deep learning framework for commodity clusters
US8028291B2 (en) Method and computer program product for job selection and resource allocation of a massively parallel processor
KR102477243B1 (en) Machine learning training method based on parametric synchronization model and training system thereof
CN106934539A (en) It is a kind of with limited and expense restriction workflow schedule method
US20210390405A1 (en) Microservice-based training systems in heterogeneous graphic processor unit (gpu) cluster and operating method thereof
CN110275765B (en) Data parallel job scheduling method based on branch DAG dependency
Liu et al. Funcpipe: A pipelined serverless framework for fast and cost-efficient training of deep learning models
Chen et al. Hare: Exploiting inter-job and intra-job parallelism of distributed machine learning on heterogeneous gpus
Gong et al. Chic: experience-driven scheduling in machine learning clusters
KR102336297B1 (en) Job scheduling method for distributed deep learning over a shared gpu cluster, and computer-readable recording medium
Konovalov et al. Job control in heterogeneous computing systems
Xu et al. Effective scheduler for distributed DNN training based on MapReduce and GPU cluster
Lemerre et al. Equivalence between schedule representations: Theory and applications
Epstein et al. Robust algorithms for total completion time

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant