From c3fb94969318b71f0f12e003b9a75747c5f0f80d Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Wed, 16 Jul 2025 15:12:37 -0700 Subject: [PATCH] docs: ollama --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 088df11..f1a0866 100755 --- a/README.md +++ b/README.md @@ -64,8 +64,40 @@ sudo apt-get install libomp-dev libboost-all-dev protobuf-compiler libabsl-dev l uv sync ``` -### 🚀 30-Second Example +**Ollama Setup (Optional for Local LLM):** + +*macOS:* +```bash +# Install Ollama +brew install ollama + +# Pull a lightweight model (recommended for consumer hardware) +ollama pull llama3.2:1b + +# For better performance but higher memory usage +ollama pull llama3.2:3b +``` + +*Linux:* +```bash +# Install Ollama +curl -fsSL https://ollama.ai/install.sh | sh + +# Start Ollama service manually +ollama serve & + +# Pull a lightweight model (recommended for consumer hardware) +ollama pull llama3.2:1b + +# For better performance but higher memory usage +ollama pull llama3.2:3b +``` + +**Note:** For Hugging Face models >1B parameters, you may encounter OOM errors on consumer hardware. Consider using smaller models like Qwen3-0.6B or switch to Ollama for better memory management. + +### 30-Second Example Try it out in [**demo.ipynb**](demo.ipynb) + ```python from leann.api import LeannBuilder, LeannSearcher # 1. Build index (no embeddings stored!)