# Dev-AI: Fine-Tuned 27B Code Review Model

**Goal:** Train a 27B model on software development data, run it on CPU as a code review partner.

## Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Dataset     │───▢│  QLoRA Train │───▢│  Merge +     β”‚
β”‚  (Code, SO,  β”‚    β”‚  (CPU, 4-bit)β”‚    β”‚  llama.cpp   β”‚
β”‚  Docs, PRs)  β”‚    β”‚  ~14 days    β”‚    β”‚  Server      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                              β”‚
                                              β–Ό
                                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                        β”‚ Code Review  β”‚
                                        β”‚ API (port    β”‚
                                        β”‚ 8081)        β”‚
                                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## Workflow

1. Vincent writes code β†’ 2. POST to fine-tuned model β†’ 3. Model reviews/corrects β†’ 4. Vincent iterates

## Hardware

- **Training:** Ryzen 9 9900X CPU, 60GB RAM (no GPU)
- **Inference:** llama.cpp server, ~17GB RAM for Q4 27B model
- **GPU (4090):** Reserved for Vincent's own inference, not touched

## Status

- [ ] Dataset collection
- [ ] Training script with checkpoint resumption
- [ ] systemd background service
- [ ] Model merge + GGUF conversion
- [ ] llama.cpp server setup
- [ ] Code review integration workflow