Skip to content

Improve Model Tier Recommendation for Apple Silicon #1292

@rohan-pandeyy

Description

@rohan-pandeyy

Description

detect_hardware_tier() currently checks for a dedicated GPU via nvidia-smi, then falls back to RAM size. This works correctly on Windows and Linux but produces under-recommendations on Apple Silicon Macs.

Apple Silicon machines (M1, M2, M3, M4 families) have no discrete GPU detectable by nvidia-smi, so they fall through to the RAM check. A MacBook Pro with an M4 Pro chip ends up recommended small or nano tiers designed for genuinely constrained hardware, despite being capable of running medium comfortably via its Neural Engine and unified memory architecture.


What needs to change

  • Add detect_apple_silicon() -> str | None to app/utils/hardware_detect.py

    • Returns the chip name string (e.g. "Apple M3 Pro") on Apple Silicon, None on all other platforms
    • Gate on platform.system() == "Darwin" and platform.machine() == "arm64" before any subprocess call. Windows and Linux exit immediately without touching sysctl
    • Read chip name via sysctl -n machdep.cpu.brand_string (consistent with the existing nvidia-smi subprocess pattern), falling back to platform.processor()
  • Add detect_apple_silicon_tier() -> str | None with the following mapping:

    • M1 base, M2 basesmall
    • M1 Pro/Max/Ultra, M2 Pro/Max/Ultra, M3, M3 Promedium
    • M3 Max/Ultra, M4 and newer → medium
    • Unknown Apple Silicon → small (safe default)
    • Non-Apple platform → None
  • Update detect_hardware_tier() to call detect_apple_silicon_tier() first, before the existing RAM/GPU path.

  • Expose apple_silicon chip name in get_hardware_info() response so the frontend can display a chip-specific recommendation string (e.g. "Recommended for Apple M3 Pro: Medium")

  • Update the frontend onboarding recommendation label to use the chip name when apple_silicon is present in the hardware response

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions