Work

Adapting Small Language Models to Delphi and Proprietary Codebase Through Continued Pre- training

Year: 2026
Type: article
Abstract: This thesis studies the effectiveness of continued pre-training for domain adaption in small language models (SMLs). The study compares two model: a general-purpose model (Qwen 3 1.7B parameters) and a coding tuned model (Qwen 2.5 Coder 1.5B parameters). Models are trained with the source code of a proprietary platform written in Delphi. The primary objective is to evaluate whether small language models can acquire repository-level code understanding via continued pre-training. With domain adaption, the model learns domain-specific syntax, APIs and design patterns. One important aspect of the study was to develop fully local coding assistant. Small language models make training possible, as it can be conducted on consumer-grade hardware. Local models include several advantages including improved data security, full control over the system, reduced operational costs and independence from external services. Parameter efficient fine-tuning techniques, specifically quantized low-rank adaption (LoRA) was used to best utilize the available hardware. The adapted models are evaluated on a set of custom made tasks, including code generation, bug-fixing, code completion and domain-specific explanation. The model responses are evaluated using a combination of automated metrics, BLEU and LLM-as-a-judge, supplemented with manual validation. The results indicate that continued pre-training with source code leads to modest improvements in code generation. This is particularly true for the coding tuned model, although these improvements remain limited and are accompanied with reduced performance in general language tasks. The general-purpose model demonstrates significantly weaker performance, often struggling to follow instructions and producing long repetitive outputs. These findings highlight the challenge of achieving repository-level understanding with small models and underline the importance of model selection.
Language: Finnish
Open Access status: green
OpenAlex ID: W7212408759
FWCI:
Cites:
Cited by:
Related to: 10