Running Local LLMs With Ollama
Customising Models With Ollama
Demo Uploading Custom Models
Distributing Modelfiles for every update can be cumbersome. By uploading custom models to the Ollama Model Registry, your team can pull the latest version directly—just like using Docker Hub for container images.
In this tutorial, we’ll cover how to:
- Set up your Ollama account and trust relationship
- Tag and copy your local model
- Push the tagged model to the registry
- Pull and verify your custom model
1. Set Up Your Ollama Account and Trust Relationship
- Create an Ollama account at https://ollama.com/ and sign in.
- Go to Settings → Ollama Key.
- Locate your public SSH key on your local machine:
OS | Public Key Path |
---|---|
macOS | ~/.ollama/id_ed25519.pub |
Linux | ~/.ollama/id_ed25519.pub |
Windows | C:\Users\<username>\.ollama\id_ed25519.pub |
- Display and copy your public key:
cat ~/.ollama/id_ed25519.pub
# Example output:
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH7Ief2QY2HB3PsazsapAGID8hBSf7rc3is9C/0ldmR
- Paste the key into your Ollama Ollama Key field and save.
Note
Once added, Ollama will recognize and authenticate your machine for publishing.
2. Tag and Copy Your Local Model
First, list your existing local models:
ollama ls
Example output:
NAME ID SIZE MODIFIED
harris:latest 267a012ab49f 2.0 GB 5 days ago
phi3:latest 4f2222927938 2.2 GB 5 days ago
llama3.2:latest a80c4f17acd5 2.0 GB 6 days ago
Next, create a tagged copy under your Ollama username:
ollama copy harris your_username/harris:latest
Replace your_username
with your actual Ollama account name. Verify the new entry:
ollama ls
Expected result:
NAME ID SIZE MODIFIED
your_username/harris:latest 267a012ab49f 2.0 GB just now
harris:latest 267a012ab49f 2.0 GB 5 days ago
phi3:latest 4f2222927938 2.2 GB 5 days ago
llama3.2:latest 2.0 GB 6 days ago
3. Push Your Model to the Registry
Push the tagged model to make it available on Ollama:
ollama push your_username/harris:latest
Sample output:
retrieving manifest
pushing dd5aaa3fc5ff... 100%
pushing 966de95ca8a6... 100%
...
pushing manifest
success
You can find your model at:
https://ollama.com/your_username/harris
Visit the URL to view details such as architecture, parameter count, quantization, and any custom system instructions.
4. Pull and Verify the Custom Model
Anyone with access can now pull and run your personalized model:
ollama pull your_username/harris:latest
Quick Reference: Ollama CLI Commands
Command | Description | Example |
---|---|---|
ollama ls | List all local models | ollama ls |
ollama copy <src> <dest> | Tag and copy a model for the registry | ollama copy harris your_username/harris:latest |
ollama push <repo>:<tag> | Push tagged model to the registry | ollama push your_username/harris:latest |
ollama pull <repo>:<tag> | Pull a model from the registry | ollama pull your_username/harris:latest |
Conclusion
Uploading custom models to the Ollama Model Registry simplifies sharing, version control, and collaboration. Experiment with tagging, pushing, and pulling your own models to integrate this workflow into your development process.
Watch Video
Watch video content