텐센트의 딥 러닝 플랫폼 구조

 작년 VLDB를 통해 발표된 중국 텐센트의 딥 러닝 플랫폼, 마리아나 (마리화나 아님 -_-) 에 대한 얘기다. 

 페이퍼는 GPU와 레거시 CPU 방식 클러스터를 소개하고 있는데 (하이브리드 방식의 단일 플랫폼 아님) 자사 서비스 위챗에 활용하는 것으로 GPU 클러스터는 이미지, CPU 클러스터는 음성인식 등에 사용중이라 한다.

 어깨넘어 들리는 소문으로는 GPU가 대세 아닌가!? 해서 봤더니, 레거시 CPU 클러스터는 다음과 같은 이유로 존재한다네.

Mariana includes a CPU  cluster data parallelism and  model parallelism framework for DNNs. DNN CPU cluster framework aims to two kinds of applications. First, CPU cluster is useful for applications needing large model with huge memory consumptions, moderate computational power for one mini-batch, and lots of training data. This kind of applications needs both data parallelism and model parallelism, and must be rewritten to solve this large scale problem. Second, legacy CPU training applications could be empowered by data parallelism with little code modification to become a parallel version.

라쥐스케일에 적합하고 코딩도 쉽다 이거야!

그들의 아키텍처

 마스터는 stochastic gradient descent 알고리즘을 수행하는 여러 개의 mini-batch BSP job을 관리하고 그 잡에는 코디네이터를 하나씩 선발해서 일을 처리한다. 이걸 하나의 그룹이라 하고 이들은 Asynchronous하게 작동하므로 그룹 간 파라미터 스와핑은 파라미터 서버를 사용한다. 요약하면, 구글의 DistBelief 짭이라고 할 수 있다 (GPU 클러스터는 페이스북 짭이라고 한다. 역시 중국).

 처음에는 Apache Hama의 단일 잡에 토폴로지 정보로 태스크를 그룹으로 묶고 파라미터 서버간 통신 API만 뚤어주면 될 것으로 봤는데 홀리쉿! 그냥 하마는 서브컴포넌트로 활용될 수 있을 것 같다. 한국 밀린다 밀려. 내가 한번 만들어보자!

Few thoughts

1. The process and management skills doesn't increase the productivity of software development. On that point, open source is the software development culture of the future.

2. Internet is revolution near the emergence of multi-cellular organisms.