| 165 | // ── Tier ───────────────────────────────────────────────────────────────────── |
| 166 | |
| 167 | function chooseTier(ramGb: number, gpu: HardwareProfile['gpu']): HardwareTier { |
| 168 | // For non-Apple, dedicated VRAM is the real constraint. Use it if available. |
| 169 | // Otherwise RAM is the best proxy (Apple Silicon uses unified, Linux/Windows |
| 170 | // without a real GPU will CPU-offload from RAM at slow speeds). |
| 171 | const memGb = gpu.vramGb && gpu.vramGb >= 6 ? gpu.vramGb : ramGb; |
| 172 | |
| 173 | if (memGb >= 64) return 'xl'; |
| 174 | if (memGb >= 32) return 'large'; |
| 175 | if (memGb >= 12) return 'medium'; |
| 176 | return 'small'; |
| 177 | } |
| 178 | |
| 179 | // ── Model recommendations ──────────────────────────────────────────────────── |
| 180 | |