Views
No views yet
User: "simple contact form that saves to database"
↓
THIS MODEL (Planner, 1.7B, ~1.5s):
<think>Form request, controller, and model.</think>
[
{"file": "app/Http/Requests/ContactFormRequest.php",
"instruction": "Create a Form Request with validation: name, email, subject, message"},
{"file": "app/Http/Controllers/ContactController.php",
"instruction": "Write a ContactController with store method using FormRequest"},
{"file": "app/Models/Contact.php",
"instruction": "Create model for Contact with fillable: name, email, subject, message"}
]
↓
CODER MODEL (3B, ~1s per file) → generates PHP for each| Detail | Value |
|---|---|
| Base model | Qwen3-1.7B (4-bit via MLX) |
| Fine-tuning | LoRA, 16 layers, mask-prompt |
| Training data | 43 feature→instructions decompositions |
| Training time | ~2 minutes on Apple M2 Pro 16GB |
| Peak memory | 3.3 GB |
| Best val loss | 0.786 (iter 50) |
| Model | Role | Link |
|---|---|---|
| This model | Decompose features | You're here |
| Coder | Generate code | fchis/Laravel-13x-Qwen2.5-Coder-3B-Instruct-LoRA |
| CLI tool | End-to-end pipeline | github.com/florinel-chis/laravel-ai-code-generator |
1from mlx_lm import load, generate
2import json, re
3
4model, tok = load("fchis/Laravel-13x-Planner-Qwen3-1.7B-LoRA")
5
6messages = [
7 {"role": "system", "content": "You are a Laravel architect. Decompose feature requests into specific coding tasks. Think briefly, then output a JSON array of objects. Each object has 'file' (path) and 'instruction' (what to write)."},
8 {"role": "user", "content": "simple contact form - name, email, subject, message - saves to database"}
9]
10text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
11plan = generate(model, tok, prompt=text, max_tokens=1500)
12
13match = re.search(r'\[.*?\]', plan, re.DOTALL)
14tasks = json.loads(match.group()) if match else []
15for t in tasks:
16 print(f" {t['file']} ← {t['instruction'][:60]}")