Installation
QMD requires Node.js 22+ or Bun 1.0+ and uses three local GGUF models for embeddings, re-ranking, and query expansion. Models are automatically downloaded on first use.System Requirements
Runtime
Platform-Specific Requirements
- macOS
- Linux
- Windows
Install Homebrew SQLite for extension support:This is required for the
sqlite-vec extension used by vector search.Storage Requirements
Plan for approximately 2.5GB of storage:| Component | Size | Purpose |
|---|---|---|
| Models | ~2.1GB total | GGUF model files (see below) |
| Index | Variable | SQLite database (~10MB per 1000 docs) |
| Cache | Variable | Model cache and LLM response cache |
Install QMD
- npm
- Bun
- Development
GGUF Models
QMD uses three local GGUF models that are automatically downloaded from HuggingFace on first use:embeddinggemma-300M-Q8_0 (~300MB)
embeddinggemma-300M-Q8_0 (~300MB)
Purpose: Generate vector embeddings for documents and queriesModel:
ggml-org/embeddinggemma-300M-GGUF/embeddinggemma-300M-Q8_0.ggufQuantization: Q8_0 (8-bit quantization for quality)Usage:- Document chunking and embedding during
qmd embed - Query embedding during
qmd vsearchandqmd query
qwen3-reranker-0.6b-q8_0 (~640MB)
qwen3-reranker-0.6b-q8_0 (~640MB)
Purpose: Re-rank search results using cross-encoder scoringModel:
ggml-org/Qwen3-Reranker-0.6B-Q8_0-GGUF/qwen3-reranker-0.6b-q8_0.ggufQuantization: Q8_0 (8-bit quantization)Usage:- Re-ranks top 30 candidates in
qmd querypipeline - Returns yes/no relevance with logprob confidence scores
createRankingContext() API to score query-document pairs.qmd-query-expansion-1.7B-q4_k_m (~1.1GB)
qmd-query-expansion-1.7B-q4_k_m (~1.1GB)
Purpose: Generate alternative query phrasings for better recallModel:
tobil/qmd-query-expansion-1.7B-gguf/qmd-query-expansion-1.7B-q4_k_m.ggufQuantization: Q4_K_M (4-bit K-quant for efficiency)Usage:- Generates 1-2 alternative queries in
qmd querypipeline - Original query is weighted 2x in fusion scoring
Models are cached in
~/.cache/qmd/models/ by default. You can set XDG_CACHE_HOME to change the cache directory.Model Download
Models download automatically on first use:Automatic Download
QMD detects missing models and downloads them from HuggingFace:Progress is shown in the terminal.
Manual Model Download
If you prefer to download models explicitly before first use:Storage Locations
QMD uses XDG Base Directory conventions:| Data | Location | Environment Variable |
|---|---|---|
| Index database | ~/.cache/qmd/index.sqlite | XDG_CACHE_HOME |
| GGUF models | ~/.cache/qmd/models/ | XDG_CACHE_HOME |
| Collection config | ~/.config/qmd/index.yml | XDG_CONFIG_HOME |
Verify Installation
Confirm QMD is installed and check version:Troubleshooting
Node version too old
Node version too old
Error:
SyntaxError: Unexpected token '??='Solution: Upgrade to Node.js 22+:sqlite-vec extension not loading (macOS)
sqlite-vec extension not loading (macOS)
Error: Make sure Homebrew’s SQLite is in your PATH before system SQLite.
Error loading sqlite-vec extensionSolution: Install Homebrew SQLite:Model download fails
Model download fails
Error:
Failed to download model from HuggingFaceSolutions:- Check internet connection
- Try again (HuggingFace can be slow)
- Download manually (see Manual Model Download above)
- Check firewall/proxy settings
Out of disk space
Out of disk space
Error:
ENOSPC: no space left on deviceSolution: Free up at least 3GB of space for models and index data.Check current usage:Next Steps
Quick Start
Get your first search working with a step-by-step tutorial