Installation
- macOS and Windows
- Linux
- Docker
Download directly from ollama.com/download.
Using LFM2 Models
Ollama can load GGUF models directly from Hugging Face or from local files.Running GGUFs
You can run LFM2 models directly from Hugging Face:{quantization} with your preferred quantization level (e.g., q4_k_m, q8_0).
Then run the local model:
Custom Setup with Modelfile
Custom Setup with Modelfile
For custom configurations (specific quantization, chat template, or parameters), create a Modelfile.Create a plain text file named Import the model with the Modelfile:Then run it:
Modelfile (no extension) with the following content:Basic Usage
Interact with models through the command-line interface.Interactive Chat
/bye to exit.
Single Prompt
ollama run my-model).
Serving Models
Ollama automatically starts a server onhttp://localhost:11434 with an OpenAI-compatible API for programmatic access.
Python Client
Curl request examples
Curl request examples
Ollama provides two native API endpoints:Generate API (simple completion):Chat API (conversational format):
Vision Models
LFM2-VL GGUF models can also be used for multimodal inference with Ollama.Interactive Chat with Images
Interactive Chat with Images
Run a vision model directly and provide images in the chat:In the interactive chat, you can ask questions about images using the Or provide the image path directly in your prompt:
/image command followed by the file path:Using the API
Using the API