Volker Janz
2 min readJan 6, 2025

--

Thank you for bringing up model files - they're definitely a powerful feature of Ollama! You're absolutely right that they provide great customization capabilities.
You could indeed take the prompts from my article and turn them into system prompts in a model file, like this:

FROM gemma2
SYSTEM "provide a concise and comprehensive summary of the given text:"

Then create a custom model:

ollama create summary-model -f ./summary-model-file

While this would simplify the script to:

#!/bin/bash
echo "Summarizing clipboard content..."
pbpaste | ollama run summary-model | glow -

However, it's important to understand that model files and scripts serve different purposes. Model files are designed to customize model behavior and characteristics as well as creating new custom models, while scripts automate workflows - like grabbing text from your clipboard, preprocessing it, passing it through Ollama, and piping the output to other applications. They're complementary tools rather than alternatives.

I intentionally chose to keep the prompts in the scripts for a few reasons:
1. Scripts and model files serve different purposes - model files are great for model customization, while scripts automate workflows that often involve multiple steps.
2. Maintainability - Having the prompt visible in the script makes it easier to iterate and modify without having to create/update models. You can see and adjust everything in one place.
3. Workflow complexity - Creating a custom model for each use case adds an extra setup step, whereas the script approach is more "plug and play".

That said, I really appreciate you highlighting model files! They're an excellent feature for cases where you want to create a truly customized model with specific behaviors, temperature settings, and system prompts. The beauty of Ollama is that it offers multiple approaches to solve problems - whether through scripts, custom models, or a combination of both.
Thanks for sparking this discussion about different implementation approaches. It helps everyone understand the tools better! 🙌

--

--

Volker Janz
Volker Janz

Written by Volker Janz

Expert Data Engineer @ InnoGames | 👨‍💻 Data Engineering, SQL, Python, Java, Kafka, Flink, Hadoop, Cloud | 🎙️ Passionate Speaker | 🧩 I Bring Big Data to life

No responses yet

Write a response