mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
0b304ad27b
Co-authored-by: Jason Liu <jason@jxnl.co>
Running a Local Ollama Model
Dependencies
- ollama
- litellm
- setuptools
Instructions
-
Install Ollama by visiting the website https://ollama.ai/download and selecting the appropriate operating system.
-
Once installed, open the Ollama app, which should be running in your taskbar.
-
Open the terminal and download a model. For example, to download the llama2 model, run the command:
ollama run llama2
- In your terminal, start your virtual environment and install the 'litellm[proxy]' package using poetry you can run the command:
poetry add 'litellm[proxy]'
- Next, install setuptools using the command:
poetry add setuptools
- Lastly, start the litellm server with the command:
litellm --model ollama/llama2. This will expose the port on your local machine.
litellm --model ollama/llama2
- Now you can run the completion!