ChatPaper.aiChatPaper

技術報告書:Qプログラミング言語のフルスタックファインチューニング

Technical Report: Full-Stack Fine-Tuning for the Q Programming Language

August 9, 2025
著者: Brendan R. Hogan, Will Brown, Adel Boyarsky, Anderson Schneider, Yuriy Nevmyvaka
cs.AI

要旨

大規模言語モデルがますます高度化しているにもかかわらず、インターネット上で十分に表現されていないタスクにおいて優れた性能を発揮することを期待するのは依然として非現実的である。特に、ニッチなプログラミング言語やプライベートなドメインにおける専門的なアプリケーションにおいて、大規模言語モデルを活用することは困難であり、未解決の課題が多い。本研究では、このギャップを埋めるために、Qプログラミング言語に大規模言語モデルを適応させるための包括的でオープンソースのアプローチを提案する。Qは定量金融で広く使用されているツールであるが、Python、C、Javaなどの「主流」言語と比較してインターネット上での存在感が薄く、汎用AIモデルの得意分野ではない。本論文では、Q向けの新しいLeetcodeスタイルの評価データセットを導入し、主要なフロンティアモデルをこのデータセットでベンチマークした後、Qwen-2.5シリーズに基づいて推論モデルと非推論モデルのスイートを、5つのパラメータサイズ(1.5B、3B、7B、14B、32B)にわたって事前学習、教師あり微調整、強化学習を行い訓練した。我々の最良のモデルは、Qベンチマークにおいて59%のpass@1精度を達成し、最高性能のフロンティアモデルであるClaude Opus-4を29.5%上回った。さらに、すべてのモデル、特に1.5Bモデルでさえ、このタスクにおいてGPT-4.1を凌駕した。モデル、コード、データの公開に加えて、データセット構築、モデルの事前学習、教師あり微調整、強化学習に関する詳細な設計図を提供する。我々の方法論は広く適用可能であり、これらの技術が評価がソフトまたは主観的な信号に依存するタスクを含む他のタスクにどのように拡張できるかについても議論する。
English
Even though large language models are becoming increasingly capable, it is still unreasonable to expect them to excel at tasks that are under-represented on the Internet. Leveraging LLMs for specialized applications, particularly in niche programming languages and private domains, remains challenging and largely unsolved. In this work, we address this gap by presenting a comprehensive, open-source approach for adapting LLMs to the Q programming language, a popular tool in quantitative finance that is much less present on the Internet compared to Python, C, Java, and other ``mainstream" languages and is therefore not a strong suit of general-purpose AI models. We introduce a new Leetcode style evaluation dataset for Q, benchmark major frontier models on the dataset, then do pretraining, supervised fine tuning, and reinforcement learning to train a suite of reasoning and non-reasoning models based on the Qwen-2.5 series, spanning five parameter sizes (1.5B, 3B, 7B, 14B, 32B). Our best model achieves a pass@1 accuracy of 59 percent on our Q benchmark, surpassing the best-performing frontier model, Claude Opus-4 by 29.5 percent. Additionally, all models, even our 1.5B model, outperform GPT-4.1 on this task. In addition to releasing models, code, and data, we provide a detailed blueprint for dataset construction, model pretraining, supervised fine-tuning, and reinforcement learning. Our methodology is broadly applicable, and we discuss how these techniques can be extended to other tasks, including those where evaluation may rely on soft or subjective signals.
PDF31August 13, 2025