{"data":{"slug":"yerbapage-mgdebugger","name":"MGDebugger","tagline":"Multi-Granularity LLM Debugger","github_url":"https://github.com/YerbaPage/MGDebugger","owner":"YerbaPage","repo":"MGDebugger","owner_avatar_url":"https://avatars.githubusercontent.com/u/50071295?v=4","primary_language":"Python","stars":101,"forks":10,"topics":["automatic-program-repair","code-generation","debugger","large-language-models","llm","programming-languages"],"archived":false,"github_pushed_at":"2025-07-06T04:07:35+00:00","maintenance_label":"Dormant","stars_delta_30d":0,"url":"https://www.graphcanon.com/tools/yerbapage-mgdebugger","markdown_url":"https://www.graphcanon.com/tools/yerbapage-mgdebugger.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/yerbapage-mgdebugger","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=yerbapage-mgdebugger","description":"Multi-Granularity LLM Debugger [ICSE2026]","homepage_url":null,"license":"MIT","open_issues":1,"watchers":1,"ai_summary":"MGDebugger is a hierarchical debugging method designed to resolve errors at various levels of granularity in large language models.","readme_excerpt":"<div align=\"center\">\n\n<div align=\"center\">\n    <img src=\"figures/logo.png\" alt=\"MGDebugger Logo\" width=\"500\"/>\n</div>\n\n# MGDebugger: Multi-Granularity LLM Debugger\n\n\n\n\n</div>\n\nFor paper \"From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging\".\n\n**🔥Update: MGDebugger achieves 100% accuracy on HumanEval with the DeepSeek-R1 model in our latest experiments!** Results have been uploaded in `/supplementary/dsr1_results.jsonl`\n\n## Table of Contents\n\n- [MGDebugger: Multi-Granularity LLM Debugger](#mgdebugger-multi-granularity-llm-debugger)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Getting Started](#getting-started)\n    - [Prerequisites](#prerequisites)\n    - [Configuring the vLLM Server](#configuring-the-vllm-server)\n  - [Usage](#usage)\n    - [Running the Demo](#running-the-demo)\n    - [Running Experiments](#running-experiments)\n    - [Log Management](#log-management)\n  - [Performance](#performance)\n  - [Contributing](#contributing)\n\n## Introduction\n\nMGDebugger is a hierarchical LLM code debugging method designed to isolate, identify, and resolve errors at various levels of granularity. Using a hierarchical bottom-up debugging approach, MGDebugger systematically progresses from individual subfunctions to the overall system, enabling precise error detection and correction.\n\nWith MGDebugger, developers can efficiently debug complex codes and functions by performing granular analysis, reducing debugging time, and improving the success rate of resolving complex issues.\n\n<div align=\"center\">\n    <img src=\"figures/overview.png\" alt=\"MGDebugger Overview\" width=\"800\"/>\n    <p>MGDebugger System Architecture Overview</p>\n</div>\n\n<div align=\"center\">\n    <img src=\"figures/subfunction_debug.png\" alt=\"Subfunction Debugging\" width=\"800\"/>\n    <p>Subfunction Debugging Module</p>\n</div>\n\n## Getting Started\n\n### Prerequisites\n\nBefore running MGDebugger, ensure your environment meets the following requirements:\n\n- **Python**: Version 3.8 or later.\n- **vLLM**: Version 0.6.0 or later. Required for model loading and inference. You can follow the [official installation guide](https://github.com/vllm-project/vllm) to set it up.\n- **Additional dependencies**: Install all necessary Python packages using the following command:\n  > There are some packages not supported on Mac such as auto_gptq and autoawq, you can remove these requirements if you won't need them to load quantized models.\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n### Configuring the vLLM Server\n\nTo launch the vLLM server with the `DeepSeek-Coder-V2-Lite-Instruct` model, execute the following command:\n\n```bash\npython -m vllm.entrypoints.openai.api_server \\\n    --model deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct \\\n    --trust-remote-code \\\n    --dtype auto \\\n    --api-key token-abc123s \\\n    --port 18889\n```\n\nThis will initialize the model and start the server on port `18889`.\n\n## Usage\n\nAll the codes for our main experiments are in the `src` folder.\n\n### Running the Demo\n\nWe've prepared a demo code snippet to showcase MGDebugger's debugging capabilities. You can run the demo by executing the following command after starting the vLLM server:\n\n```bash\npython demo.py\n```\n\n### Running Experiments\n\nOnce the vLLM server is up and running, start MGDebugger by executing:\n\n```bash\npython main.py\n```\n\n> **Tip**: You can modify the `MODEL` and `input_seeds` parameters in the `config.py` file to test different models and input configurations.\n\n### Log Management\n\nMGDebugger automatically stores all debugging and error logs in the `output_data` directory. You can review these logs to gain deeper insights into debugging details and performance analysis.\n\n## Performance\n\nThe table below highlights the performance of different methods compared to the baseline (No-Debugging) on the HumanEval and MBPP datasets using the DeepSeek-Coder-V2-Lite model.\n\n| Method                        | HumanEval Acc. (%) | Δ Acc. (%) |","github_created_at":"2024-09-27T07:10:58+00:00","created_at":"2026-07-11T23:44:49.529331+00:00","updated_at":"2026-10-07T06:00:38.023633+00:00","categories":[{"slug":"evaluation-observability","name":"Evaluation & Observability","url":"https://www.graphcanon.com/categories/evaluation-observability","markdown_url":"https://www.graphcanon.com/categories/evaluation-observability.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/evaluation-observability"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"automatic-program-repair","name":"automatic-program-repair"},{"slug":"code-generation","name":"code-generation"},{"slug":"debugger","name":"debugger"},{"slug":"large-language-models","name":"large-language-models"},{"slug":"llm","name":"llm"},{"slug":"programming-languages","name":"programming-languages"}],"trust":{"provenance":{"is_fork":false,"github_id":863927529,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-10-07T06:00:37.229Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":458,"last_release_at":null,"stars_delta_30d":0,"open_issues_delta_30d":1},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":111,"high_count":0,"last_scan_at":"2026-07-11T23:44:51.234Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-10-07T06:00:37.720Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-10-07T06:00:37.720Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-10-07T06:00:37.720Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"MGDebugger is free to use under MIT license but may require users to manage model hosting costs and dependencies."},"requirements":{"notes":["Requires Python version 3.8 or later","vLLM version 0.6.0 or later must be installed for model inference"],"min_ram_gb":4,"requires_docker":false},"constraints":{"min_ram_gb":4,"pricing_model":"freemium","requires_docker":false},"when_to_use":["When you need to perform granular analysis on complex codes, progressing from subfunctions to the whole system to ensure precise error detection and correction.","If your application requires high accuracy in bug fixing, MGDebugger has achieved a reported 100% success rate on benchmark tests like HumanEval with certain models like DeepSeek-R1."],"when_not_to_use":["Avoid using MGDebugger if you operate primarily on Mac systems and do not require support for quantized models (as some essential dependencies are unsupported on MacOS).","If your model does not align well with the DeepSeek-Coder-V2-Lite-Instruct or similar models, since the effectiveness of MGDebugger might vary without support for those particular frameworks."],"source":"enrich:decision_facts","observed_at":"2026-07-17T05:17:59.250Z"},"constraint_facets":{"min_ram_gb":4,"pricing_model":"freemium","requires_docker":false},"decision_summary":[{"label":"Pricing","value":"freemium - MGDebugger is free to use under MIT license but may require users to manage model hosting costs and dependencies."},{"label":"Requirements","value":"Min 4 GB RAM; Requires Python version 3.8 or later; vLLM version 0.6.0 or later must be installed for model inference"},{"label":"Adopt for","value":"MGDebugger offers hierarchical debugging for various levels of code granularity, emphasizing efficient error resolution and improved debug accuracy."}]}}