Improving Code Generation via Small Language Model-as-a-judge
Giuseppe Crupi, Rosalia Tufano, Gabriele Bavota

TL;DR
This paper demonstrates that small language models can effectively serve as judges for code correctness, outperforming previous models and rivaling larger LLMs at a fraction of the cost.
Contribution
The study trains and evaluates modern small language models as code correctness judges, showing they outperform prior models like RankEF and match larger LLMs in accuracy and efficiency.
Findings
Small language models outperform RankEF in code judging accuracy.
Modern SLMs achieve higher performance than RankEF without execution info.
SLMs match the performance of much larger LLMs at lower cost.
Abstract
Large language models (LLMs) have shown remarkable capabilities in automated code generation. While effective for mainstream languages, they may underperform on less common or domain-specific languages, prompting companies to develop in-house code generators. While open-source models can be trained for this, only LLMs with tens of billions of parameters match the performance of commercial tools, demanding costly training and deployment. Recent work proposed supporting code generation with smaller models (SLMs) by generating multiple candidate solutions and using another SLM to select the most likely correct one. The most recent work in this area is the one by Sun et al. [29] presenting RankEF, a T5 model trained to rank code solutions using both execution-based and non-execution-based information. However, Sun et al. do not assess the T5 ranker's classification accuracy, that is, how…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Artificial Intelligence in Healthcare and Education
