LLM Interactive Optimization of Open Source Python Libraries -- Case
Studies and Generalization
- URL: http://arxiv.org/abs/2312.14949v2
- Date: Thu, 29 Feb 2024 10:55:25 GMT
- Title: LLM Interactive Optimization of Open Source Python Libraries -- Case
Studies and Generalization
- Authors: Andreas Florath
- Abstract summary: 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 is surprisingly adept at optimizing energy and compute efficiency.
We conclude that LLMs are a promising tool for code optimization in open source libraries, but that the human expert in the loop is essential for success.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- 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 further attempts on another
locus in the pillow library, and one code locus in the numpy library, to
demonstrate generalization within and beyond a library. In all attempts, the
performance improvement is significant (factor up to 38). We have also not
omitted reporting of failed attempts (there were none). We conclude that LLMs
are a promising tool for code optimization in open source libraries, but that
the human expert in the loop is essential for success. Nonetheless, we were
surprised by how few iterations were required to achieve substantial
performance improvements that were not obvious to the expert in the loop. We
would like bring attention to the qualitative nature of this study, more robust
quantitative studies would need to introduce a layer of selecting experts in a
representative sample -- we invite the community to collaborate.
Related papers
- OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models [70.72097493954067]
Large language models (LLMs) for code have become indispensable in various domains, including code generation, reasoning, tasks and agent systems.
We introduce OpenCoder, a top-tier code LLM that not only achieves performance comparable to leading models but also serves as an open cookbook'' for the research community.
arXiv Detail & Related papers (2024-11-07T17:47:25Z) - Prompto: An open source library for asynchronous querying of LLM endpoints [1.5558845602219702]
prompto is an open source Python library which facilitates asynchronous querying of Large Language Model endpoints.
Our library empowers researchers and developers to interact with LLMs more effectively and enabling faster experimentation and evaluation.
arXiv Detail & Related papers (2024-08-12T15:19:59Z) - Learning to Retrieve Iteratively for In-Context Learning [56.40100968649039]
iterative retrieval is a novel framework that empowers retrievers to make iterative decisions through policy optimization.
We instantiate an iterative retriever for composing in-context learning exemplars and apply it to various semantic parsing tasks.
By adding only 4M additional parameters for state encoding, we convert an off-the-shelf dense retriever into a stateful iterative retriever.
arXiv Detail & Related papers (2024-06-20T21:07:55Z) - Towards Coarse-to-Fine Evaluation of Inference Efficiency for Large Language Models [95.96734086126469]
Large language models (LLMs) can serve as the assistant to help users accomplish their jobs, and also support the development of advanced applications.
For the wide application of LLMs, the inference efficiency is an essential concern, which has been widely studied in existing work.
We perform a detailed coarse-to-fine analysis of the inference performance of various code libraries.
arXiv Detail & Related papers (2024-04-17T15:57:50Z) - How Can LLM Guide RL? A Value-Based Approach [68.55316627400683]
Reinforcement learning (RL) has become the de facto standard practice for sequential decision-making problems by improving future acting policies with feedback.
Recent developments in large language models (LLMs) have showcased impressive capabilities in language understanding and generation, yet they fall short in exploration and self-improvement capabilities.
We develop an algorithm named LINVIT that incorporates LLM guidance as a regularization factor in value-based RL, leading to significant reductions in the amount of data needed for learning.
arXiv Detail & Related papers (2024-02-25T20:07:13Z) - CoLLiE: Collaborative Training of Large Language Models in an Efficient
Way [59.09824823710863]
CoLLiE is an efficient library that facilitates collaborative training of large language models.
With its modular design and comprehensive functionality, CoLLiE offers a balanced blend of efficiency, ease of use, and customization.
arXiv Detail & Related papers (2023-12-01T08:02:16Z) - Large Language Model-Aware In-Context Learning for Code Generation [75.68709482932903]
Large language models (LLMs) have shown impressive in-context learning (ICL) ability in code generation.
We propose a novel learning-based selection approach named LAIL (LLM-Aware In-context Learning) for code generation.
arXiv Detail & Related papers (2023-10-15T06:12:58Z) - Benchmarking Causal Study to Interpret Large Language Models for Source
Code [6.301373791541809]
This paper introduces a benchmarking strategy named Galeras comprised of curated testbeds for three SE tasks.
We illustrate the insights of our benchmarking strategy by conducting a case study on the performance of ChatGPT under distinct prompt engineering methods.
arXiv Detail & Related papers (2023-08-23T20:32:12Z) - PyRelationAL: A Library for Active Learning Research and Development [0.11545092788508224]
PyRelationAL is an open source library for active learning (AL) research.
It provides access to benchmark datasets and AL task configurations based on existing literature.
We perform experiments on the PyRelationAL collection of benchmark datasets and showcase the considerable economies that AL can provide.
arXiv Detail & Related papers (2022-05-23T08:21:21Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.