Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: unsloth/Qwen2.5-Coder-32B-Instruct-bnb-4bit
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
library_name: unsloth
|
| 7 |
+
tags:
|
| 8 |
+
- amd
|
| 9 |
+
- rocm
|
| 10 |
+
- hip
|
| 11 |
+
- cuda
|
| 12 |
+
- code-generation
|
| 13 |
+
- lablab-ai
|
| 14 |
+
- ghost-coder
|
| 15 |
+
- mi300x
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Ghost-Coder: Autonomous CUDA-to-HIP Translator 👻
|
| 19 |
+
|
| 20 |
+
**Ghost-Coder** is a specialized, agent-ready LLM designed to bridge the gap between NVIDIA's CUDA and AMD's open ROCm ecosystem. Developed for the **Lablab.ai AMD Developer Hackathon (2026)**, this model serves as the "brain" of a self-healing agentic workflow that translates, compiles, and iterates on GPU kernels.
|
| 21 |
+
|
| 22 |
+
## 🚀 Overview
|
| 23 |
+
Ghost-Coder isn't just a translator; it’s an engineer. By fine-tuning **Qwen2.5-Coder-32B** specifically on the **CASS (CUDA-to-HIP)** mapping dataset, we've enabled a model that understands the deep structural nuances of GPU programming, from shared memory primitives to warp-level synchronization.
|
| 24 |
+
|
| 25 |
+
### 💎 Hardware & Framework
|
| 26 |
+
- **Training Hardware:** AMD Instinct™ MI300X VF (192GB HBM3)
|
| 27 |
+
- **Framework:** [Unsloth](https://github.com/unslothai/unsloth) (Optimized for 2x faster ROCm fine-tuning)
|
| 28 |
+
- **Optimization:** 4-bit QLoRA with a 4096 context window.
|
| 29 |
+
|
| 30 |
+
## 🧠 Model Highlights
|
| 31 |
+
- **High-Fidelity Mapping:** Precise translation of `cuda*` APIs to their corresponding `hip*` counterparts.
|
| 32 |
+
- **Agentic Ready:** Optimized to parse `hipcc` compiler error logs and self-correct syntax or logic errors in real-time.
|
| 33 |
+
- **Massive Scale:** Leveraging the 32B parameter Qwen2.5-Coder foundation for superior C++ reasoning compared to smaller 7B models.
|
| 34 |
+
|
| 35 |
+
## 🛠️ Training Specifications
|
| 36 |
+
To ensure maximum generalization and prevent overfitting, the model underwent a high-throughput training sprint:
|
| 37 |
+
|
| 38 |
+
| Parameter | Configuration |
|
| 39 |
+
| :--- | :--- |
|
| 40 |
+
| **Total Steps** | 200 (Optimized Sprint) |
|
| 41 |
+
| **Global Batch Size** | 64 |
|
| 42 |
+
| **Learning Rate** | 2e-4 |
|
| 43 |
+
| **VRAM Utilization** | ~158GB / 192GB |
|
| 44 |
+
| **Dataset** | 12,800+ Curated CUDA-to-HIP Pairs |
|
| 45 |
+
|
| 46 |
+
## 🏁 Intended Use (The Ghost-Harness)
|
| 47 |
+
This model is designed to work within the **Ghost-Harness** agentic loop:
|
| 48 |
+
1. **Input:** User provides a raw `.cu` (CUDA) file.
|
| 49 |
+
2. **Action:** Ghost-Coder generates a `.cpp` (HIP) translation.
|
| 50 |
+
3. **Validation:** The harness runs `hipcc` on the output.
|
| 51 |
+
4. **Self-Healing:** If compilation fails, the error logs are fed back to Ghost-Coder for an iterative fix.
|
| 52 |
+
|
| 53 |
+
## 📝 Acknowledgments
|
| 54 |
+
Special thanks to **AMD** for the world-class compute and **Lablab.ai** for hosting the "Build Across the AI Stack" challenge.
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
*Developed by Talha*
|