DocuMint: Docstring Generation for Python using Small Language Models
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 17 of its 34 references that are in the map. First posted on arXiv 16 May 2024.
Builds on
17 of 34 references.
References · 17
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,917
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2022Automatic Generation of Programming Exercises and Code Explanations using Large Language Modelscited by 126
5 more
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 70
- 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-Thoughtcited by 39
- 2020World of Code: Enabling a Research Workflow for Mining and Analyzing the Universe of Open Source VCS datacited by 7
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.