LLM debugger refines programs using runtime execution info
Top 58.7% on sourcepulse
LDB is a novel debugging framework for Large Language Models (LLMs) that enhances their ability to refine generated programs by incorporating runtime execution information. It targets researchers and developers working on LLM-based code generation and translation, aiming to improve the accuracy and reliability of LLM-produced code.
How It Works
LDB mimics human debugging by segmenting programs into basic blocks and tracking intermediate variable values after each block's execution. This approach allows LLMs to focus on smaller, verifiable code units, identify errors step-by-step, and efficiently correct them. The framework supports various LLM backends, including OpenAI models and open-source models like StarCoder and CodeLlama via vLLM.
Quick Start & Requirements
conda create -n ldb python=3.10
) and activate it (conda activate ldb
), then install dependencies (python -m pip install -r requirements.txt
)../run_simple.sh [dataset] [model] [output_dir]
./run_ldb.sh [dataset] [model] [seed] [output_dir]
Highlighted Details
PyGenerator.ldb_debug
, PyGenerator.ldb_generate
) for programmatic integration.Maintenance & Community
The project is associated with the ACL 2024 paper "Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step by Step." It adapts code from Reflexion and staticfg. Users can post issues for questions or bugs.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial use or integration into closed-source projects.
Limitations & Caveats
The README does not specify any explicit limitations or caveats regarding supported platforms, known bugs, or alpha status. Users should be aware of the dependency on external LLM providers or self-hosted vLLM servers.
10 months ago
1 week