Skip to main content
QUICK REVIEW

[Paper Review] Comparison of Open-Source and Proprietary LLMs for Machine Reading Comprehension: A Practical Analysis for Industrial Applications

Mahaman Sanoussi Yahaya Alassan, Jéssica López Espejel|arXiv (Cornell University)|Jun 19, 2024
Topic ModelingComputer Science3 citations
TL;DR

This paper benchmarks open-source and proprietary LLMs for machine reading comprehension, evaluating performance, inference speed, and resource efficiency on CPU. It identifies Mistral-7b-openorca.Q3_K_M and dolphin-2.6-mistral-7b.Q5_K_M as top open-source alternatives offering high accuracy (83% EM) with low RAM usage (≤7.63 GB) and fast inference (≤65 ms), making them viable for industrial deployment.

ABSTRACT

Large Language Models (LLMs) have recently demonstrated remarkable performance in various Natural Language Processing (NLP) applications, such as sentiment analysis, content generation, and personalized recommendations. Despite their impressive capabilities, there remains a significant need for systematic studies concerning the practical application of LLMs in industrial settings, as well as the specific requirements and challenges related to their deployment in these contexts. This need is particularly critical for Machine Reading Comprehension (MCR), where factual, concise, and accurate responses are required. To date, most MCR rely on Small Language Models (SLMs) or Recurrent Neural Networks (RNNs) such as Long Short-Term Memory (LSTM). This trend is evident in the SQuAD2.0 rankings on the Papers with Code table. This article presents a comparative analysis between open-source LLMs and proprietary models on this task, aiming to identify light and open-source alternatives that offer comparable performance to proprietary models.

Motivation & Objective

  • To evaluate the trade-offs between open-source and proprietary LLMs in industrial machine reading comprehension tasks.
  • To identify open-source LLMs that deliver high performance while minimizing resource consumption for CPU-based inference.
  • To provide actionable insights for selecting efficient LLMs in cost-sensitive, real-world industrial applications.
  • To assess the impact of quantization strategies on model accuracy, speed, and memory usage across different LLM architectures.

Proposed method

  • Benchmarked 22 LLMs—including proprietary models (ChatGPT-4, ChatGPT-3.5) and open-source models (Llama-2, Mistral, Dolphin-2, and fine-tuned variants) — on a custom question-answering dataset.
  • Applied quantization techniques (Q2_K to Q8_0) with k-means clustering to reduce model size and memory footprint while preserving performance.
  • Measured inference speed (in ms), required RAM, and standard NLP metrics: Exact Match (EM), ROUGE-2, and ROUGE-L.
  • Used few-shot prompting to guide model generation and ensure consistent evaluation across all models.
  • Evaluated models across diverse context lengths and question types to assess robustness in complex reasoning.
  • Compared performance across model families and quantization levels to identify optimal trade-offs between accuracy and efficiency.

Experimental results

Research questions

  • RQ1Which open-source LLMs achieve performance comparable to proprietary models like ChatGPT-4 in machine reading comprehension while being efficient for CPU inference?
  • RQ2How does quantization affect the accuracy, inference speed, and memory consumption of open-source LLMs in QA tasks?
  • RQ3What is the performance of fine-tuned open-source models (e.g., Mistral-7b-openorca, dolphin-2.6-mistral-7b) relative to their base counterparts?
  • RQ4How do proprietary models like ChatGPT-4 and ChatGPT-3.5 compare in inference speed and resource usage against optimized open-source alternatives?
  • RQ5Which open-source LLMs offer the best balance between high EM scores, low RAM usage, and fast inference times for industrial deployment?

Key findings

  • ChatGPT-4 achieved the highest EM score (87.0%) and ROUGE-L (94.0%), but required high computational resources and was not deployable on CPU.
  • Mistral-7b-openorca.Q3_K_M achieved 83.0% EM with only 6.02 GB RAM and 42.31 ms inference time, making it one of the most efficient high-performing models.
  • dolphin-2.6-mistral-7b.Q5_K_M delivered 83.0% EM with 7.63 GB RAM and 63.84 ms inference time, offering strong performance and efficiency.
  • Quantized Llama-2-7b models showed performance degradation with lower quantization levels (e.g., Q2_K), achieving only 71.0% EM, but required less than 6 GB RAM.
  • The dolphin-2_6-phi-2.Q5_K_M model achieved the fastest inference time (25.72 ms) among open-source models, though with slightly lower accuracy (70.0% EM).
  • Mistral-7b-instruct-v0.2 models showed consistent performance across quantization levels, with Q4_K_M achieving 76.0% EM and 49.75 ms inference time.

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.