Enhancing SLMs for Sustainable Code Optimization in Radio-Astronomy
Not on the map. Why?
Abstract (arXiv)
Recent Large Language Models (LLMs) can produce and optimize complex code. We investigate the use of LLMs to generate and optimize code for large-scale sciences, focusing on radio astronomy and sustainability. The LOFAR telescope is currently being upgraded, significantly increasing the sky area observed, while simultaneously processing more data faster. However, this is expected to increase the computational requirements 40-fold. This upgrade thus critically depends on rigorous performance optimization of existing software and widespread adoption of accelerators. The code base is very large, making this a daunting task. We therefore investigate and demonstrate an AI-driven approach meant to assist developers in evaluating and optimizing their code, including porting to hardware accelerators. The LOFAR community is committed to sustainable solutions, and needs to achieve these improvements without increasing the energy budget. We thus need to optimize existing codes or port them to accelerators, while making sure that the optimization process itself is also energy efficient. This poses a challenge, since LLMs are energy-intensive. We therefore propose to use Small Language Models (SLMs) instead to limit environmental impact. In this paper, we show how to enhance SLMs through the use of agentic AI. We extend the SLMs in two ways to improve code generation quality and performance: first with a multi-sampling generation strategy and second with incorporating compiler feedback. We demonstrate that multi-sampling SLMs can match or surpass larger single-generation models with fewer computational resources and that feeding compiler output back into the SLMs leads to consistent improvements across all tested models. Our approach is generic, and can also use Retrieval Augmented Generation (RAG) as well as static and dynamic analysis tools in the code generation pipeline.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 43 of its 61 references that are in the map. First posted on arXiv 23 Jul 2026.
Builds on
43 of 61 references.
References · 43
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2024Qwen2.5 Technical Reportcited by 4,713
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2024Mixtral of Expertscited by 1,785
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 873
- 2021Carbon Emissions and Large Neural Network Trainingcited by 561
- 2019Quantifying the Carbon Emissions of Machine Learningcited by 516
31 more
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2024LightRAG: Simple and Fast Retrieval-Augmented Generationcited by 310
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
- 2025Why Language Models Hallucinatecited by 205
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2024Forest-of-Thought: Scaling Test-Time Compute for Enhancing LLM Reasoningcited by 110
- 2025Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivitycited by 93
- 2024Buffer of Thoughts: Thought-Augmented Reasoning with Large Language Modelscited by 91
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 87
- 2023Everything of Thoughts: Defying the Law of Penrose Triangle for Thought Generationcited by 73
- 2025How Hungry is AI? Benchmarking Energy, Water, and Carbon Footprint of LLM Inferencecited by 73
- 2024Demystifying Chains, Trees, and Graphs of Thoughtscited by 63
- 2026Qwen3-Coder-Next Technical Reportcited by 60
- 2025How much do language models memorize?cited by 53
- 2023Making AI Less "Thirsty": Uncovering and Addressing the Secret Water Footprint of AI Modelscited by 44
- 2024The Larger the Better? Improved LLM Code-Generation via Budget Reallocationcited by 41
- 2024Scaling Laws for Fact Memorization of Large Language Modelscited by 33
- 2024Recite, Reconstruct, Recollect: Memorization in LMs as a Multifaceted Phenomenoncited by 30
- 2025Towards Reasoning Ability of Small Language Modelscited by 29
- 2024How Interpretable are Reasoning Explanations from Prompting Large Language Models?cited by 27
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2025Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projectscited by 23
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2024METIS: Fast Quality-Aware RAG Systems with Configuration Adaptationcited by 16
- 2025Human-Written vs. AI-Generated Code: A Large-Scale Study of Defects, Vulnerabilities, and Complexitycited by 16
- 2024Reversal of Thought: Enhancing Large Language Models with Preference-Guided Reverse Reasoning Warm-upcited by 10
- 2025Static Analysis as a Feedback Loop: Enhancing LLM-Generated Code Beyond Correctnesscited by 7
- 2025Combining Large Language Models with Static Analyzers for Code Review Generationcited by 6
- 2024SuperCode: Sustainability PER AI-driven CO-DEsigncited by 2
- 2025CelloAI: Leveraging Large Language Models for HPC Software Development in High Energy Physicscited by 2
- 2025astroCAMP: A Community Benchmark and Co-Design Framework for Sustainable SKA-Scale Radio Imagingcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025AI Agents for Ground-Based Gamma Astronomy
- 2025Large Language Models Achieve Gold Medal Performance at the International Olympiad on Astronomy & Astrophysics (IOAA)
- 2024Designing an Evaluation Framework for Large Language Models in Astronomy Research
- 2025AstroMLab 4: Benchmark-Topping Performance in Astronomy Q&A with a 70B-Parameter Domain-Specialized Reasoning Model
- 2025From Queries to Criteria: Understanding How Astronomers Evaluate LLMs
- 2026Exploring the Role of LLMs in HPC Programming: A Survey
- 2024Performance-Aligned LLMs for Generating Fast Code
- 2026Can LLMs Do Rocket Science? Exploring the Limits of Complex Reasoning with GTOC 12