让大模型学会小众编程语言Q,性能超GPT-4
Technical Report: Full-Stack Fine-Tuning for the Q Programming Language
- 针对冷门语言Q构建全栈微调流程,覆盖预训练到强化学习
- 32B模型在Q语言任务上达59%正确率,比Claude Opus-4高29.5%
- 1.5B小模型也超越GPT-4.1,适合资源有限的开发者
尽管大语言模型能力不断增强,但对互联网数据稀少的任务仍难胜任。本文针对量化金融中使用广泛却数据稀缺的Q编程语言,提出一套完整的开源适配方案。构建了类Leetcode评测数据集,基准测试主流前沿模型后,基于Qwen-2.5系列开展预训练、监督微调与强化学习,训练出涵盖1.5B、3B、7B、14B、32B五种规模的推理与非推理模型。最优模型在Q基准测试中达到59% pass@1准确率,较表现最佳的Claude Opus-4提升29.5%;所有模型,包括1.5B版本,均优于GPT-4.1。除发布模型、代码与数据外,还提供数据构建、预训练、微调与强化学习的详细蓝图。该方法具广泛适用性,可拓展至依赖软性或主观评估的任务。
原文摘要 · Abstract (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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。