MOROCCO: Model Resource Comparison Framework

Valentin Malykh, Alexander Kukushkin, Ekaterina Artemova, Vladislav Mikhailov, Maria Tikhonova, Tatiana ShavrinaarXiv 2021

Abstract

In Natural Language Processing (NLP), the pursuit of state-of-the-art (SOTA) performance has historically prioritized accuracy over computational efficiency. This paper introduces MOROCCO (MOdel ResOurCe COmparison), a framework designed to evaluate models based on a "fitness score" that balances task quality, memory footprint, and inference throughput. By testing models in standardized Docker environments, we demonstrate that the most accurate models are often prohibitively resource-intensive. Our results identify RoBERTa-base and RuBERT as highly efficient architectures, providing a path toward more sustainable and production-ready AI.

Introduction

Standard benchmarks like GLUE and SuperGLUE have successfully pushed the boundaries of model understanding but often operate in a hardware vacuum. A marginal gain in accuracy may come at the cost of a 10x increase in memory or a 5x decrease in speed, rendering such models impractical for production. MOROCCO addresses this gap by providing standardized tools and metrics to measure the "bang for the buck" of different architectures.

Methodology

The MOROCCO framework utilizes Docker containers on fixed hardware (Intel Broadwell CPU and NVIDIA Tesla V100 GPU) to isolate architectural performance from infrastructure variability. The core metric is the Fitness Score ($F$):

$$F = Q \times \frac{Tp}{\log(M)}$$

Where $Q$ is the quality metric (e.g., Accuracy), $Tp$ is the throughput (samples per second), and $M$ is the maximum GPU RAM consumption. The logarithmic treatment of memory acknowledges the exponential growth of model sizes while penalizing excessive resource consumption.

Experimental Results

The framework was validated using the SuperGLUE (English) and RussianSuperGLUE benchmarks. Visualizing the results on a quality-versus-throughput plot reveals the efficiency of various architectures.

Comparison of English models on SuperGLUE. RoBERTa-base demonstrates high fitness by balancing quality and throughput with a relatively small memory footprint.

As shown in Figure 1, RoBERTa-base achieves a superior balance of performance and speed compared to larger models like GPT-2. The size of the data points represents memory footprint, making "bloated" models immediately identifiable.

Quantitative analysis across both languages (Table 1) confirms these findings. In the Russian benchmark, RuBERT achieves the highest fitness score. Conversely, ruGPT3-large, despite its competitive accuracy, suffers from a massive 7.5GB footprint and the lowest inference speed, leading to a significantly lower fitness ranking.

Fitness evaluation scores for English and Russian models. Higher scores indicate better overall resource efficiency.

Conclusion

MOROCCO demonstrates that efficiency is an inherent property of model architecture that remains stable across tasks. By shifting the evaluation focus from pure accuracy to resource-aware fitness, the NLP community can better identify models suitable for real-world deployment and encourage the development of "green" AI.

Summary updated

BibTeX
@misc{malykh2021morocco,
  author = {Valentin Malykh and Alexander Kukushkin and Ekaterina Artemova and Vladislav Mikhailov and Maria Tikhonova and Tatiana Shavrina},
  title = {{MOROCCO: Model Resource Comparison Framework}},
  year = {2021},
  eprint = {2104.14314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.14314},
}
Figure