There is a lot of information available on using Ollama. Check out the Ollama quick start guide to get up and running quickly.
Youtube has a few channels that I thought were very good when talking about Ollama. Matt Williams’ technovangelist Youtube channel is one of those. Matt was one of the founding maintainers of the Ollama project. He took off earlier this year to spend all of his time building content that will get you up to speed on Ollama. HIs video “Getting Started on Ollama” is a good introduction to Ollama. As he says in his video, Ollama is a little different than other tools, because it considers a model to be everything you need to start using a model. Those things are the model weights, the template, the system prompt, and very thing else. Most other tools think that the model is just the weights file.
Matt’s video “Building AI Apps in Python with Ollama” is another good video. As Matt describes in his video, Ollama has two main components. The client which runs the REPL (started by executing “ollama run llama3”) and the Service (started by executing “ollama serve”) which publishes the API to other client programs. The Service is not run interactively but runs in the background. Matt does a nice job in this short video going over how to use Python to create some basic apps. The code for this video is located here.
Ollamac is a macOS (14 or later) app for interfacing with the Ollama models. It interacts with the Ollama service running on your computer. It provides an alternative to using the Ollama CLI. You can create a number of chats with various models. Here I have a chat open with the llama3 model that I have in my Ollama models directory. It think it is a pretty handy alternative to the CLI if you are interacting with existing models. The Ollama CLI can be handy if you are creating new models and doing some app prototyping in Python, like Matt did in his video.

Inside each of the Ollamac chat windows at the bottom of the conversation, there is a clipboard icon that you can click on to copy the conversation in the window which you can paste where ever you want. That is what I had done with the Ollama REPL, but Ollamac makes it easier.

Came across this interesting video about creating an Ollama UI with Streamlit. Had to subscribe to this guy’s channel and give the video a thumbs up! While Ollamac is cool, I think this Streamlit UI for Ollama is cool too. What is Streamlit? According to its website, Streamlit turns data scripts into shareable web apps in minutes. All in pure Python. No front‑end experience required. Its app framework is open source! Check out the Streamlit Docs.
I won’t go into the details of the video, but it is worth watching. You are basically creating a web interface to the Ollama service. From what I have seen on the Streamlit website, it seems you can create macOS applications also. How robust they are, I don’t know. That is beyond the scope of what we are doing here. In order to execute the Stremit app that was built in the video, you do the following:
martin$ streamlit run 01_💬_Chat.py &
[1] 92652
martin$
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.1.44:8501
martin$

To close out this post, I am going to quickly go through how to create you own customized Llama 3 model using Ollama. The information comes from this YouTube video. In a nutshell, we will be creating a model file which will allow us to customize the system prompt (so it will say certain things for instance) and a few of the parameters so that the new model will fit our particular needs whatever they may be. This could fine tune the new model that we will create with some characteristics that we want the model to have. We will use this file as an input to Olama when we create or new model. Here is the contents of the file (called custom-llama3):

We can get the information needed for our model file by going to the information page that Ollama has for Llama3. For the other LLMs that you can get from Ollama, there is an information page for each like the one they have for Llama3. So the model file you create will be different for each.
In order to create a new LLM using this model file, we will enter the following command:
martin$ ollama create my-llama3-model -f custom-llama3
After the new model has been created, we can run it.
martin$ ollama run my-llama3-model
>>> what is your name?
Nice to meet you! My name is Jarvis Jones, and I’m an AI assistant here to help with any questions or tasks you may have!
>>> Send a message (/? for help)
I created a very basic Jarvis here. 😉 That’s it for now.
NOTE: After I posted this blog entry, I discovered that Ollamac did not seem to keep track of the prior questions that I asked or its prior replies. This included both a standard Llama 3 model and my custom model where I give the model an age, a birthday, and a name. The program might not be buffering the questions and replies. Using the Streamlit interface work without any issues. Both of these UI talk to the Ollama Service. Not sure what the issue is, but I won’t be using Ollamac. The Streamlit interface has a lot of promise. I will look more into that.

