低リソース言語をLLMに教える:Pharoにおけるコード補完の強化
Teaching LLMs a Low-Resource Language: Enhancing Code Completion in Pharo
July 6, 2026
著者: Kilian Kier, Alessandro Giagnorio, Omar AbedelKader, Oleksandr Zaitsev, Robert Peharz, Romain Robbes, Gabriele Bavota, Stéphane Ducasse
cs.AI
要旨
大規模言語モデル(LLMs)は自動コード記述において新たな可能性を切り開き、ほとんどのコード補完ツールの基盤となっている。LLMsは主流の言語では優れた性能を発揮するが、学習データが不足しているいわゆる低リソース言語に対するサポートは不足していることが多い。その結果、これらの言語はコミュニティが利用できるコード補完ツールの品質において遅れをとっている。具体例として、Smalltalkに触発された言語であるPharoが挙げられる。そのIDEは現在、単一トークンの補完しか提供していない。本稿では、LLMベースのコード補完をPharoに導入した経験について報告する。第一に、Pharo固有のデータキュレーション、オープンコードLLMの継続事前学習およびファインチューニングを組み合わせたエンドツーエンドのパイプラインについて説明する。第二に、モデルが(i) Pharoの構文を学習し、(ii) 実際のGitHubリポジトリからマスクされたPharoコードを正確に補完するかを評価するための一連のPharoコード補完ベンチマークを紹介する。第三に、Pharoに特化したモデルが元のベースチェックポイントを大幅に上回り、かつPharo補完においてはるかに大規模なコードLLMの精度をも超えることを実証的に示す。全体として、本研究のケーススタディは、低リソースプログラミング言語に対して、IDE内で「リアルタイム」のサポートを提供できるほど小規模なモデルを用いて、強力なLLMベースのコード補完を導入することの実現可能性を示している。
English
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.