# Talaria: Apple의 Apple Intelligence를 위한 On-Device 모델 성능 모니터링 및 최적화 도구

**URL:** <https://discuss.pytorch.kr/t/talaria-apple-apple-intelligence-on-device/4631>\
**Category:** 읽을거리&정보공유\
**Tags:** model-compression, monitoring-tool, visualization-tool, model-optimization, talaria, model-monitoring, optimization-tool, apple-intelligence, model-evaluation, on-device, apple\
**Created:** [6월 13, 2024, 5:21오후 UTC](https://discuss.pytorch.kr/t/talaria-apple-apple-intelligence-on-device/4631 "2024-06-13T17:21:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![9bow](https://discuss.pytorch.kr/user_avatar/discuss.pytorch.kr/9bow/32/16301_2.png) [@9bow](https://discuss.pytorch.kr/u/9bow)\
**Post date:** [6월 13, 2024, 5:21오후 UTC](https://discuss.pytorch.kr/t/talaria-apple-apple-intelligence-on-device/4631/1 "2024-06-13T17:21:17Z")

</div>

# Talaria: Apple의 Apple Intelligence를 위한 모델 성능 모니터링 및 최적화 도구

 ![Talaria: Apple의 Apple Intelligence를 위한 모델 성능 모니터링 및 최적화 도구](https://discuss.pytorch.kr/uploads/default/original/2X/1/19f5105e934b60895f38d7190a5f050919bdfe3a.jpeg)

## PyTorchKR:pytorch::kr:

이번 WWDC24에서 공개한 AI([Apple Intelligence: Apple의 On-Device 및 Private Cloud에서의 Foundation Model 소개](https://discuss.pytorch.kr/t/apple-intelligence-apple-on-device-private-cloud-foundation-model/4612))의 핵심 도구 중 하나로 제시한 [Talaria에 대해 별도의 소개 글](https://machinelearning.apple.com/research/talaria) 및 [논문](https://arxiv.org/abs/2404.03085)이 있어 간략히 정리해보았습니다. _ ~~어차피 사용하지 못할 것 같은~~ _ Talaria 자체의 기능 및 사용자 조사에 대한 내용보다는 어떠한 접근들을 하였고, 기술들을 검토 및 적용하였는지를 위주로 살펴보겠습니다.

이 글에서는 앞 부분의 기존 연구들에 대한 소개 및 각 연구들에 대해 인용된 논문들 위주로 살펴보았고, Talaria에 대한 소개는 논문의 그림 소개 및 목차 정도를 소개하는 정도에 그쳤습니다. 😅 Talaria 자체에 대해 관심이 있으신 분들께서는 글 가장 아래쪽의 원문 글 및 논문을 참고해주시기를 부탁드립니다. 🙇‍♂️

## 최적화 도구의 필요성 및 Talaria 소개

[https://mlr.cdn-apple.com/video/24\_talaria\_chi\_video\_preview\_3c32bde921.mp4](https://mlr.cdn-apple.com/video/24_talaria_chi_video_preview_3c32bde921.mp4)

사용자 단말 상에서의 머신러닝(On-Device ML)은 서버 및 클라욷가 아닌 개인 단말에서의 모델 추론을 수행하므로써 사용자에게 AI의 경험을 제공하면서도 개인정보를 보호할 수 있는 장점이 있습니다. 하지만, 이러한 개인 단말에는 자원제약이 있어 대규모 모델을 있는 그대로 실행하기는 어려우며, 모델의 크기(Model Size) 및 지연시간(Latency), 전력 소모(Power) 등의 최적화 및 (Trade-offs를 통한) 균형이 필요합니다.

 ![ML 실무자가 UNet Segmentation 모델 최적화의 사용 시나리오 예시: (A) 모델 전체에 대한 테스트 최적화 기준선 확인 -> (B) 하드웨어 작업 필터링을 통한 병목 노드 및 목표 정량화 최적화 적용 -> (C) 이렇게 찾은 가장 연산 비용이 큰 부분을 강조하여 확인하여 표시 -> (D) 해당 연산을 생성한 코드 확인](https://discuss.pytorch.kr/uploads/default/original/2X/5/5279db7226cf8430f2e2d2334d9b26f66c7999b9.jpeg)

Talaria는 Apple이 모델 최적화를 위해 개발한 최적화 도구로, 모델을 하드웨어에 컴파일 하고, 모델 통계를 인터랙티브하게 시각화하며, 최적화의 영향을 실시간으로 시뮬레이션 할 수 있습니다. 논문에서는 3가지 방법론으로 Talaria를 평가 및 소개하고 있습니다:

1. 지난 2년간 800명 이상의 개발자들이 3,600개 이상의 모델을 제출(submit)했던 로그 분석
2. Talaria의 20여가지 기능에 대해 26명의 사용자가 유용성을 평가한 사용성 설문(usability survey)
3. 가장 활발히 사용한 7명의 사용자를 대상으로 한 Talaria 사용 경험에 대한 정성적 인터뷰(qualitative interview)

## Talaria의 필요성: 기존 기법들에 대한 소개

 ![빠른 실험을 위한 Talaria의 (A) 모델 전체 최적화 및 (B) 단일 하드웨어 작업 압축을 위한 타깃 최적화 예시](https://discuss.pytorch.kr/uploads/default/original/2X/1/1db4a1d5baa8b6b5a155e5186e5a9274c2d62804.png)

### 모델 압축 기법들: Model Compression Techniques

 ![3가지 모델 압축 기법들에 대한 소개: Quantization / Pruning / Sparsification / Palettization](https://discuss.pytorch.kr/uploads/default/original/2X/1/137e90ceea781fe6bd1302618a90d1769e167b41.png)

**양자화(Quantization)**: 양자화는 모델의 입력, 출력, 가중치 등을 고정밀도 형식(예: fp32)에서 저정밀도 형식(예: fp16, int8, int2 등)으로 변환하는 기법입니다. 이를 통해 모델 크기와 연산량을 줄일 수 있는 장점이 있으며, Talaria에서는 양자화를 주요 압축 기법 중 하나로 사용하고 있습니다. _(+ **PyTorchKR:pytorch::kr:** : 다음은 Talaria 논문에 인용된 **양자화** [[[**27**]](https://arxiv.org/abs/2103.13630): [[2103.13630] A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630), [[**40**]](https://arxiv.org/abs/2102.00554): [[2102.00554] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in neural networks](https://arxiv.org/abs/2102.00554)] 기법 관련 논문들입니다. )_

> **[A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630)**
>
> As soon as abstract mathematical computations were adapted to computation on digital computers, the problem of efficient representation, manipulation, and communication of the numerical values in those computations arose. Strongly related to the...

> **[Sparsity in Deep Learning: Pruning and growth for efficient inference and...](https://arxiv.org/abs/2102.00554)**
>
> The growing energy and performance costs of deep learning have driven the community to reduce the size of neural networks by selectively pruning components. Similarly to their biological counterparts, sparse networks generalize just as well, if not...

**가지치기(Pruning) 또는 희소화(Sparsification)**: 가지치기는 모델에서 중요도가 낮은 파라미터(예: 가중치, 편향)를 제거하여 모델 크기를 줄이는 기법입니다. 현대 신경망은 과도한 매개변수화(overparameterized)가 되어 있어, 일부 파라미터를 제거해도 최종 예측에 미치는 영향이 작다는 것이 이 기법의 동기입니다. Talaria에서는 이 가지치기 기법 또한 지원하고 있습니다. _(+ **PyTorchKR:pytorch::kr:** : 다음은 Talaria 논문에 인용된 **희소화** [[[**27**]](https://arxiv.org/abs/2103.13630): [[2103.13630] A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630), [[**40**]](https://arxiv.org/abs/2102.00554): [[2102.00554] Sparsity in Deep Learning: Pruning and growth for efficient inference and training in neural networks](https://arxiv.org/abs/2102.00554)] 기법 관련 논문들입니다.)_

> **[A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630)**
>
> As soon as abstract mathematical computations were adapted to computation on digital computers, the problem of efficient representation, manipulation, and communication of the numerical values in those computations arose. Strongly related to the...

> **[Sparsity in Deep Learning: Pruning and growth for efficient inference and...](https://arxiv.org/abs/2102.00554)**
>
> The growing energy and performance costs of deep learning have driven the community to reduce the size of neural networks by selectively pruning components. Similarly to their biological counterparts, sparse networks generalize just as well, if not...

**팔레타이징(Palettization)**: 팔레타이징은 모델의 가중치를 미리 계산되거나 학습된 이산 값 집합에 매핑하는 기법입니다. 미술에 사용하는 "팔레트"에서 영감을 얻은 기법으로, 유사한 값들을 하나의 평균이나 근사값으로 매핑한 다음 이를 추론 연산에 사용하는 아이디어입니다. Talaria에서는 앞의 2가지 기법들(양자화, 가지치기)과 함께 팔레타이징도 지원하고 있습니다. _(+ **PyTorchKR:pytorch::kr:** : 다음은 Talaria 논문에 인용된 **팔레타이징** [[[**18**]](https://arxiv.org/abs/2108.12659): [[2108.12659] DKM: Differentiable K-Means Clustering Layer for Neural Network Compression](https://arxiv.org/abs/2108.12659), [[**93**]](https://arxiv.org/abs/1806.09228): [[1806.09228] Deep $k$-Means: Re-Training and Parameter Sharing with Harder Cluster Assignments for Compressing Deep Convolutions](https://arxiv.org/abs/1806.09228)] 기법 관련 논문들입니다.)_

> **[DKM: Differentiable K-Means Clustering Layer for Neural Network Compression](https://arxiv.org/abs/2108.12659)**
>
> Deep neural network (DNN) model compression for efficient on-device inference is becoming increasingly important to reduce memory requirements and keep user data on-device. To this end, we propose a novel differentiable k-means clustering layer (DKM)...

> **[Deep $k$-Means: Re-Training and Parameter Sharing with Harder Cluster...](https://arxiv.org/abs/1806.09228)**
>
> The current trend of pushing CNNs deeper with convolutions has created a pressing demand to achieve higher compression gains on CNNs where convolutions dominate the computation and parameter amount (e.g., GoogLeNet, ResNet and Wide ResNet). Further,...

**그 외 모델 압축 기법들** : _(+ **PyTorchKR:pytorch::kr:** : 다음은 Talaria 논문에 인용된 모델 압축기법에 대한 참고 논문들입니다)_

- **지식 증류(KD, Knowledge Distillation)**: [[**27**]](https://arxiv.org/abs/2103.13630): [[2103.13630] A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630), [[**33**]](https://arxiv.org/abs/2006.05525): [[2006.05525] Knowledge Distillation: A Survey](https://arxiv.org/abs/2006.05525), [[**65**]](https://arxiv.org/abs/1802.05668): [[1802.05668] Model compression via distillation and quantization](https://arxiv.org/abs/1802.05668)

> **[A Survey of Quantization Methods for Efficient Neural Network Inference](https://arxiv.org/abs/2103.13630)**
>
> As soon as abstract mathematical computations were adapted to computation on digital computers, the problem of efficient representation, manipulation, and communication of the numerical values in those computations arose. Strongly related to the...

> **[Knowledge Distillation: A Survey](https://arxiv.org/abs/2006.05525)**
>
> In recent years, deep neural networks have been successful in both industry and academia, especially for computer vision tasks. The great success of deep learning is mainly due to its scalability to encode large-scale data and to maneuver billions of...

> **[Model compression via distillation and quantization](https://arxiv.org/abs/1802.05668)**
>
> Deep neural networks (DNNs) continue to make significant advances, solving tasks from image classification to translation or reinforcement learning. One aspect of the field receiving considerable attention is efficiently executing deep models in...

- **효율적 신경망 아키텍처(Efficient Neural Architecture)**: [[[**20**]](https://link.springer.com/article/10.1007/s10462-020-09816-7): [A comprehensive survey on model compression and acceleration | Artificial Intelligence Review | Springer Nature Link](https://link.springer.com/article/10.1007/s10462-020-09816-7) , [[**45**]](https://arxiv.org/abs/1704.04861): [[1704.04861] MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications](https://arxiv.org/abs/1704.04861), [[**73**]](https://arxiv.org/abs/1801.04381): [[1801.04381] MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381), [[**81**]](https://proceedings.mlr.press/v97/tan19a.html): [EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://proceedings.mlr.press/v97/tan19a.html) , [[**87**]](https://arxiv.org/abs/2303.14189): [[2303.14189] FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization](https://arxiv.org/abs/2303.14189) , [[**98**]](https://arxiv.org/abs/1707.01083): [[1707.01083] ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices](https://arxiv.org/abs/1707.01083)]

> **[A comprehensive survey on model compression and acceleration - Artificial...](https://link.springer.com/article/10.1007/s10462-020-09816-7)**
>
> In recent years, machine learning (ML) and deep learning (DL) have shown remarkable improvement in computer vision, natural language processing, stock prediction, forecasting, and audio processing to name a few. The size of the trained DL model is...

> **[MobileNets: Efficient Convolutional Neural Networks for Mobile Vision...](https://arxiv.org/abs/1704.04861)**
>
> We present a class of efficient models called MobileNets for mobile and embedded vision applications. MobileNets are based on a streamlined architecture that uses depth-wise separable convolutions to build light weight deep neural networks. We...

> **[MobileNetV2: Inverted Residuals and Linear Bottlenecks](https://arxiv.org/abs/1801.04381)**
>
> In this paper we describe a new mobile architecture, MobileNetV2, that improves the state of the art performance of mobile models on multiple tasks and benchmarks as well as across a spectrum of different model sizes. We also describe efficient ways...

> **[EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks](https://proceedings.mlr.press/v97/tan19a.html)**
>
> Convolutional Neural Networks (ConvNets) are commonly developed at a fixed resource budget, and then scaled up for better accuracy if more resources are given. In this paper, we systematically stud...

> **[FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization](https://arxiv.org/abs/2303.14189)**
>
> The recent amalgamation of transformer and convolutional designs has led to steady improvements in accuracy and efficiency of the models. In this work, we introduce FastViT, a hybrid vision transformer architecture that obtains the state-of-the-art...

> **[ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile...](https://arxiv.org/abs/1707.01083)**
>
> We introduce an extremely computation-efficient CNN architecture named ShuffleNet, which is designed specially for mobile devices with very limited computing power (e.g., 10-150 MFLOPs). The new architecture utilizes two new operations, pointwise...

- **동적 아키텍처(Dynamic Architectures)**: [[[**102**]](https://arxiv.org/abs/2106.02898): [[2106.02898] Dynamic Resolution Network](https://arxiv.org/abs/2106.02898)]

> **[Dynamic Resolution Network](https://arxiv.org/abs/2106.02898)**
>
> Deep convolutional neural networks (CNNs) are often of sophisticated design with numerous learnable parameters for the accuracy reason. To alleviate the expensive costs of deploying them on mobile devices, recent works have made huge efforts for...

- **위 기법들을 서로 결합한 형태(Combined Together)**: [[[**37**](https://arxiv.org/abs/1510.00149)]: [[1510.00149] Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding](https://arxiv.org/abs/1510.00149) ]

> **[Deep Compression: Compressing Deep Neural Networks with Pruning, Trained...](https://arxiv.org/abs/1510.00149)**
>
> Neural networks are both computationally intensive and memory intensive, making them difficult to deploy on embedded systems with limited hardware resources. To address this limitation, we introduce "deep compression", a three stage pipeline:...

- **그 외 압축 기법에 대한 서베이 논문들** : [[[**17**]](https://ieeexplore.ieee.org/abstract/document/8253600): [Model Compression and Acceleration for Deep Neural Networks: The Principles, Progress, and Challenges | IEEE Journals & Magazine | IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/8253600), [[**20**]](https://link.springer.com/article/10.1007/s10462-020-09816-7): [A comprehensive survey on model compression and acceleration | Artificial Intelligence Review | Springer Nature Link](https://link.springer.com/article/10.1007/s10462-020-09816-7), [[**23**]](https://ieeexplore.ieee.org/abstract/document/9043731): [Model Compression and Hardware Acceleration for Neural Networks: A Comprehensive Survey | IEEE Journals & Magazine | IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/9043731), [[**57**]](https://dl.acm.org/doi/abs/10.1145/3578938): [https://dl.acm.org/doi/abs/10.1145/3578938](https://dl.acm.org/doi/abs/10.1145/3578938).

> **[Model Compression and Acceleration for Deep Neural Networks: The Principles,...](https://ieeexplore.ieee.org/abstract/document/8253600)**
>
> In recent years, deep neural networks (DNNs) have received increased attention, have been applied to different applications, and achieved dramatic accuracy improvements in many tasks. These works rely on deep networks with millions or even billions...

> **[A comprehensive survey on model compression and acceleration - Artificial...](https://link.springer.com/article/10.1007/s10462-020-09816-7)**
>
> In recent years, machine learning (ML) and deep learning (DL) have shown remarkable improvement in computer vision, natural language processing, stock prediction, forecasting, and audio processing to name a few. The size of the trained DL model is...

> **[Model Compression and Hardware Acceleration for Neural Networks: A...](https://ieeexplore.ieee.org/abstract/document/9043731)**
>
> Domain-specific hardware is becoming a promising topic in the backdrop of improvement slow down for general-purpose processors due to the foreseeable end of Moore's Law. Machine learning, especially deep neural networks (DNNs), has become the most...

[https://dl.acm.org/doi/abs/10.1145/3578938](https://dl.acm.org/doi/abs/10.1145/3578938)

지금까지 일반적으로 AI / ML은 서버 환경에서 실행이 되었기 때문에, 상대적으로 On-Device에서의 모델 실행에 대한 연구 및 모범 사례(Best Practice)는 제한적인 것이 현실입니다. 압축 기법들에 대한 연구는 다소 이뤄지고 있지만, 실제 동작은 PyTorch나 Tensorflow 등과 같은 주요 프레임워크들에서 제공하는 기능들을 활용하는 선에서 이뤄지고 있습니다. On-Device ML을 위한 TinyML 커뮤니티도 형성되어 있지만, 전반적으로 볼 때 실무자들이 압축 기법을 실제 적용하는 데 도움이 되는 일반화된 도구는 부족한 상황입니다.

### On-Device 추론 vs. 학습: On-Device Inference vs. On-Device Training

On-Device 학습은 주로 사용자의 데이터를 활용한 개인화 모델 제작 시에 사용하지만, 자주 발생하지는 않습니다. 이에 반해 On-Device 추론은 이미 학습된 모델을 사용자 장치에서 실행하여 사용자의 개인 정보를 보호할 수 있으며, On-Device 학습 대비 훨씬 더 자주 발생합니다. 따라서 이 Talaria는 On-Device 추론에 초점을 맞추고 있습니다.

_(+ **PyTorchKR:pytorch::kr:** : 다음은 Talaria 논문에 인용된 On-Deivce 관련 참고 논문들[[[**42**]](https://arxiv.org/abs/2310.04621):[[2310.04621] Model Compression in Practice: Lessons Learned from Practitioners Creating On-device Machine Learning Experiences](https://arxiv.org/abs/2310.04621), [[**101**]](https://arxiv.org/abs/1905.10083): [[1905.10083] Edge Intelligence: Paving the Last Mile of Artificial Intelligence with Edge Computing](https://arxiv.org/abs/1905.10083)] 및 On-Device Training 관련 서베이 논문들 [[[**24**]](https://arxiv.org/abs/1911.00623):[[1911.00623] On-Device Machine Learning: An Algorithms and Learning Theory Perspective](https://arxiv.org/abs/1911.00623), [[**55**]](https://arxiv.org/abs/1909.11875): [[1909.11875] Federated Learning in Mobile Edge Networks: A Comprehensive Survey](https://arxiv.org/abs/1909.11875), [[**60**]](https://arxiv.org/abs/1908.00080): [[1908.00080] Machine Learning at the Network Edge: A Survey](https://arxiv.org/abs/1908.00080), [[**101**]](https://ieeexplore.ieee.org/abstract/document/8736011): [Edge Intelligence: Paving the Last Mile of Artificial Intelligence With Edge Computing | IEEE Journals & Magazine | IEEE Xplore](https://ieeexplore.ieee.org/abstract/document/8736011)] 입니다.)_

> **[Model Compression in Practice: Lessons Learned from Practitioners Creating...](https://arxiv.org/abs/2310.04621)**
>
> On-device machine learning (ML) promises to improve the privacy, responsiveness, and proliferation of new, intelligent user experiences by moving ML computation onto everyday personal devices. However, today's large ML models must be drastically...

> **[Edge Intelligence: Paving the Last Mile of Artificial Intelligence with Edge...](https://arxiv.org/abs/1905.10083)**
>
> With the breakthroughs in deep learning, the recent years have witnessed a booming of artificial intelligence (AI) applications and services, spanning from personal assistant to recommendation systems to video/audio surveillance. More recently, with...

> **[On-Device Machine Learning: An Algorithms and Learning Theory Perspective](https://arxiv.org/abs/1911.00623)**
>
> The predominant paradigm for using machine learning models on a device is to train a model in the cloud and perform inference using the trained model on the device. However, with increasing number of smart devices and improved hardware, there is...

> **[Federated Learning in Mobile Edge Networks: A Comprehensive Survey](https://arxiv.org/abs/1909.11875)**
>
> In recent years, mobile devices are equipped with increasingly advanced sensing and computing capabilities. Coupled with advancements in Deep Learning (DL), this opens up countless possibilities for meaningful applications. Traditional cloudbased...

> **[Machine Learning at the Network Edge: A Survey](https://arxiv.org/abs/1908.00080)**
>
> Resource-constrained IoT devices, such as sensors and actuators, have become ubiquitous in recent years. This has led to the generation of large quantities of data in real-time, which is an appealing target for AI systems. However, deploying machine...

> **[Edge Intelligence: Paving the Last Mile of Artificial Intelligence With Edge...](https://ieeexplore.ieee.org/abstract/document/8736011)**
>
> With the breakthroughs in deep learning, the recent years have witnessed a booming of artificial intelligence (AI) applications and services, spanning from personal assistant to recommendation systems to video/audio surveillance. More recently, with...

### 모델 평가 및 최적화를 위한 시각화: Visualization for Model Evaluation / Optimization

**모델 평가에 대한 시각화 도구** : 평가를 위한 시각화 도구들은 최적화를 위한 시각화 도구보다는 많이 연구 및 개발되어 왔습니다. 데이터 분류 및 객체 탐지, 전이학습, 자연어 처리 등의 다양한 분야에서 시각화 도구들이 개발되어 왔습니다. 하지만, 이러한 도구들은 주로 데이터셋을 변경하며 정확도(accuracy)나 정밀도(precision), 재현율(recall) 등과 같은 수치를 통해 학습시 보지 못한 데이터에 대해 얼마나 잘 일반화하였는지를 비교/평가하는 것이 주요 목적입니다.  
이에 비해 지연시간(latency)이나 전력 소모량(power)과 같은 모델의 효율성에 대해 평가하는 시각화 도구는 그 수가 훨씬 적습니다. 일부 도구들에서는 위의 지표들을 사용하긴 하지만, 최신 모델 최적화 및 압축 기법 들로부터 얻을 수 있는 효율성을 비교하여 알려주지는 않습니다.

**모델 최적화를 위한 시각화 도구** : 최적화를 위한 시각화 도구는 거의 없다시피합니다. 대부분의 연구는 가지치기(Pruning) 등과 같은 알고리즘 수준의 기법들을 다루고 있으며, 실제 업무에 적용될만한 도구를 찾아보기는 어렵습니다.  
Dotter and Ward[[**25**]](https://ieeexplore.ieee.org/document/8707381)가 CNN 모델의 분류 작업을 위해 데이터 클러스터를 시각화하는 것과 함께 추론 시간 및 모델 크기와 같은 모델 메트릭을 분석한 연구나, [CNNPruner[**53**]](https://arxiv.org/abs/2009.09940)와 같은 도구들이 유사한 시도들입니다. 하지만 이러한 시각화 도구들은 실제 ML 개발자들의 업무 흐름과 요구사항들이 잘 반영되지 않았습니다.

Talaria는 위에서 살펴본 이러한 문제점들을 해결하기 위해 하드웨어와 소프트웨어를 아우르는 효율적인 ML 작업에 대한 총체적인 시각화를 제공하여, 실무자들의 업무에 직접 도움이 되고 있습니다.

## Talaria 시스템 개요

 ![점점 더 복잡해지는 아키텍처를 가진 5가지 모델에 대한 Talaria에서의 시각화 예시](https://discuss.pytorch.kr/uploads/default/original/2X/4/485bffd31cfd806336b591ef8cddf3a8f33c75ce.png)

Talaria는 하드웨어 제약이 있는 디바이스에서 효율적인 추론을 위해 모델을 최적화하는 데 도움을 주기 위해 설계되었습니다. 사용자들이 모델을 하드웨어에 컴파일하고, 모델 운영을 시각화하며, 다양한 최적화를 적용하여 실시간으로 그 영향을 평가할 수 있는 인터랙티브 시각화 및 최적화 환경을 제공합니다.

 ![ML 실무자들이 모델 분석 시 도움을 주는 시각화 예시: (A) 모델 지표의 분표 형태를 파악하는 단변량 히스토그램, (B) 지표들간의 상관관계를 보는 분산형 차트, (C) 모델의 각 작업의 실행 시점을 보여주는 타임라인](https://discuss.pytorch.kr/uploads/default/original/2X/8/81226466b11aad5154f5c96bfcb91bf56af39801.png)

#### 주요 기능

 ![동일 모델에 대해 3가지 서로 다른 지표(지연 시간, 메모리, 전력 사용량)에 따른 그래프 뷰 시각화: 진한 파란색 노드가 더 높은 값을 시각화](https://discuss.pytorch.kr/uploads/default/original/2X/b/b72bcd8ee2f3ecebd9b3bb7a693fa090f9fbc43d.jpeg)

1. **인터랙티브 테이블 뷰** : 저수준 하드웨어 통계를 표시하여 사용자가 계산 비용에 따라 작업을 정렬, 필터링, 검색할 수 있도록 합니다.

2. **그래프 뷰** : 모델의 계산 그래프를 시각적으로 제공하여 병목 현상을 강조하고 모델 성능에 대한 기하학적 이해를 촉진합니다.

3. **모델 전체 및 타겟 최적화** : 사용자들이 광범위하고 특정한 최적화를 모두 적용하여 모델 효율성에 대한 영향을 즉시 시각화할 수 있습니다.

4. **소스 코드 추적** : 하드웨어 작업을 모델의 소스 코드에 매핑하여 최적화를 정확하게 구현할 수 있도록 돕습니다.

5. **협업 도구** : 공유 및 협업 최적화를 가능하게 하여 팀이 모델 성능을 향상시키기 위해 함께 작업할 수 있게 합니다.

### 구현 및 아키텍처

 ![Talaria 구현 및 아키텍처](https://discuss.pytorch.kr/uploads/default/original/2X/b/bf81169b26a09d4593b0270708c048a7522db2d1.png)

Talaria의 프론트엔드는 Vue.js와 D3.js를 사용하여 풍부한 인터랙티브 경험을 제공합니다. 백엔드는 Flask로 개발되어 모델 컴파일 및 최적화 작업을 처리합니다. 시스템은 AWS에 호스팅되어 확장성과 신뢰성을 보장합니다.

### Talaria의 장점

 ![Talaria에서의 두가지 유형의 모델에 대한 최적화 예시: (A) 모델 전체에 대한 압축 기법 적용 / (B) 특정 모델 연산에 대해서만 최적화 적용](https://discuss.pytorch.kr/uploads/default/original/2X/0/070acde19a805d35320c0996afd0777249f0dd5b.png)

- **효율성** : 최적화 프로세스를 간소화하여 효율적인 온디바이스 추론을 달성하는 데 필요한 시간과 노력을 줄입니다.
- **시각화** : 모델 성능에 대한 명확한 통찰력을 제공하여 실무자들이 정보에 입각한 최적화 결정을 내릴 수 있도록 돕습니다.
- **인터랙티브** : 다양한 최적화 전략을 실시간으로 실험할 수 있어 반복적인 개발 과정을 향상시킵니다.
- **협업** : 여러 실무자들이 모델 최적화 작업에 기여할 수 있도록 팀워크를 지원합니다.

## Talaria 소개 글

> **[Talaria: Interactively Optimizing Machine Learning Models for Efficient...](https://machinelearning.apple.com/research/talaria)**
>
> On-device machine learning (ML) moves computation from the cloud to personal devices, protecting user privacy and enabling intelligent user…

## Talaria 소개 논문

> **[Talaria: Interactively Optimizing Machine Learning Models for Efficient...](https://arxiv.org/abs/2404.03085)**
>
> On-device machine learning (ML) moves computation from the cloud to personal devices, protecting user privacy and enabling intelligent user experiences. However, fitting models on devices with limited resources presents a major technical challenge:...

* * *

_이 글은 GPT 모델로 정리한 글을 바탕으로 한 것으로, 원문의 내용 또는 의도와 다르게 정리된 내용이 있을 수 있습니다. 관심있는 내용이시라면 원문도 함께 참고해주세요! 읽으시면서 어색하거나 잘못된 내용을 발견하시면 덧글로 알려주시기를 부탁드립니다._ 🤗

[:pytorch:파이토치 한국 사용자 모임🇰🇷](https://pytorch.kr/)이 정리한 이 글이 유용하셨나요? [회원으로 가입](https://discuss.pytorch.kr/signup)하시면 주요 글들을 이메일💌로 보내드립니다! (기본은 Weekly지만 [Daily로 변경도 가능](https://discuss.pytorch.kr/my/preferences/emails)합니다.)

🎁 아래↘쪽에 좋아요👍를 눌러주시면 새로운 소식들을 정리하고 공유하는데 힘이 됩니다~ 🤩
