TransformerRanker: A Tool for Efficiently Finding the Best-Suited Language Models for Downstream Classification Tasks

Lukas Garbas,Max Ploner,Alan Akbik
2024-09-10
Abstract:Classification tasks in NLP are typically addressed by selecting a pre-trained language model (PLM) from a model hub, and fine-tuning it for the task at hand. However, given the very large number of PLMs that are currently available, a practical challenge is to determine which of them will perform best for a specific downstream task. With this paper, we introduce TransformerRanker, a lightweight library that efficiently ranks PLMs for classification tasks without the need for computationally costly fine-tuning. Our library implements current approaches for transferability estimation (LogME, H-Score, kNN), in combination with layer aggregation options, which we empirically showed to yield state-of-the-art rankings of PLMs (Garbas et al., 2024). We designed the interface to be lightweight and easy to use, allowing users to directly connect to the HuggingFace Transformers and Dataset libraries. Users need only select a downstream classification task and a list of PLMs to create a ranking of likely best-suited PLMs for their task. We make TransformerRanker available as a pip-installable open-source library <a class="link-external link-https" href="https://github.com/flairNLP/transformer-ranker" rel="external noopener nofollow">this https URL</a>.
Computation and Language
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to select the most suitable pre - trained language model (PLM) in natural language processing (NLP) tasks. Currently, although there are many pre - trained Transformer language models (such as models provided through model libraries), determining which model performs best on a specific downstream task is a practical challenge. Because fine - tuning each model to evaluate its performance is both time - consuming and dependent on hyper - parameter settings (for example, the learning rate used for fine - tuning), it is impossible to conduct a comprehensive search of all available models. This limits users to exploring only a small number of PLMs and may lead to missing the best model most suitable for a specific task. To solve this problem, the author introduces **TRANSFORMER RANKER**, a lightweight library that can efficiently rank PLMs to determine which models are most suitable for a specific classification task without computationally expensive fine - tuning. This library implements several existing transferability estimation methods (such as LogME, H - Score, kNN) and combines layer - aggregation options, which have been proven in experiments to generate state - of - the - art PLM rankings. Specifically, **TRANSFORMER RANKER** aims to: 1. Provide practitioners with an easy - to - use method to select PLMs suitable for their downstream tasks using transferability estimation. 2. Provide researchers in the field of transferability estimation with a single library that implements multiple state - of - the - art estimators and aggregation methods for comparison and improvement. Through these functions, **TRANSFORMER RANKER** helps to accelerate the model selection process and improve the efficiency and effectiveness of NLP tasks.