Are Small Language Models Ready to Compete with Large Language Models for Practical Applications?

Neelabh Sinha, Vinija Jain, Aman Chadha

Abstract

The rapid rise of Language Models (LMs) has expanded their use in several applications. Yet, due to constraints of model size, associated cost, or proprietary restrictions, utilizing state-of-the-art (SOTA) LLMs is not always feasible. With open, smaller LMs emerging, more applications can leverage their capabilities, but selecting the right LM can be challenging as smaller LMs don't perform well universally. This work tries to bridge this gap by proposing a framework to experimentally evaluate small, open LMs in practical settings through measuring semantic correctness of outputs across three practical aspects: task types, application domains and reasoning types, using diverse prompt styles. It also conducts an in-depth comparison of 10 small, open LMs to identify best LM and prompt style depending on specific application requirement using the proposed framework. We also show that if selected appropriately, they can outperform SOTA LLMs like DeepSeek-v2, GPT-4o-mini, Gemini-1.5-Pro, and even compete with GPT-4o.

Introduction

In the current AI landscape, a significant "GPT-bias" exists. Developers frequently default to massive, proprietary models like GPT-4o because they are perceived as universally superior. However, these models come with substantial drawbacks: high API costs, latency issues, data privacy concerns, and a lack of transparency regarding their training data and internal mechanisms.

While many small, open-source models (SLMs) have emerged, they do not perform uniformly well across all tasks. A model that excels at "Title Generation" might struggle with "Formal Logic." This research addresses the lack of a systematic methodology for practitioners to choose the right SLM for specific practical requirements, effectively bridging the gap between theoretical benchmarks and real-world application needs.

Methodology

Evaluation Framework

The researchers proposed a three-tier evaluation framework designed to categorize tasks hierarchically:

  1. Aspects: The broadest categories, including Task Types, Application Domains, and Reasoning Types.
  2. Groups: Mid-level clusters, such as "Media & Entertainment" under the Domain aspect.
  3. Entities: Specific task instances, like "News" or "Social Media."
Overview of the three-tier evaluation framework and experimental setup.

Experimental Setup

The study evaluated 10 open models, ranging from 1.7B to 11B parameters. These included both pre-trained and instruction-tuned (IT) versions of SmolLM-1.7B, Gemma (2B and 7B), Llama-3-8B, Mistral-7B, and Falcon-2-11B.

To measure performance, the authors moved away from traditional n-gram metrics like ROUGE, which rely on exact word matches. Instead, they utilized BERTScore to measure semantic correctness. This metric uses contextual embeddings to better approximate human judgment of an answer's helpfulness. Additionally, the study explored eight different prompt styles, varying task definitions and the number of in-context examples (0, 2, 4, and 8).

Datasets

The study utilized a high-quality subset of the Super-Natural Instructions dataset, encompassing 11,810 task instances. This subset was carefully filtered to cover 12 Task Types, 36 Application Domains, and 18 Reasoning Types, ensuring a diverse and representative sample for practical applications.

Key Results and Analysis

Global Competitiveness

The most striking finding is that SLMs can be highly competitive with proprietary giants. Mistral-7B-I emerged as the most consistent high-performer, trailing GPT-4o by a median of only 2.12% in average semantic correctness across all tasks. In specific "Generation" tasks, it even rivaled GPT-4o's performance.

Comparative performance of instruction-tuned models across various aspects.

The "David vs. Goliath" Effect

Scale is not the sole determinant of quality. In specific domains like Social Sciences and Humanities, the tiny Gemma-2B actually outperformed Gemini-1.5-Pro. Furthermore, Gemma-2B-I was found to be only 1.44% behind Gemini-1.5-Pro globally, despite being orders of magnitude smaller and capable of running locally.

Prompting Strategies and Robustness

  • The Prompting Plateau: While adding a task definition significantly boosts performance, the benefit of adding in-context examples often plateaus after just two examples. This suggests practitioners can optimize for cost and latency by using fewer examples without sacrificing quality.
  • Instruction Tuning: Instruction-tuned models (suffix "-I") were significantly more robust and easier to prompt than pre-trained versions, which often required more carefully crafted few-shot examples to remain on-task.
  • Phrasing Robustness: Models proved remarkably resilient to how a task was defined. When task definitions were paraphrased, the median performance decrease was a negligible 0.35%.

Discussion and Limitations

While the results are promising, the authors acknowledge several constraints:

  • Dataset Accuracy: The study assumes the labels in the Super-Natural Instructions dataset are 100% accurate.
  • Model Size Cap: The study focused on models up to 11B parameters; the "sweet spot" between 11B and 70B remains an area for future exploration.
  • Intersectionality: Future work should examine the intersection of aspects—for instance, how a model performs at "Grammar Correction" specifically within the "Economics" domain.
  • Safety and Bias: This evaluation focused purely on semantic correctness and did not assess social biases or safety guardrails.

Conclusion

Small Language Models are no longer just for research; they are ready for the "big leagues" of practical applications. By using the proposed three-tier framework, developers can identify specific SLMs that match or exceed the performance of proprietary LLMs for their unique needs, often at a fraction of the cost and with greater privacy and control.

Summary updated

BibTeX
@misc{sinha2024are,
  author = {Neelabh Sinha and Vinija Jain and Aman Chadha},
  title = {{Are Small Language Models Ready to Compete with Large Language Models for Practical Applications?}},
  year = {2024},
  eprint = {2406.11402},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11402},
}
Figure