Skill over Scale: The Case for Medium, Domain-Specific Models for SE

Recent advancements in AI have sparked a trend in constructing large, generalist language models that handle a multitude of tasks, including many code-related ones. While these models are expensive to train and are often closed-source, they have enjoyed broad adoption because they tend to outperform smaller, domain-specific models of code. In this work, we argue that this is not a foregone conclusion. We show that modestly sized domain-specific models can outperform much larger ones on code labeling tasks, provided they are trained to the same standards. Concretely, we focus on StackOverflow (SO), which offers large volumes of aligned code and text data. We align established best-practices for pre-training large language models with properties of StackOverflow as a data source, especially using a large context window (2,048 tokens), coupled with a powerful toolkit (Megatron-LM) to train two models: SOBertBase [1], with 125M parameters, and SOBertLarge [2] with 762M parameters, at a budget of just $374 and $1600 each. We compare the performance of our models with a prior domain-specific model which did not adopt many of these practices (BERTOverflow), as well two general-purpose BERT models (BERTBase and BERTLarge), and two models in OpenAI’s GPT series (GPT-3.5 and GPT-4). We study four labeling tasks: question quality prediction, closed question prediction, named entity recognition and obsoletion prediction. The final task is a new benchmark we introduce, on which we additionally compare SOBert with a fine-tuned CodeLlama and StackLlama (models with 10x more parameters than SOBertLarge). Our models, including the smaller one, consistently outperform all baselines. In contrast, BertOverflow is outperformed by generalist models in most tasks. These results demonstrate that pre-training both extensively and properly on in-domain data can yield a powerful and affordable alternative to leveraging closed-source general-purpose models. Both models are released to the public with over 500 downloads in the last month alone on Hugging Face.

Authors

Institutions

Publication Details

Published
2025-04-27
DOI
https://doi.org/10.1109/forge66646.2025.00031
Primary Topic
Regional Development and Policy
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Skill over Scale: The Case for Medium, Domain-Specific Models for SE

Vincent J. Hellendoorn, Manisha Mukherjee
Regional Development and Policy
article

Skill over Scale: The Case for Medium, Domain-Specific Models for SE

Vincent J. Hellendoorn, Manisha Mukherjee
article en

Abstract

Recent advancements in AI have sparked a trend in constructing large, generalist language models that handle a multitude of tasks, including many code-related ones. While these models are expensive to train and are often closed-source, they have enjoyed broad adoption because they tend to outperform smaller, domain-specific models of code. In this work, we argue that this is not a foregone conclusion. We show that modestly sized domain-specific models can outperform much larger ones on code labeling tasks, provided they are trained to the same standards. Concretely, we focus on StackOverflow (SO), which offers large volumes of aligned code and text data. We align established best-practices for pre-training large language models with properties of StackOverflow as a data source, especially using a large context window (2,048 tokens), coupled with a powerful toolkit (Megatron-LM) to train two models: SOBertBase [1], with 125M parameters, and SOBertLarge [2] with 762M parameters, at a budget of just $374 and $1600 each. We compare the performance of our models with a prior domain-specific model which did not adopt many of these practices (BERTOverflow), as well two general-purpose BERT models (BERTBase and BERTLarge), and two models in OpenAI’s GPT series (GPT-3.5 and GPT-4). We study four labeling tasks: question quality prediction, closed question prediction, named entity recognition and obsoletion prediction. The final task is a new benchmark we introduce, on which we additionally compare SOBert with a fine-tuned CodeLlama and StackLlama (models with 10x more parameters than SOBertLarge). Our models, including the smaller one, consistently outperform all baselines. In contrast, BertOverflow is outperformed by generalist models in most tasks. These results demonstrate that pre-training both extensively and properly on in-domain data can yield a powerful and affordable alternative to leveraging closed-source general-purpose models. Both models are released to the public with over 500 downloads in the last month alone on Hugging Face.

Carnegie Mellon University (US)
Openalex Percentile: Top 81%
Regional Development and Policy
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Skill over Scale: The Case for Medium, Domain-Specific Models for SE — Vincent J. Hellendoorn, Manisha Mukherjee · (2025) | TGRS Research Map | TGRS