{"id":46101472,"url":"https://github.com/AlexsJones/llmfit","last_synced_at":"2026-03-06T18:01:31.276Z","repository":{"id":338645172,"uuid":"1158588224","full_name":"AlexsJones/llmfit","owner":"AlexsJones","description":"497 models. 133 providers. One command to find what runs on your hardware.","archived":false,"fork":false,"pushed_at":"2026-03-01T13:16:33.000Z","size":12716,"stargazers_count":7269,"open_issues_count":29,"forks_count":426,"subscribers_count":22,"default_branch":"main","last_synced_at":"2026-03-01T13:36:43.636Z","etag":null,"topics":["llm","localai","skill"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexsJones.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-15T16:11:31.000Z","updated_at":"2026-03-01T13:36:07.000Z","dependencies_parsed_at":"2026-02-20T10:04:27.245Z","dependency_job_id":null,"html_url":"https://github.com/AlexsJones/llmfit","commit_stats":null,"previous_names":["alexsjones/llmfit"],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/AlexsJones/llmfit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexsJones%2Fllmfit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexsJones%2Fllmfit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexsJones%2Fllmfit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexsJones%2Fllmfit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexsJones","download_url":"https://codeload.github.com/AlexsJones/llmfit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexsJones%2Fllmfit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30165241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm","localai","skill"],"created_at":"2026-03-01T20:00:17.267Z","updated_at":"2026-03-06T18:01:31.267Z","avatar_url":"https://github.com/AlexsJones.png","language":"Rust","funding_links":[],"categories":["Applications","A01_文本生成_文本对话","Rust","Tools","Deployment and Serving","12. Miscellaneous","LLM \u0026 Inference","HarmonyOS"],"sub_categories":["Productivity","大语言对话模型及数据","Models","Data \u0026 Alignment Tools","Windows Manager"],"readme":"# llmfit\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/icon.svg\" alt=\"llmfit icon\" width=\"128\" height=\"128\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/AlexsJones/llmfit/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/AlexsJones/llmfit/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/llmfit\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/llmfit.svg\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Hundreds of models \u0026 providers. One command to find what runs on your hardware.**\n\nA terminal tool that right-sizes LLM models to your system's RAM, CPU, and GPU. Detects your hardware, scores each model across quality, speed, fit, and context dimensions, and tells you which ones will actually run well on your machine.\n\nShips with an interactive TUI (default) and a classic CLI mode. Supports multi-GPU setups, MoE architectures, dynamic quantization selection, speed estimation, and local runtime providers (Ollama, llama.cpp, MLX).\n\n\u003e **Sister project:** Check out [sympozium](https://github.com/AlexsJones/sympozium/) for managing agents in Kubernetes.\n\n![demo](demo.gif)\n\n---\n\n## Install\n\n### Windows\n```sh\nscoop install llmfit\n```\n\nIf Scoop is not installed, follow the [Scoop installation guide](https://scoop.sh/).\n\n### macOS / Linux\n\n#### Homebrew\n```sh\nbrew install llmfit\n```\n\n#### Quick install\n```sh\ncurl -fsSL https://llmfit.axjns.dev/install.sh | sh\n```\n\nDownloads the latest release binary from GitHub and installs it to `/usr/local/bin` (or `~/.local/bin` if no sudo).\n\n**Install to `~/.local/bin` without sudo:**\n```sh\ncurl -fsSL https://llmfit.axjns.dev/install.sh | sh -s -- --local\n```\n\n### From source\n```sh\ngit clone https://github.com/AlexsJones/llmfit.git\ncd llmfit\ncargo build --release\n# binary is at target/release/llmfit\n```\n\n---\n\n## Usage\n\n### TUI (default)\n\n```sh\nllmfit\n```\n\nLaunches the interactive terminal UI. Your system specs (CPU, RAM, GPU name, VRAM, backend) are shown at the top. Models are listed in a scrollable table sorted by composite score. Each row shows the model's score, estimated tok/s, best quantization for your hardware, run mode, memory usage, and use-case category.\n\n| Key | Action |\n|---|---|\n| `Up` / `Down` or `j` / `k` | Navigate models |\n| `/` | Enter search mode (partial match on name, provider, params, use case) |\n| `Esc` or `Enter` | Exit search mode |\n| `Ctrl-U` | Clear search |\n| `f` | Cycle fit filter: All, Runnable, Perfect, Good, Marginal |\n| `a` | Cycle availability filter: All, GGUF Avail, Installed |\n| `s` | Cycle sort column: Score, Params, Mem%, Ctx, Date, Use Case |\n| `t` | Cycle color theme (saved automatically) |\n| `p` | Open Plan mode for selected model (hardware planning) |\n| `P` | Open provider filter popup |\n| `i` | Toggle installed-first sorting (any detected runtime provider) |\n| `d` | Download selected model (provider picker when multiple are available) |\n| `r` | Refresh installed models from runtime providers |\n| `1`-`9` | Toggle provider visibility |\n| `Enter` | Toggle detail view for selected model |\n| `PgUp` / `PgDn` | Scroll by 10 |\n| `g` / `G` | Jump to top / bottom |\n| `q` | Quit |\n\n### TUI Plan mode (`p`)\n\nPlan mode inverts normal fit analysis: instead of asking \"what fits my hardware?\", it estimates \"what hardware is needed for this model config?\".\n\nUse `p` on a selected row, then:\n\n| Key | Action |\n|---|---|\n| `Tab` / `j` / `k` | Move between editable fields (Context, Quant, Target TPS) |\n| `Left` / `Right` | Move cursor in current field |\n| Type | Edit current field |\n| `Backspace` / `Delete` | Remove characters |\n| `Ctrl-U` | Clear current field |\n| `Esc` or `q` | Exit Plan mode |\n\nPlan mode shows estimates for:\n- minimum and recommended VRAM/RAM/CPU cores\n- feasible run paths (GPU, CPU offload, CPU-only)\n- upgrade deltas to reach better fit targets\n\n### Themes\n\nPress `t` to cycle through 6 built-in color themes. Your selection is saved automatically to `~/.config/llmfit/theme` and restored on next launch.\n\n| Theme | Description |\n|---|---|\n| **Default** | Original llmfit colors |\n| **Dracula** | Dark purple background with pastel accents |\n| **Solarized** | Ethan Schoonover's Solarized Dark palette |\n| **Nord** | Arctic, cool blue-gray tones |\n| **Monokai** | Monokai Pro warm syntax colors |\n| **Gruvbox** | Retro groove palette with warm earth tones |\n\n### CLI mode\n\nUse `--cli` or any subcommand to get classic table output:\n\n```sh\n# Table of all models ranked by fit\nllmfit --cli\n\n# Only perfectly fitting models, top 5\nllmfit fit --perfect -n 5\n\n# Show detected system specs\nllmfit system\n\n# List all models in the database\nllmfit list\n\n# Search by name, provider, or size\nllmfit search \"llama 8b\"\n\n# Detailed view of a single model\nllmfit info \"Mistral-7B\"\n\n# Top 5 recommendations (JSON, for agent/script consumption)\nllmfit recommend --json --limit 5\n\n# Recommendations filtered by use case\nllmfit recommend --json --use-case coding --limit 3\n\n# Plan required hardware for a specific model configuration\nllmfit plan \"Qwen/Qwen3-4B-MLX-4bit\" --context 8192\nllmfit plan \"Qwen/Qwen3-4B-MLX-4bit\" --context 8192 --quant mlx-4bit\nllmfit plan \"Qwen/Qwen3-4B-MLX-4bit\" --context 8192 --target-tps 25 --json\n\n# Run as a node-level REST API (for cluster schedulers / aggregators)\nllmfit serve --host 0.0.0.0 --port 8787\n```\n\n### REST API (`llmfit serve`)\n\n`llmfit serve` starts an HTTP API that exposes the same fit/scoring data used by TUI/CLI, including filtering and top-model selection for a node.\n\n```sh\n# Liveness\ncurl http://localhost:8787/health\n\n# Node hardware info\ncurl http://localhost:8787/api/v1/system\n\n# Full fit list with filters\ncurl \"http://localhost:8787/api/v1/models?min_fit=marginal\u0026runtime=llamacpp\u0026sort=score\u0026limit=20\"\n\n# Key scheduling endpoint: top runnable models for this node\ncurl \"http://localhost:8787/api/v1/models/top?limit=5\u0026min_fit=good\u0026use_case=coding\"\n\n# Search by model name/provider text\ncurl \"http://localhost:8787/api/v1/models/Mistral?runtime=any\"\n```\n\nSupported query params for `models`/`models/top`:\n\n- `limit` (or `n`): max number of rows returned\n- `perfect`: `true|false` (forces perfect-only when `true`)\n- `min_fit`: `perfect|good|marginal|too_tight`\n- `runtime`: `any|mlx|llamacpp`\n- `use_case`: `general|coding|reasoning|chat|multimodal|embedding`\n- `provider`: provider text filter (substring)\n- `search`: free-text filter across name/provider/size/use-case\n- `sort`: `score|tps|params|mem|ctx|date|use_case`\n- `include_too_tight`: include non-runnable rows (default `false` on `/top`, `true` on `/models`)\n- `max_context`: per-request context cap for memory estimation\n\nValidate API behavior locally:\n\n```sh\n# spawn server automatically and run endpoint/schema/filter assertions\npython3 scripts/test_api.py --spawn\n\n# or test an already-running server\npython3 scripts/test_api.py --base-url http://127.0.0.1:8787\n```\n\n### GPU memory override\n\nGPU VRAM autodetection can fail on some systems (e.g. broken `nvidia-smi`, VMs, passthrough setups). Use `--memory` to manually specify your GPU's VRAM:\n\n```sh\n# Override with 32 GB VRAM\nllmfit --memory=32G\n\n# Megabytes also work (32000 MB ≈ 31.25 GB)\nllmfit --memory=32000M\n\n# Works with all modes: TUI, CLI, and subcommands\nllmfit --memory=24G --cli\nllmfit --memory=24G fit --perfect -n 5\nllmfit --memory=24G system\nllmfit --memory=24G info \"Llama-3.1-70B\"\nllmfit --memory=24G recommend --json\n```\n\nAccepted suffixes: `G`/`GB`/`GiB` (gigabytes), `M`/`MB`/`MiB` (megabytes), `T`/`TB`/`TiB` (terabytes). Case-insensitive. If no GPU was detected, the override creates a synthetic GPU entry so models are scored for GPU inference.\n\n### Context-length cap for estimation\n\nUse `--max-context` to cap context length used for memory estimation (without changing each model's advertised maximum context):\n\n```sh\n# Estimate memory fit at 4K context\nllmfit --max-context 4096 --cli\n\n# Works with subcommands\nllmfit --max-context 8192 fit --perfect -n 5\nllmfit --max-context 16384 recommend --json --limit 5\n```\n\nIf `--max-context` is not set, llmfit will use `OLLAMA_CONTEXT_LENGTH` when available.\n\n### JSON output\n\nAdd `--json` to any subcommand for machine-readable output:\n\n```sh\nllmfit --json system     # Hardware specs as JSON\nllmfit --json fit -n 10  # Top 10 fits as JSON\nllmfit recommend --json  # Top 5 recommendations (JSON is default for recommend)\nllmfit plan \"Qwen/Qwen2.5-Coder-0.5B-Instruct\" --context 8192 --json\n```\n\n`plan` JSON includes stable fields for:\n- request (`context`, `quantization`, `target_tps`)\n- estimated minimum/recommended hardware\n- per-path feasibility (`gpu`, `cpu_offload`, `cpu_only`)\n- upgrade deltas\n\n---\n\n## How it works\n\n1. **Hardware detection** -- Reads total/available RAM via `sysinfo`, counts CPU cores, and probes for GPUs:\n   - **NVIDIA** -- Multi-GPU support via `nvidia-smi`. Aggregates VRAM across all detected GPUs. Falls back to VRAM estimation from GPU model name if reporting fails.\n   - **AMD** -- Detected via `rocm-smi`.\n   - **Intel Arc** -- Discrete VRAM via sysfs, integrated via `lspci`.\n   - **Apple Silicon** -- Unified memory via `system_profiler`. VRAM = system RAM.\n   - **Ascend** -- Detected via `npu-smi`.\n   - **Backend detection** -- Automatically identifies the acceleration backend (CUDA, Metal, ROCm, SYCL, CPU ARM, CPU x86, Ascend) for speed estimation.\n\n2. **Model database** -- Hundreds models sourced from the HuggingFace API, stored in `data/hf_models.json` and embedded at compile time. Memory requirements are computed from parameter counts across a quantization hierarchy (Q8_0 through Q2_K). VRAM is the primary constraint for GPU inference; system RAM is the fallback for CPU-only execution.\n\n   **MoE support** -- Models with Mixture-of-Experts architectures (Mixtral, DeepSeek-V2/V3) are detected automatically. Only a subset of experts is active per token, so the effective VRAM requirement is much lower than total parameter count suggests. For example, Mixtral 8x7B has 46.7B total parameters but only activates ~12.9B per token, reducing VRAM from 23.9 GB to ~6.6 GB with expert offloading.\n\n3. **Dynamic quantization** -- Instead of assuming a fixed quantization, llmfit tries the best quality quantization that fits your hardware. It walks a hierarchy from Q8_0 (best quality) down to Q2_K (most compressed), picking the highest quality that fits in available memory. If nothing fits at full context, it tries again at half context.\n\n4. **Multi-dimensional scoring** -- Each model is scored across four dimensions (0–100 each):\n\n   | Dimension | What it measures |\n   |---|---|\n   | **Quality** | Parameter count, model family reputation, quantization penalty, task alignment |\n   | **Speed** | Estimated tokens/sec based on backend, params, and quantization |\n   | **Fit** | Memory utilization efficiency (sweet spot: 50–80% of available memory) |\n   | **Context** | Context window capability vs target for the use case |\n\n   Dimensions are combined into a weighted composite score. Weights vary by use-case category (General, Coding, Reasoning, Chat, Multimodal, Embedding). For example, Chat weights Speed higher (0.35) while Reasoning weights Quality higher (0.55). Models are ranked by composite score, with unrunnable models (Too Tight) always at the bottom.\n\n5. **Speed estimation** -- Token generation in LLM inference is memory-bandwidth-bound: each token requires reading the full model weights once from VRAM. When the GPU model is recognized, llmfit uses its actual memory bandwidth to estimate throughput:\n\n   Formula: `(bandwidth_GB_s / model_size_GB) × efficiency_factor`\n\n   The efficiency factor (0.55) accounts for kernel overhead, KV-cache reads, and memory controller effects. This approach is validated against published benchmarks from llama.cpp ([Apple Silicon](https://github.com/ggml-org/llama.cpp/discussions/4167), [NVIDIA T4](https://github.com/ggml-org/llama.cpp/discussions/4225)) and real-world measurements.\n\n   The bandwidth lookup table covers ~80 GPUs across NVIDIA (consumer + datacenter), AMD (RDNA + CDNA), and Apple Silicon families.\n\n   For unrecognized GPUs, llmfit falls back to per-backend speed constants:\n\n   | Backend | Speed constant |\n   |---|---|\n   | CUDA | 220 |\n   | Metal | 160 |\n   | ROCm | 180 |\n   | SYCL | 100 |\n   | CPU (ARM) | 90 |\n   | CPU (x86) | 70 |\n   | NPU (Ascend) | 390 |\n\n   Fallback formula: `K / params_b × quant_speed_multiplier`, with penalties for CPU offload (0.5×), CPU-only (0.3×), and MoE expert switching (0.8×).\n\n6. **Fit analysis** -- Each model is evaluated for memory compatibility:\n\n   **Run modes:**\n   - **GPU** -- Model fits in VRAM. Fast inference.\n   - **MoE** -- Mixture-of-Experts with expert offloading. Active experts in VRAM, inactive in RAM.\n   - **CPU+GPU** -- VRAM insufficient, spills to system RAM with partial GPU offload.\n   - **CPU** -- No GPU. Model loaded entirely into system RAM.\n\n   **Fit levels:**\n   - **Perfect** -- Recommended memory met on GPU. Requires GPU acceleration.\n   - **Good** -- Fits with headroom. Best achievable for MoE offload or CPU+GPU.\n   - **Marginal** -- Tight fit, or CPU-only (CPU-only always caps here).\n   - **Too Tight** -- Not enough VRAM or system RAM anywhere.\n\n---\n\n## Model database\n\nThe model list is generated by `scripts/scrape_hf_models.py`, a standalone Python script (stdlib only, no pip dependencies) that queries the HuggingFace REST API. Hundreds models \u0026 providers including Meta Llama, Mistral, Qwen, Google Gemma, Microsoft Phi, DeepSeek, IBM Granite, Allen Institute OLMo, xAI Grok, Cohere, BigCode, 01.ai, Upstage, TII Falcon, HuggingFace, Zhipu GLM, Moonshot Kimi, Baidu ERNIE, and more. The scraper automatically detects MoE architectures via model config (`num_local_experts`, `num_experts_per_tok`) and known architecture mappings.\n\nModel categories span general purpose, coding (CodeLlama, StarCoder2, WizardCoder, Qwen2.5-Coder, Qwen3-Coder), reasoning (DeepSeek-R1, Orca-2), multimodal/vision (Llama 3.2 Vision, Llama 4 Scout/Maverick, Qwen2.5-VL), chat, enterprise (IBM Granite), and embedding (nomic-embed, bge).\n\nSee [MODELS.md](MODELS.md) for the full list.\n\nTo refresh the model database:\n\n```sh\n# Automated update (recommended)\nmake update-models\n\n# Or run the script directly\n./scripts/update_models.sh\n\n# Or manually\npython3 scripts/scrape_hf_models.py\ncargo build --release\n```\n\nThe scraper writes `data/hf_models.json`, which is baked into the binary via `include_str!`. The automated update script backs up existing data, validates JSON output, and rebuilds the binary.\n\nBy default, the scraper enriches models with known GGUF download sources from providers like [unsloth](https://huggingface.co/unsloth) and [bartowski](https://huggingface.co/bartowski). Results are cached in `data/gguf_sources_cache.json` (7-day TTL) to avoid repeated API calls. Use `--no-gguf-sources` to skip enrichment for a faster scrape.\n\n---\n\n## Project structure\n\n```\nsrc/\n  main.rs         -- CLI argument parsing, entrypoint, TUI launch\n  hardware.rs     -- System RAM/CPU/GPU detection (multi-GPU, backend identification)\n  models.rs       -- Model database, quantization hierarchy, dynamic quant selection\n  fit.rs          -- Multi-dimensional scoring (Q/S/F/C), speed estimation, MoE offloading\n  providers.rs    -- Runtime provider integration (Ollama, llama.cpp, MLX), install detection, pull/download\n  display.rs      -- Classic CLI table rendering + JSON output\n  tui_app.rs      -- TUI application state, filters, navigation\n  tui_ui.rs       -- TUI rendering (ratatui)\n  tui_events.rs   -- TUI keyboard event handling (crossterm)\ndata/\n  hf_models.json  -- Model database (206 models)\nskills/\n  llmfit-advisor/ -- OpenClaw skill for hardware-aware model recommendations\nscripts/\n  scrape_hf_models.py        -- HuggingFace API scraper\n  update_models.sh            -- Automated database update script\n  install-openclaw-skill.sh   -- Install the OpenClaw skill\nMakefile           -- Build and maintenance commands\n```\n\n---\n\n## Publishing to crates.io\n\nThe `Cargo.toml` already includes the required metadata (description, license, repository). To publish:\n\n```sh\n# Dry run first to catch issues\ncargo publish --dry-run\n\n# Publish for real (requires a crates.io API token)\ncargo login\ncargo publish\n```\n\nBefore publishing, make sure:\n\n- The version in `Cargo.toml` is correct (bump with each release).\n- A `LICENSE` file exists in the repo root. Create one if missing:\n\n```sh\n# For MIT license:\ncurl -sL https://opensource.org/license/MIT -o LICENSE\n# Or write your own. The Cargo.toml declares license = \"MIT\".\n```\n\n- `data/hf_models.json` is committed. It is embedded at compile time and must be present in the published crate.\n- The `exclude` list in `Cargo.toml` keeps `target/`, `scripts/`, and `demo.gif` out of the published crate to keep the download small.\n\nTo publish updates:\n\n```sh\n# Bump version\n# Edit Cargo.toml: version = \"0.2.0\"\ncargo publish\n```\n\n---\n\n## Dependencies\n\n| Crate | Purpose |\n|---|---|\n| `clap` | CLI argument parsing with derive macros |\n| `sysinfo` | Cross-platform RAM and CPU detection |\n| `serde` / `serde_json` | JSON deserialization for model database |\n| `tabled` | CLI table formatting |\n| `colored` | CLI colored output |\n| `ureq` | HTTP client for runtime/provider API integration |\n| `ratatui` | Terminal UI framework |\n| `crossterm` | Terminal input/output backend for ratatui |\n\n---\n\n## Runtime provider integration\n\nllmfit supports multiple local runtime providers:\n\n- **Ollama** (daemon/API based pulls)\n- **llama.cpp** (direct GGUF downloads from Hugging Face + local cache detection)\n- **MLX** (Apple Silicon / mlx-community model cache + optional server)\n\nWhen more than one compatible provider is available for a model, pressing `d` in the TUI opens a provider picker modal.\n\n### Ollama integration\n\nllmfit integrates with [Ollama](https://ollama.com) to detect which models you already have installed and to download new ones directly from the TUI.\n\n### Requirements\n\n- **Ollama must be installed and running** (`ollama serve` or the Ollama desktop app)\n- llmfit connects to `http://localhost:11434` (Ollama's default API port)\n- No configuration needed — if Ollama is running, llmfit detects it automatically\n\n### Remote Ollama instances\n\nTo connect to Ollama running on a different machine or port, set the `OLLAMA_HOST` environment variable:\n\n```sh\n# Connect to Ollama on a specific IP and port\nOLLAMA_HOST=\"http://192.168.1.100:11434\" llmfit\n\n# Connect via hostname  \nOLLAMA_HOST=\"http://ollama-server:666\" llmfit\n\n# Works with all TUI and CLI commands\nOLLAMA_HOST=\"http://192.168.1.100:11434\" llmfit --cli\nOLLAMA_HOST=\"http://192.168.1.100:11434\" llmfit fit --perfect -n 5\n```\n\nThis is useful for:\n- Running llmfit on one machine while Ollama serves from another (e.g., GPU server + laptop client)\n- Connecting to Ollama running in Docker containers with custom ports\n- Using Ollama behind reverse proxies or load balancers\n\n### How it works\n\nOn startup, llmfit queries `GET /api/tags` to list your installed Ollama models. Each installed model gets a green **✓** in the **Inst** column of the TUI. The system bar shows `Ollama: ✓ (N installed)`.\n\nWhen you press `d` on a model, llmfit sends `POST /api/pull` to Ollama to download it. The row highlights with an animated progress indicator showing download progress in real-time. Once complete, the model is immediately available for use with Ollama.\n\nIf Ollama is not running, Ollama-specific operations are skipped; the TUI still supports other providers like llama.cpp where available.\n\n### llama.cpp integration\n\nllmfit integrates with [llama.cpp](https://github.com/ggml-org/llama.cpp) as a runtime/download provider in both TUI and CLI.\n\nRequirements:\n\n- `llama-cli` or `llama-server` available in `PATH` (for runtime detection)\n- network access to Hugging Face for GGUF downloads\n\nHow it works:\n\n- llmfit maps HF models to known GGUF repos (with heuristic fallbacks)\n- downloads GGUF files into the local llama.cpp model cache\n- marks models installed when matching GGUF files are present locally\n\n### Model name mapping\n\nllmfit's database uses HuggingFace model names (e.g. `Qwen/Qwen2.5-Coder-14B-Instruct`) while Ollama uses its own naming scheme (e.g. `qwen2.5-coder:14b`). llmfit maintains an accurate mapping table between the two so that install detection and pulls resolve to the correct model. Each mapping is exact — `qwen2.5-coder:14b` maps to the Coder model, not the base `qwen2.5:14b`.\n\n---\n\n## Platform support\n\n- **Linux** -- Full support. GPU detection via `nvidia-smi` (NVIDIA), `rocm-smi` (AMD), sysfs/`lspci` (Intel Arc) and `npu-smi` (Ascend).\n- **macOS (Apple Silicon)** -- Full support. Detects unified memory via `system_profiler`. VRAM = system RAM (shared pool). Models run via Metal GPU acceleration.\n- **macOS (Intel)** -- RAM and CPU detection works. Discrete GPU detection if `nvidia-smi` available.\n- **Windows** -- RAM and CPU detection works. NVIDIA GPU detection via `nvidia-smi` if installed.\n\n### GPU support\n\n| Vendor | Detection method | VRAM reporting |\n|---|---|---|\n| NVIDIA | `nvidia-smi` | Exact dedicated VRAM |\n| AMD | `rocm-smi` | Detected (VRAM may be unknown) |\n| Intel Arc (discrete) | sysfs (`mem_info_vram_total`) | Exact dedicated VRAM |\n| Intel Arc (integrated) | `lspci` | Shared system memory |\n| Apple Silicon | `system_profiler` | Unified memory (= system RAM) |\n| Ascend | `npu-smi` | Detected (VRAM may be unknown) |\n\nIf autodetection fails or reports incorrect values, use `--memory=\u003cSIZE\u003e` to override (see [GPU memory override](#gpu-memory-override) above).\n\n---\n\n## Contributing\n\nContributions are welcome, especially new models.\n\n### Adding a model\n\n1. Add the model's HuggingFace repo ID (e.g., `meta-llama/Llama-3.1-8B`) to the `TARGET_MODELS` list in `scripts/scrape_hf_models.py`.\n2. If the model is gated (requires HuggingFace authentication to access metadata), add a fallback entry to the `FALLBACKS` list in the same script with the parameter count and context length.\n3. Run the automated update script:\n   ```sh\n   make update-models\n   # or: ./scripts/update_models.sh\n   ```\n4. Verify the updated model list: `./target/release/llmfit list`\n5. Update [MODELS.md](MODELS.md) by running: `python3 \u003c\u003c 'EOF' \u003c scripts/...` (see commit history for the generator script)\n6. Open a pull request.\n\nSee [MODELS.md](MODELS.md) for the current list and [AGENTS.md](AGENTS.md) for architecture details.\n\n---\n\n## OpenClaw integration\n\nllmfit ships as an [OpenClaw](https://github.com/openclaw/openclaw) skill that lets the agent recommend hardware-appropriate local models and auto-configure Ollama/vLLM/LM Studio providers.\n\n### Install the skill\n\n```sh\n# From the llmfit repo\n./scripts/install-openclaw-skill.sh\n\n# Or manually\ncp -r skills/llmfit-advisor ~/.openclaw/skills/\n```\n\nOnce installed, ask your OpenClaw agent things like:\n\n- \"What local models can I run?\"\n- \"Recommend a coding model for my hardware\"\n- \"Set up Ollama with the best models for my GPU\"\n\nThe agent will call `llmfit recommend --json` under the hood, interpret the results, and offer to configure your `openclaw.json` with optimal model choices.\n\n### How it works\n\nThe skill teaches the OpenClaw agent to:\n\n1. Detect your hardware via `llmfit --json system`\n2. Get ranked recommendations via `llmfit recommend --json`\n3. Map HuggingFace model names to Ollama/vLLM/LM Studio tags\n4. Configure `models.providers.ollama.models` in `openclaw.json`\n\nSee [skills/llmfit-advisor/SKILL.md](skills/llmfit-advisor/SKILL.md) for the full skill definition.\n\n---\n\n## Alternatives\n\nIf you're looking for a different approach, check out [llm-checker](https://github.com/Pavelevich/llm-checker) -- a Node.js CLI tool with Ollama integration that can pull and benchmark models directly. It takes a more hands-on approach by actually running models on your hardware via Ollama, rather than estimating from specs. Good if you already have Ollama installed and want to test real-world performance. Note that it doesn't support MoE (Mixture-of-Experts) architectures -- all models are treated as dense, so memory estimates for models like Mixtral or DeepSeek-V3 will reflect total parameter count rather than the smaller active subset.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexsJones%2Fllmfit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexsJones%2Fllmfit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexsJones%2Fllmfit/lists"}