Rethinking Data: Towards Better Performing Domain-Specific Small Language Models
Boris Nazarov, Darya Frolova, Yackov Lubarsky, Alexei Gaissinski, Pavel Kisilev
TL;DR
This work tackles domain-specific MC-QA with resource-efficient small LMs by building a modular pipeline that enhances data quality, context selection, and generalization. It introduces a data-preparation strategy that converts documents into compact, semantically meaningful chunks and a Chunk Re-Ranker (CRR) to refine retrieved context, all applied to a $2.5B$ Phi-2 model. Through cross-validated fine-tuning, CRR-based filtering, and weight-averaged model merging across data subsets, the approach achieves competitive MC-QA accuracy, attaining $77\%$ on a public test and $79.7\%$ on a private test. The results demonstrate that careful data engineering and context management can enable high performance from domain-specific small LMs, offering a cost-effective alternative to large LLMs for telecom knowledge tasks. The methods have practical impact for deploying domain-focused LMs where computational efficiency and data quality are critical.
Abstract
Fine-tuning of Large Language Models (LLMs) for downstream tasks, performed on domain-specific data has shown significant promise. However, commercial use of such LLMs is limited by the high computational cost required for their deployment at scale. On the other hand, small Language Models (LMs) are much more cost effective but have subpar performance in a similar setup. This paper presents our approach to finetuning a small LM, that reaches high accuracy in multiple choice question answering task. We achieve this by improving data quality at each stage of the LM training pipeline. In particular, we start with data structuring resulting in extraction of compact, semantically meaningful text chunks used by a retriever. This allows more efficient knowledge digestion by the LM. Further, we improve the retrieved context by training a lightweight Chunk Re-Ranker (CRR) that generates more accurate relative relevance chunk scores. Finally, we improve the model generalization ability by merging the models fine-tuned with different parameters on different data subsets. We present detailed procedure descriptions, and corresponding experimental findings that show the improvements of each one of the proposed techniques.
