Talaria: Interactively Optimizing Machine Learning Models for Efficient Inference

Fred Hohman, Chaoqun Wang, Jinmook Lee, Jochen Görtler, Dominik Moritz, Jeffrey P. Bigham, Zhile Ren, Cecile Foret, Qi Shan, Xiaoyi Zhang · DOI

Abstract

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: practitioners need to optimize models and balance hardware metrics such as model size, latency, and power. To help practitioners create efficient ML models, we designed and developed Talaria: a model visualization and optimization system. Talaria enables practitioners to compile models to hardware, interactively visualize model statistics, and simulate optimizations to test the impact on inference metrics. Since its internal deployment two years ago, we have evaluated Talaria using three methodologies: (1) a log analysis highlighting its growth of 800+ practitioners submitting 3,600+ models; (2) a usability survey with 26 users assessing the utility of 20 Talaria features; and (3) a qualitative interview with the 7 most active users about their experience using Talaria.

Introduction

While the machine learning community has made significant strides in improving model accuracy, the transition from high-performance cloud environments to resource-constrained "on-device" environments remains a significant bottleneck. Mobile devices, wearables, and IoT hardware impose strict limitations on memory, battery life, and thermal output.

Currently, practitioners often operate in a "black box" environment when optimizing for hardware. A compression technique applied to a model might yield no actual speedup on a specific chip, or a single layer in a complex architecture might cause an unexpected power spike. Existing developer tools predominantly focus on model behavior—such as accuracy and precision—leaving a critical gap in tools that address hardware efficiency metrics like latency and memory footprint. Talaria was developed to bridge this gap, transforming model compression into a transparent, data-driven workflow.

The Talaria System

Talaria is a web-based system designed through a human-centered process involving formative research with ML experts. The system provides a suite of features to help engineers identify and resolve hardware bottlenecks:

  • Multi-View Interface: The system utilizes a "Table View" for sorting and filtering low-level hardware statistics alongside a "Graph View" that visualizes the model's physical topology. These views are "brushed and linked," meaning that selecting a bottleneck in the table immediately highlights its location within the model graph.
  • Interactive Simulation: To avoid the hours-long wait times typically associated with model re-compilation, Talaria uses precomputed data. This allows users to "toggle" optimizations—such as 8-bit quantization or weight pruning—and receive instant estimates of the resulting savings in latency and power.
  • Source Code Tracking: Talaria introduces a novel mapping feature that connects low-level hardware operations back to the specific line of Python code in the original model definition. This allows engineers to pinpoint exactly where in their codebase an optimization should be applied.
  • Collaborative Analysis: The system generates unique URLs for specific optimization checkpoints, enabling teams to share analyses and collaborate on performance tuning.

Methodology and Evaluation

To assess the impact of Talaria, the authors conducted a multi-year evaluation of its internal deployment, focusing on three primary data sources:

  1. Log Analysis: Over two years, the tool saw organic growth to over 800 unique practitioners who submitted more than 3,600 models.
  2. Usability Survey: 26 practitioners across various roles (ML engineers, research scientists, and hardware engineers) evaluated 20 specific features of the system.
  3. Qualitative Interviews: The authors conducted in-depth sessions with the seven most active "power users" to understand how the tool integrated into their professional workflows.

Key Insights

The evaluation revealed several critical insights into how experts approach model optimization:

The Importance of Geometry

Practitioners do not view models as simple lists of operations. The spatial context—where a layer sits in the model graph—is vital. For instance, identifying a bottleneck at the beginning of a U-Net versus the end provides necessary context for choosing the correct optimization strategy.

The "Minimal Edit" Philosophy

Expert users generally avoid model-wide changes that might degrade accuracy. Instead, they prefer "targeted optimization," seeking the one or two specific layers that provide the most significant performance gains for the least amount of architectural change. Talaria’s ability to highlight these "high-leverage" layers is central to its utility.

Model Verification

An unexpected finding was that users frequently utilized the Graph View for verification. They used the tool to ensure that the hardware compiler had not "mangled" or unexpectedly altered their intended architecture during the deployment process.

Results and Impact

Talaria has demonstrated significant "tool-market fit" within the organization, evidenced by its high adoption rate. In one specific case study, a practitioner used Talaria to identify a specific bottleneck that general model-wide tools had missed. By targeting this specific area, the user reduced memory power consumption by 18.02% and runtime latency by 11.55%.

Survey results confirmed that the Graph View and Interactive Optimization simulations were the most valued features, validating the need for visual, interactive debugging of hardware-specific metrics.

Limitations and Future Work

Despite its success, Talaria currently focuses exclusively on efficiency metrics. It does not yet visualize the accuracy loss associated with specific optimizations, requiring users to return to their training environments to verify model performance. Future iterations may include a "Diff View" for side-by-side model comparison and "mixed-initiative" systems where AI suggests optimal compression techniques while the human practitioner maintains final creative control.

Summary updated

BibTeX
@inproceedings{hohman2024talaria,
  author = {Fred Hohman and Chaoqun Wang and Jinmook Lee and Jochen Görtler and Dominik Moritz and Jeffrey P. Bigham and Zhile Ren and Cecile Foret and Qi Shan and Xiaoyi Zhang},
  title = {{Talaria: Interactively Optimizing Machine Learning Models for Efficient Inference}},
  booktitle = {CHI},
  year = {2024},
  doi = {10.1145/3613904.3642628},
}
Figure