LLM Interactive Optimization of Open Source Python Libraries -- Case Studies and Generalization
Andreas Florath

TL;DR
This study demonstrates that large language models like ChatGPT-4 can effectively optimize open source Python libraries for energy and compute efficiency through interactive human-in-the-loop processes, with significant performance gains.
Contribution
It provides a detailed methodology and case studies showing how LLMs can be used for code optimization, emphasizing the importance of human expertise and demonstrating generalization across libraries.
Findings
Performance improvements up to 38 times in optimized code
Human-in-the-loop is essential for successful optimization
Few iterations needed for substantial performance gains
Abstract
With the advent of large language models (LLMs) like GPT-3, a natural question is the extent to which these models can be utilized for source code optimization. This paper presents methodologically stringent case studies applied to well-known open source python libraries pillow and numpy. We find that contemporary LLM ChatGPT-4 (state September and October 2023) is surprisingly adept at optimizing energy and compute efficiency. However, this is only the case in interactive use, with a human expert in the loop. Aware of experimenter bias, we document our qualitative approach in detail, and provide transcript and source code. We start by providing a detailed description of our approach in conversing with the LLM to optimize the _getextrema function in the pillow library, and a quantitative evaluation of the performance improvement. To demonstrate qualitative replicability, we report…
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
TopicsParallel Computing and Optimization Techniques · Topic Modeling · Ferroelectric and Negative Capacitance Devices
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · {Dispute@FaQ-s}How to file a dispute with Expedia? · Attention Is All You Need · Cosine Annealing · Attention Dropout · 15 Ways to Contact How can i speak to someone at Delta Airlines · Linear Layer · Multi-Head Attention · Dense Connections · Linear Warmup With Cosine Annealing
