Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: py
|
| 3 |
+
tags:
|
| 4 |
+
- neural-symbolic
|
| 5 |
+
- graph-neural-network
|
| 6 |
+
- GAT
|
| 7 |
+
- code-generation
|
| 8 |
+
- self-correcting-agent
|
| 9 |
+
license: mit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# CAT V3 Coding Agent (Graph-MoE + Self-Correction)
|
| 13 |
+
|
| 14 |
+
This model repository contains the code and pre-trained weights for the **Coding Expert (GAT Specialist)** component of **CAT V3 (Concept Attention Transformer V3)**, integrated with an autonomous execution and self-correcting debugging sandbox.
|
| 15 |
+
|
| 16 |
+
## 🏛️ Architecture Overview
|
| 17 |
+
|
| 18 |
+
The system decouples logical concept planning from code generation and execution:
|
| 19 |
+
1. **Semantic Router & Combiner (CAT V3)**: Routes query to the coding domain and plans a sequence of conceptual steps (e.g. `data_input -> sort -> syntax -> control_flow`).
|
| 20 |
+
2. **Generative Model (System 1)**: Generates the code draft following the conceptual path.
|
| 21 |
+
3. **Execution Sandbox**: Runs the code in Python, JavaScript, C++, Go, SQLite, HTML/CSS, Java, or Rust.
|
| 22 |
+
4. **Self-Correction Loop**: Catches compilation/runtime errors and feeds them back for automatic debugging and repair (up to 5 iterations).
|
| 23 |
+
|
| 24 |
+
## 📂 Repository Contents
|
| 25 |
+
|
| 26 |
+
- `cat_v3/`: Core model definition, router, experts, combiner, and dataset utilities.
|
| 27 |
+
- `checkpoints/cat_v3/cat_v3_model.pt`: Pre-trained CAT V3 weights (Graph-MoE).
|
| 28 |
+
- `agent_executor.py`: Sandbox execution, compilation, and the `AutonomousCodingAgent` loop.
|
| 29 |
+
- `coding_lab_server.py`: Web visual interface to run and inspect the agent.
|
| 30 |
+
|
| 31 |
+
## 🚀 Running the Coding Lab
|
| 32 |
+
|
| 33 |
+
To run the coding agent web UI locally:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
# Start the server on port 8002
|
| 37 |
+
python coding_lab_server.py
|
| 38 |
+
```
|
| 39 |
+
Then navigate to `http://localhost:8002/`.
|