[PR #14841] fitcheck: add hardware fit-check and model compatibility ranker #20141

Open
opened 2026-04-16 07:28:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14841
Author: @khalilkhamassi62-oss
Created: 3/14/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • dde206f fitcheck: add hardware fit-check and model compatibility ranker

📊 Changes

15 files changed (+2018 additions, -4 deletions)

View changed files

📝 api/client.go (+43 -0)
📝 api/types.go (+70 -0)
📝 cmd/cmd.go (+22 -0)
📝 cmd/config/integrations.go (+4 -4)
cmd/fit.go (+153 -0)
cmd/tui/fitcheck_tui.go (+400 -0)
📝 cmd/tui/tui.go (+49 -0)
fitcheck/disk_unix.go (+19 -0)
fitcheck/disk_windows.go (+36 -0)
fitcheck/hardware.go (+82 -0)
fitcheck/requirements.go (+570 -0)
fitcheck/response.go (+11 -0)
fitcheck/scorer.go (+271 -0)
fitcheck/scorer_test.go (+223 -0)
📝 server/routes.go (+65 -0)

📄 Description

Adds a new fitcheck package that scans the host machine's GPU VRAM, system RAM, and available disk space, then scores every model in a built-in catalogue against those resources. Each model receives a compatibility tier (Ideal / Good / Marginal / Possible / Too Large) and an estimated tokens-per-second derived from the GPU library and compute generation.

New surface area:

  • GET /api/fit — returns hardware profile + ranked model list; supports ?all, ?family, ?tags query filters; marks already-installed models via manifest lookup
  • api.Client.Fit() — thin HTTP wrapper for the endpoint
  • ollama fit subcommand — renders a tiered table; supports --all, --family, --tags, --json flags
  • Fit Check entry in the startup TUI — tabbed multi-select screen; press space to select models, enter to pull them via the standard progress display, esc to return to the main menu

The model catalogue covers 165 variants across 72 families sourced from ollama.com/library (Llama, Mistral, Phi, Gemma, Qwen, DeepSeek, Granite, embedding models, vision models, and more).

Disk stats use syscall.Statfs on Linux/macOS and GetDiskFreeSpaceExW on Windows. GPU detection delegates entirely to discover.GPUDevices() and ml.DeviceInfo — no hardware detection is reimplemented.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14841 **Author:** [@khalilkhamassi62-oss](https://github.com/khalilkhamassi62-oss) **Created:** 3/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`dde206f`](https://github.com/ollama/ollama/commit/dde206f9595a07f3bde1d37a9419afda17b7101f) fitcheck: add hardware fit-check and model compatibility ranker ### 📊 Changes **15 files changed** (+2018 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+43 -0) 📝 `api/types.go` (+70 -0) 📝 `cmd/cmd.go` (+22 -0) 📝 `cmd/config/integrations.go` (+4 -4) ➕ `cmd/fit.go` (+153 -0) ➕ `cmd/tui/fitcheck_tui.go` (+400 -0) 📝 `cmd/tui/tui.go` (+49 -0) ➕ `fitcheck/disk_unix.go` (+19 -0) ➕ `fitcheck/disk_windows.go` (+36 -0) ➕ `fitcheck/hardware.go` (+82 -0) ➕ `fitcheck/requirements.go` (+570 -0) ➕ `fitcheck/response.go` (+11 -0) ➕ `fitcheck/scorer.go` (+271 -0) ➕ `fitcheck/scorer_test.go` (+223 -0) 📝 `server/routes.go` (+65 -0) </details> ### 📄 Description Adds a new `fitcheck` package that scans the host machine's GPU VRAM, system RAM, and available disk space, then scores every model in a built-in catalogue against those resources. Each model receives a compatibility tier (Ideal / Good / Marginal / Possible / Too Large) and an estimated tokens-per-second derived from the GPU library and compute generation. New surface area: - GET /api/fit — returns hardware profile + ranked model list; supports ?all, ?family, ?tags query filters; marks already-installed models via manifest lookup - api.Client.Fit() — thin HTTP wrapper for the endpoint - `ollama fit` subcommand — renders a tiered table; supports --all, --family, --tags, --json flags - Fit Check entry in the startup TUI — tabbed multi-select screen; press space to select models, enter to pull them via the standard progress display, esc to return to the main menu The model catalogue covers 165 variants across 72 families sourced from ollama.com/library (Llama, Mistral, Phi, Gemma, Qwen, DeepSeek, Granite, embedding models, vision models, and more). Disk stats use syscall.Statfs on Linux/macOS and GetDiskFreeSpaceExW on Windows. GPU detection delegates entirely to discover.GPUDevices() and ml.DeviceInfo — no hardware detection is reimplemented. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 07:28:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#20141