(stdout: string)
| 23 | |
| 24 | /** `sysctl -n hw.memsize` (bytes) → GB of total RAM (Apple Silicon shares it with the GPU). */ |
| 25 | export function parseMacMemGB(stdout: string): number | null { |
| 26 | const bytes = parseInt(stdout.trim(), 10); |
| 27 | return Number.isFinite(bytes) && bytes > 0 ? bytes / 1024 ** 3 : null; |
| 28 | } |
| 29 | |
| 30 | /** Pull the transformer block count out of an Ollama /api/show `model_info` map. The key is |
| 31 | * arch-prefixed (e.g. `qwen3.block_count`, `llama.block_count`), so match on the suffix. PURE. */ |
no outgoing calls
no test coverage detected