This repository provides a Pharo-specialized variant of Qwen2.5-Coder, fine-tuned for fill-in-the-middle (FIM) code completion in Pharo, a Smalltalk-inspired, low-resource programming language.
The model is designed to complete partially written Pharo methods by predicting the missing code between a given prefix and suffix, making it suitable for IDE-assisted code completion.
Training pipeline: Continued pre-training followed by supervised fine-tuning
Maximum context length: 32,768 tokens
Motivation
Large language models perform remarkably well on widely used programming languages such as Python, Java, and JavaScript, but their performance remains limited for low-resource languages such as Pharo.
Pharo inherits several unique characteristics from Smalltalk, including keyword-based message syntax, message-oriented control flow, and concise methods. These models are specifically adapted to these characteristics to provide more accurate and practical code completion while remaining compact enough for efficient local inference and IDE integration.
Training Overview
The model is trained using a two-stage specialization pipeline.
Continued Pre-Training
The base Qwen2.5-Coder model is first adapted to Pharo source code through continued pre-training on a curated corpus of Pharo methods. This stage teaches the model Pharo syntax, APIs, and coding conventions.
Supervised Fine-Tuning
The adapted checkpoint is then fine-tuned on realistic fill-in-the-middle completion examples generated from Pharo methods. Completion targets begin at arbitrary cursor positions, better reflecting real-world code editing scenarios.
If you use this model in your research or applications, please cite our paper:
bibtex
1@article{teachingllmslowresourcelanguage,
2 title={Teaching LLMs a Low-Resource Language: Enhancing Code Completion in Pharo},
3 author={Kilian Kier and Alessandro Giagnorio and Omar AbedelKader and Oleksandr Zaitsev and Robert Peharz and Romain Robbes and Gabriele Bavota and Stéphane Ducasse},
4 journal={arXiv},
5 year={2026},
6 doi={10.48550/arXiv.2607.04939}
7}