Program-aided language model for reasoning tasks
Top 62.8% on sourcepulse
PaL (Program-Aided Language Models) enables large language models to solve complex reasoning tasks involving arithmetic and procedural logic by generating text and code. This approach offloads code execution to a Python interpreter, enhancing accuracy for tasks that benefit from programmatic computation. The project is primarily aimed at researchers and developers working with LLMs for complex problem-solving.
How It Works
PaL integrates LLMs with a Python runtime. The LLM generates a reasoning chain, which includes executable Python code. This code is then executed by a Python interpreter, and the results are fed back to the LLM or used to derive the final answer. This program-aided approach allows LLMs to leverage the precision and computational power of code for tasks like complex arithmetic, overcoming inherent limitations in direct text-based reasoning.
Quick Start & Requirements
pip install -e ./pal
after cloning the repository.export OPENAI_API_KEY='sk-...'
.code-davinci-002
and ChatGPT APIs (gpt-3.5-turbo
).Highlighted Details
ProgramInterface
.gsm_chatgpt.py
) for math reasoning using ChatGPT APIs.Maintenance & Community
The project is associated with the paper "PAL: Program-aided Language Models" (ICML 2023). Further community interaction details are not explicitly provided in the README.
Licensing & Compatibility
The repository does not explicitly state a license. Users should verify licensing for commercial use or integration into closed-source projects.
Limitations & Caveats
The project relies on the OpenAI API, and its functionality is tied to the availability and pricing of these services. The README mentions a transition from Codex API to ChatGPT APIs, indicating potential shifts in underlying model support.
2 years ago
1 week