Find the Best Local AI Model for Your Computer with whichllm
Job to be done: Find and run optimal local LLMs for specific hardware configurations
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
A computer science student uses `whichllm` to identify an open-source LLM that runs efficiently on their laptop, enabling them to build and test AI projects for their final year thesis without relying on expensive mobile data.
- 9-5 employee
A software developer in a Nigerian tech firm uses `whichllm` to quickly identify suitable open-source LLMs that can run locally on their workstation, for developing internal tools that handle sensitive company data securely and without inte
- Entrepreneur
An entrepreneur developing a low-cost, offline-capable AI assistant for local businesses uses `whichllm` to find the best-performing LLMs that can run on affordable hardware, making their product accessible even in areas with poor internet.
What you’ll get
You will get a ranked list of AI models (Large Language Models, or LLMs) that are most likely to run well on your computer’s specific hardware (like your GPU, CPU, and RAM). You will also be able to start a chat with a recommended model directly from your computer. This approach helps you avoid wasting time downloading models that won’t perform well or even run on your machine, by using real performance benchmarks instead of just model size.
Tools you need
- whichllm (free): A command-line tool that detects your hardware and recommends local AI models.
- uv (free): A fast Python package installer, used here to install
whichllm. (Alternatively,brewfor macOS/Linux orpipfor all OSes can be used). - HuggingFace (freemium): A platform where many open-source AI models are hosted and can be downloaded.
- LM Studio (free): An optional desktop application that provides a user-friendly way to download and run local AI models with a chat interface.
Steps
-
Open your computer’s terminal: This is a program where you can type commands to control your computer.
- On Windows: Search for “PowerShell” in the Start menu and open it.
- On macOS: Search for “Terminal” in Spotlight (Cmd + Space) and open it.
- On Linux: Open your preferred terminal application (often found in your applications menu).
You should see a window with a blinking cursor, ready for you to type commands.
-
Install
uv(the package installer):uvis a very fast tool to install Python packages.whichllmis a Python package.Type the following command and press Enter:
# macOS or Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows (PowerShell) irm https://astral.sh/uv/install.ps1 | iexYou should see messages indicating
uvis being downloaded and installed. Once complete, you might need to close and reopen your terminal foruvto be recognized. To check if it’s installed, typeuv --versionand press Enter. You should see theuvversion number. -
Install
whichllm: Now thatuvis installed, use it to installwhichllm.Type the following command and press Enter:
uv tool install whichllmYou should see
whichllmbeing installed. After it finishes, you can check if it’s installed by typingwhichllm --versionand pressing Enter. You should see thewhichllmversion number. -
Find the best AI models for your hardware: Run
whichllmto automatically detect your computer’s hardware (like your GPU, which is a special chip that makes AI training fast, and your RAM, which is your computer’s short-term memory) and recommend suitable AI models.Type the following command and press Enter:
whichllmYou should see a list of recommended AI models, ranked by how well they perform on benchmarks and how well they fit your hardware. Each entry will show the model name, size, a score, and estimated speed (tokens per second). For example:
#1 Qwen/Qwen3.6-27B 27.8B Q5_K_M score 92.8 27 t/sThis means the Qwen3.6-27B model (27.8 billion parameters) is ranked #1, has a quality score of 92.8, and can process about 27 “tokens” (like words or parts of words) per second.
-
** (Optional) Get a “safer” recommendation**: By default,
whichllmcan be ambitious, suggesting models that might just barely fit. If you want a more conservative recommendation, similar to what a tool like LM Studio might suggest, use these options:Type the following command and press Enter:
whichllm --gpu-only --speed usable --vram-headroom 1GBYou should see a new list of models. This list will only include models that fit entirely within your GPU’s VRAM (video memory), filters out models estimated to be too slow, and leaves 1GB of extra VRAM for the system to use. If models still seem too large in another tool, you can increase
1GBto1.5GBor2GB. -
Start a chat with a recommended model: Once you’ve identified a model you want to try,
whichllmcan help you start a chat with it. This will download the model to your computer and then open a simple chat interface in your terminal.Replace
[model name]with the full name of a model from yourwhichllmoutput (e.g.,qwen 2.5 1.5b gguf).Type the following command and press Enter:
whichllm run "[model name]"You should see
whichllmdownloading the model (this might take some time depending on your internet speed and the model size). After the download, a chat interface will appear in your terminal, allowing you to type messages and get responses from the local AI model.
Original source
This workflow is based on whichllm, an open-source project by andyyyy64, shared on Hacker News. The tool helps users find and run local AI models optimized for their specific computer hardware.
Notes & variations
- Free-tier alternatives:
whichllmitself is free and open-source. The models it recommends are also generally free to download from HuggingFace. The main “cost” is your computer’s hardware and the time/data required to download large models. - Common mistake: Not having enough free disk space or a stable internet connection for downloading large AI models. Models can be several gigabytes in size. Ensure you have plenty of space and a reliable connection before starting a download.
- Tip for better results: If you know your computer’s exact GPU model (e.g., “RTX 4090”), you can simulate it even if you don’t have it, or get recommendations for it by running
whichllm --gpu "RTX 4090". This is useful if you’re planning a hardware upgrade.