data-curation low-resource-languages llm-fine-tuning code-completion pharo code-llm ide-support smalltalk
Abstract
Large Language Models (LLMs) unlocked new possibilities in automated code writing, becoming the backbone of most code completion tools. While LLMs excel in mainstream languages, they often lack support for the so-called low-resource languages where training data is scarce. As a result, these languages lag behind in the quality of code completion tooling available to their communities. A concrete example is Pharo, a Smalltalk-inspired language whose IDE currently offers only single-token completion. In this work, we report on our experience bringing LLM-based code completion to Pharo. First, we describe an end-to-end pipeline that combines Pharo-specific data curation, continued pre-training and fine-tuning of open code LLMs. Second, we introduce a set of Pharo code completion benchmarks designed to evaluate whether models (i) learn Pharo's syntax and (ii) accurately complete masked Pharo code from real-world GitHub repositories. Third, we show empirically that Pharo-specialized models substantially outperform their original base checkpoints and also exceed the accuracy of substantially larger code LLMs on Pharo completion. Overall, our case study demonstrates the feasibility of bringing strong LLM-based code completion to low-resource programming languages, with models small enough to provide ``real-time'' in-IDE support.
한국어 요약
한 줄 요약
Pharo 언어에 맞춘 LLM 기반 코드 완성 성능을 향상시키는 방법을 제시한다.
핵심 기여도
- Pharo 언어를 위한 데이터 정제, continued pre-training 및 fine-tuning 파이프라인을 제시.
- Pharo 코드 완성 성능을 평가하기 위한 벤치마크 세트를 설계.
- Pharo 전용 모델이 기존 베이스 모델 및 더 큰 코드 LLM보다 정확도가 높음.
핵심 아이디어
Pharo는 Smalltalk 계열의 언어로, IDE에서 단일 토큰 기반의 코드 완성만 제공된다. 본 연구는 Pharo와 같은 저자원 언어에 LLM 기반의 강력한 코드 완성 기능을 도입하기 위한 접근법을 제시한다. 핵심 아이디어는 Pharo 특화된 데이터셋을 기반으로 기존 오픈소스 코드 LLM을 continued pre-training 및 fine-tuning하여 성능을 향상시키는 것이다. 이는 Pharo의 문법 구조와 실제 GitHub 저장소의 코드 패턴을 학습하게 함으로써, 기존 모델이 Pharo에 대한 이해를 높이도록 유도한다.
기술적 접근법
- Pharo-specific 데이터 정제: GitHub에서 실제 Pharo 코드를 수집하여 전처리.
- Continued pre-training: 오픈소스 코드 LLM을 Pharo 데이터셋으로 추가 학습.
- Fine-tuning: 코드 완성 목적에 맞게 모델을 최적화.
- Pharo 코드 완성 벤치마크: 문법 학습과 실제 코드 완성 능력을 평가하는 두 가지 태스크로 구성.
주요 결과
- Pharo 전용 모델은 기존 베이스 모델 대비 정확도가 높음.
- Pharo 코드 완성에서 더 큰 코드 LLM보다 높은 정확도를 보임.
- 실시간 IDE 지원을 위한 충분히 작은 모델 크기 유지.
의의 및 한계
본 연구는 저자원 프로그래밍 언어에 LLM 기반 코드 완성 기술을 적용할 수 있음을 실증적으로 보여준다. Pharo 언어 커뮤니티는 더 나은 개발 환경을 확보할 수 있으며, 이는 다른 저자원 언어에도 확장 가능하다는 점에서 학술적·실용적 의의가 있다. 그러나 Pharo 데이터셋의 양이 제한적이기 때문에, 더 많은 데이터 확보가 성능 향상에 도움이 될 수 있다.
실용적 활용
Pharo 언어를 사용하는 소프트웨어 개발자들이 실시간 코드 완성 기능을 활용할 수 있으며, 이 접근법은 다른 저자원 언어의 IDE 개선에도 적용 가능하다.