Views
No views yet
1# Install dependencies
2pip install torch torchvision transformers trl peft datasets accelerate shapely Pillow lxml numpy tqdm huggingface_hub
3
4# Optional (faster attention on GPU)
5pip install flash-attn
6
7# Login to HuggingFace
8huggingface-cli login
9
10# Stage 1: SFT Training
11python train_floorplan_vlm.py
12
13# Stage 2: GRPO Training (after SFT completes)
14python train_floorplan_grpo.py| Setting | Default | Description |
|---|---|---|
MAX_SAMPLES | None (all) | Set to 100 for a quick test run |
NUM_EPOCHS | 2 | Training epochs |
PUSH_TO_HUB | True | Push model to HF Hub |
HUB_MODEL_ID | manitocross/floorplan-vlm-sft | Your model repo |
| Mode | VRAM | Time (full dataset) |
|---|---|---|
| GPU (A100 80GB) | ~20GB | ~4-6 hours |
| GPU (RTX 3090/4090) | ~20GB | ~8-12 hours |
| CPU | ~14GB RAM | ~days (for testing only) |
1{
2 "walls": [
3 {
4 "id": "wall_1",
5 "start": [120, 80],
6 "end": [520, 80],
7 "thickness": 15,
8 "curvature": 0,
9 "openings": [
10 {"type": "door", "center": 320, "width": 90},
11 {"type": "window", "center": 450, "width": 60}
12 ]
13 }
14 ],
15 "rooms": [
16 {"label": "bedroom", "walls": ["wall_1", "wall_2", "wall_3", "wall_4"]}
17 ]
18}