Yesterday I explained how we can create and upload our own language models in Ollama through the usage of a modelfile. I explained the modelfile format and the different building blocks that can be used to define and configure a model. Today I want to continue on my previous post by explaining how to use OpenWebUI instead of doing everything by hand. Start by opening OpenWebUI (checkout my previous post on how to get it up and running): Click on the Workspace section on the left: Click on the + button in the Models section on the right: Start editing your modelfile: Hit Save & Create at the bottom: After saving the new model, you can immediately test it: More information Explore and test local modals using Ollama and OpenWebUI Models | Open WebUI
If you want to create and share your own model through Ollama or tweak an existing model, you need to understand the Ollama Model file. The model file is the blueprint to create and share models with Ollama. Understanding the Ollama model file Let us first have a look an existing model file to give you an example. Therefore you can use the following command: ollama show <modelname> --modelfile Let’s give it a try: ollama show phi4:latest --modelfile # Modelfile generated by "ollama show" # To build a new Modelfile based on this, replace FROM with: # FROM phi4:latest FROM C:\Users\bawu\.ollama\models\blobs\sha256-fd7b6731c33c57f61767612f56517460ec2d1e2e5a3f0163e0eb3d8d8cb5df20 TEMPLATE """{{- range $i, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $i)) 1 -}} < |im_start|>{{ .Role }}<|im_sep|> {{ .Content }}{{ if not $last }}<|im_end|> {{ end }} {{- if and...