DocuMint: Docstring Generation for Python using Small Language Models

要約

特にドキュメントを通じた効果的なコミュニケーションは、ソフトウェア開発における貢献者間のコラボレーションの心臓部です。
言語モデル (LM) の最近の進歩により、そのエコシステムに新しいタイプのアクター、つまりコード生成、最適化、メンテナンスが可能な LM を利用したアシスタントの導入が可能になりました。
私たちの研究では、正確さ、簡潔さ、明確さを評価し、数式を通じて定量的にパフォーマンスをベンチマークし、リッカート尺度を使用した人的評価を通じて定性的にパフォーマンスをベンチマークすることにより、高品質のドキュメント文字列を生成するための小型言語モデル (SLM) の有効性を調査しています。
さらに、100,000 サンプルを含む大規模な教師あり微調整データセットとして DocuMint を紹介します。
定量的実験では、Llama 3 8B がすべての指標にわたって最高のパフォーマンスを達成し、簡潔さと明瞭さのスコアはそれぞれ 0.605 と 64.88 でした。
ただし、人間による評価では、CodeGemma 7B がすべての指標で 10 点中平均 8.3 という最高の総合スコアを達成しました。
DocuMint データセットを使用して CodeGemma 2B モデルを微調整すると、すべてのメトリックにわたってパフォーマンスが大幅に向上し、簡潔さが最大 ​​22.5% 向上しました。
微調整されたモデルとデータセットは HuggingFace にあり、コードはリポジトリにあります。

要約(オリジナル)

Effective communication, specifically through documentation, is the beating heart of collaboration among contributors in software development. Recent advancements in language models (LMs) have enabled the introduction of a new type of actor in that ecosystem: LM-powered assistants capable of code generation, optimization, and maintenance. Our study investigates the efficacy of small language models (SLMs) for generating high-quality docstrings by assessing accuracy, conciseness, and clarity, benchmarking performance quantitatively through mathematical formulas and qualitatively through human evaluation using Likert scale. Further, we introduce DocuMint, as a large-scale supervised fine-tuning dataset with 100,000 samples. In quantitative experiments, Llama 3 8B achieved the best performance across all metrics, with conciseness and clarity scores of 0.605 and 64.88, respectively. However, under human evaluation, CodeGemma 7B achieved the highest overall score with an average of 8.3 out of 10 across all metrics. Fine-tuning the CodeGemma 2B model using the DocuMint dataset led to significant improvements in performance across all metrics, with gains of up to 22.5% in conciseness. The fine-tuned model and the dataset can be found in HuggingFace and the code can be found in the repository.

arxiv情報

著者 Bibek Poudel,Adam Cook,Sekou Traore,Shelah Ameli
発行日 2024-05-16 16:46:46+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.LG, cs.SE パーマリンク