MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / chooseTier

Function chooseTier

src/setup/hardware-profile.ts:167–177  ·  view source on GitHub ↗
(ramGb: number, gpu: HardwareProfile['gpu'])

Source from the content-addressed store, hash-verified

165// ── Tier ─────────────────────────────────────────────────────────────────────
166
167function 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

Callers 1

detectHardwareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected