Skip to main content
QUICK REVIEW

[Paper Review] Open, Closed, or Small Language Models for Text Classification?

Hao Yu, Zachary Yang|arXiv (Cornell University)|Aug 19, 2023
Topic ModelingComputer Science16 citations
TL;DR

Smaller supervised models often match or beat generative LLMs; open-source models with fine-tuning can rival closed ones, while largest closed models excel on hardest tasks.

ABSTRACT

Recent advancements in large language models have demonstrated remarkable capabilities across various NLP tasks. But many questions remain, including whether open-source models match closed ones, why these models excel or struggle with certain tasks, and what types of practical procedures can improve performance. We address these questions in the context of classification by evaluating three classes of models using eight datasets across three distinct tasks: named entity recognition, political party prediction, and misinformation detection. While larger LLMs often lead to improved performance, open-source models can rival their closed-source counterparts by fine-tuning. Moreover, supervised smaller models, like RoBERTa, can achieve similar or even greater performance in many datasets compared to generative LLMs. On the other hand, closed models maintain an advantage in hard tasks that demand the most generalizability. This study underscores the importance of model selection based on task requirements

Motivation & Objective

  • Assess whether open-source models match closed LLMs on text classification tasks.
  • Evaluate three model classes (open LLMs, closed LLMs, and RoBERTa) across multiple datasets and tasks.
  • Identify prompting and fine-tuning strategies that affect performance and generalizability.
  • Analyze cost and energy implications of different model choices.

Proposed method

  • Compare model types: Llama 2 (13B, 70B), GPT-3.5, GPT-4, and RoBERTa (123M, 354M) across three tasks.
  • Evaluate zero-shot, few-shot, and fine-tuned setups.
  • Use LoRA fine-tuning for Llama 2(70B) on NER with combined datasets.
  • Test two prompt styles (Serial, JSON) for LLMs and analyze prompt sensitivity.
  • Measure performance with task-appropriate metrics (F1, accuracy, macro-F1).
  • Provide a cost and energy consumption analysis for training and inference.
Figure 1: The training loss curve for supervised finetuning with Llama2 70B Chat on the combined dataset.
Figure 1: The training loss curve for supervised finetuning with Llama2 70B Chat on the combined dataset.

Experimental results

Research questions

  • RQ1How do open-source Llama 2 models compare to closed LLMs (GPT-3.5, GPT-4) and RoBERTa on NER, ideology prediction, and misinformation tasks?
  • RQ2What prompting, few-shot, and fine-tuning strategies maximize performance for each model class?
  • RQ3Do open-source models regain competitiveness through fine-tuning, and do closed models maintain advantages on hardest tasks?
  • RQ4What are the relative costs and energy implications of using each model class in practice?

Key findings

  • Smaller supervised models like RoBERTa often match or outperform open/open-source LLMs and GPT-3.5, and can even approach GPT-4 in some cases.
  • Prompt engineering substantially affects LLM performance; JSON prompts boost few-shot results for GPT-3.5 while serial prompts can help Llama 2 in zero-shot.
  • Fine-tuned open-source Llama 2 (70B) can beat GPT-3.5, but RoBERTa often remains superior overall in cost, speed, and transparency.
  • Largest closed models still lead on the most challenging tasks requiring broad generalization (e.g., certain CT-FAN-22 misinformation settings).
  • Open-source models with fine-tuning offer environmental and cost advantages; RoBERTa shows the best energy efficiency and cost profile for many tasks.
  • RoBERTa can achieve similar or better performance than generative LLMs in several datasets, highlighting the value of discriminative, supervised approaches.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.