← 返回
未分类 中文

NeuralDebug

AI-powered debugging for software (8 languages) and LLM/transformer reasoning. Debug programs with natural language via real debuggers (GDB, LLDB, CDB, JDB,...
支持8种语言的AI驱动调试和LLM/Transformer推理,可通过GDB、LLDB、CDB、JDB等真实调试器使用自然语言调试程序。
dennysun2020 dennysun2020 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 345
下载
💾 0
安装
1
版本
#latest

概述

NeuralDebug

AI-powered debugging framework for software and LLM reasoning. Part of the DeepRhapsody project.

Use this skill when asked to debug a program, diagnose a crash, analyze a core dump, inspect LLM reasoning, detect hallucinations, or fine-tune a model.

What NeuralDebug Does

🔧 Software Debugging (8 Languages)

Debug Python, C/C++, C#, Rust, Java, Go, Node.js/TypeScript, and Ruby using real debuggers — not code reading. NeuralDebug drives GDB, LLDB, CDB, JDB, Delve, Node Inspector, and rdbg via a unified natural-language interface.

🧠 LLM Debugging

Step through transformer forward passes layer by layer. Run interpretability techniques to understand why a model produces a given output: Logit Lens, Attention Analysis, Probing, Activation Patching, and custom analysis sandboxes.

🎯 LLM Fine-Tuning

Inject missing knowledge into GPT-2 family models using LoRA. Diagnose → fine-tune → verify in a single workflow.

Installation

# Clone the repo
git clone https://github.com/DennySun2020/DeepRhapsody.git
cd DeepRhapsody

# Install Python dependencies
pip install torch transformers

# For fine-tuning (optional)
pip install peft==0.7.1

Quick Start: Software Debugging

Interactive Mode (persistent debug session)

# Start debug server for any supported language
python src/NeuralDebug/python_debug_session.py serve --port 5678

# Send commands via natural language
python src/NeuralDebug/python_debug_session.py cmd -p 5678 launch my_script.py
python src/NeuralDebug/python_debug_session.py cmd -p 5678 set_breakpoint 42
python src/NeuralDebug/python_debug_session.py cmd -p 5678 continue
python src/NeuralDebug/python_debug_session.py cmd -p 5678 inspect

One-Shot Mode (quick breakpoint capture)

python src/NeuralDebug/python_debugger.py debug my_script.py --breakpoint 42 --output result.json

Supported Languages

| Language | Script | Backend |

|----------|--------|---------|

| Python | python_debug_session.py | bdb (stdlib) |

| C/C++ | cpp_debug_session.py | GDB, LLDB, or CDB |

| C# | csharp_debug_session.py | netcoredbg |

| Rust | rust_debug_session.py | rust-gdb / LLDB |

| Java | java_debug_session.py | JDB |

| Go | go_debug_session.py | Delve |

| Node.js/TS | nodejs_debug_session.py | Node Inspector |

| Ruby | ruby_debug_session.py | rdbg |

All scripts live in src/NeuralDebug/ and share the same command interface.

Quick Start: LLM Debugging

# Start LLM debug server
python src/NeuralDebug/llm/llm_debug_session.py serve -m gpt2-medium -p 5680

# Ask the model a question
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 start "The capital of Japan is"
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 generate 20

# Interpretability: where does the answer emerge?
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 logit_lens

# Interpretability: which attention heads focus on "Japan"?
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 attention 3

# Interpretability: what knowledge is encoded per layer?
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 probe next_token

# Interpretability: is prediction Japan-specific?
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 patch "The capital of France is"

LLM Models Supported

Any HuggingFace causal LM with a built-in adapter:

  • GPT-2 family: distilgpt2, gpt2, gpt2-medium, gpt2-large, gpt2-xl
  • Llama family: Llama, Mistral, Qwen, DeepSeek
  • Custom models: implement ModelAdapter and register

Quick Start: LLM Fine-Tuning

# Create a config file (JSON)
cat > ft_config.json << 'EOF'
{
  "facts": [
    "Dr. Elena Vasquez is the director of Horizon Research Labs",
    "Dr. Elena Vasquez leads Horizon Research Labs"
  ],
  "verification_prompt": "Dr. Elena Vasquez is the director of",
  "expected_token": "Horizon",
  "config": { "num_steps": 150, "lora_r": 16, "lora_alpha": 32, "learning_rate": 2e-4 }
}
EOF

# Run fine-tuning (uses same server as LLM debugger)
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 -t 600 finetune ft_config.json

# Verify
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 start "Dr. Elena Vasquez is the director of"
python src/NeuralDebug/llm/llm_debug_session.py cmd -p 5680 generate 20

Architecture

NeuralDebug uses a client-server architecture over TCP/JSON:

AI Agent (OpenClaw, Copilot, Claude, etc.)
    │
    ▼
Debug Session Script (TCP client)
    │
    ▼
NeuralDebug Server (TCP server on configurable port)
    │
    ▼
Real Debugger Backend (GDB/LLDB/CDB/PyTorch hooks/etc.)

Every command returns structured JSON — parseable by any AI agent.

Platform Support

  • Windows (CDB, Visual Studio debugger)
  • Linux (GDB, LLDB)
  • macOS (LLDB, GDB)

Links

  • Repository: https://github.com/DennySun2020/DeepRhapsody
  • Documentation: https://github.com/DennySun2020/DeepRhapsody/wiki
  • Issues: https://github.com/DennySun2020/DeepRhapsody/issues

See the references/ folder for detailed command documentation:

  • software-debugging.md — full command reference for all 8 languages
  • llm-debugging.md — interpretability techniques and LLM commands
  • llm-finetuning.md — LoRA fine-tuning workflow and configuration

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 10:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 327,301
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,644
dev-programming

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,554