Running Lynx Locally with Ollama
- Install ollama: [https://ollama.com/download]
- Download the .gguf version of Lynx-8B-Instruct from here (this might take 1-2 minutes): https://huggingface.co/PatronusAI/Lynx-8B-Instruct-Q4_K_M-GGUF
- Create a file named Modelfile with the following:
Make sure the .gguf path points to your downloaded model.
- Run
ollama create lynx-8b -f Modelfile
- Run
ollama run lynx-8b
You can now start chatting to Lynx-8B-Instruct locally!
For best results on hallucination detection, use the following prompt template:
To query the model via API:
Note that this creates streaming responses, so requires buffering for complete sequences: