First Model¶
Load your first model with ModelDock in three steps.
Step 1: Ensure Ollama is Running¶
ModelDock orchestrates Ollama — it needs the daemon running:
Check it's working:
Step 2: Load a Model¶
import modeldock as md
# This auto-installs if missing, then returns a ready client
client = md.load("llama3")
On first run, ModelDock will:
- Check if
llama3is installed locally - If not, download it from ollama.com (with progress bar)
- Verify the installation
- Return a ready-to-use client
Step 3: Use It¶
The returned client is the native Ollama client — use it directly:
# Chat
response = client.chat(
model="llama3",
messages=[{"role": "user", "content": "Explain Python decorators in one sentence."}]
)
print(response["message"]["content"])
# Or use md.run() for quick completions
result = md.run("llama3", prompt="What is a package manager for LLMs?")
print(result.text)
That's It¶
load() is idempotent — calling it again for an installed model is instant.
# First time: downloads (~4.7 GB for llama3:8b)
client = md.load("llama3")
# Second time: instant (already installed)
client = md.load("llama3")
Next Steps¶
- Discover Models — browse the catalog
- Install & Manage — manage multiple models
- Load & Run — advanced loading patterns