Tech Stack · AI/ML
Ollama
Run open-weight LLMs and embedding models on your own machine.
What it is
Ollama downloads, manages, and serves open models (Llama, Mistral, Gemma, Qwen, nomic-embed-text, and more) locally. It exposes a REST API on http://localhost:11434, so Spring AI, Python, or curl can call a model with no API key and no per-token bill.
Install
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# macOS / Windows: download the installer from ollama.com
ollama --version
Everyday commands
| Command | What it does |
|---|---|
ollama pull llama3.2 |
Download a model |
ollama run llama3.2 |
Chat with a model in the terminal (pulls it first if needed) |
ollama list |
Models on disk |
ollama ps |
Models currently loaded in memory |
ollama show llama3.2 |
Model details: parameters, context length, template |
ollama stop llama3.2 |
Unload a running model |
ollama rm llama3.2 |
Delete a model |
ollama serve |
Start the server manually (the installer usually runs it as a service) |
Call the API
# Chat completion
curl http://localhost:11434/api/chat -d '{
"model": "llama3.2",
"messages": [{ "role": "user", "content": "Explain RAG in one sentence." }],
"stream": false
}'
# Embeddings
curl http://localhost:11434/api/embed -d '{ "model": "nomic-embed-text", "input": "hello" }'
Gotchas
- Model size must fit in RAM/VRAM; start with small (1B–8B) models on a laptop.
- Set
OLLAMA_HOST=0.0.0.0only if you really want other machines to reach the server.