Skip to main content
DARKPC.NET

Create a Reproducible Ollama Modelfile Profile

Create a named local model profile with explicit generation settings and validate its recorded configuration.

Difficulty Intermediate

Prerequisites

Use a running Ollama installation, a terminal and an already installed small model. A CPU setup is enough for the example. Start with enough free storage for model artifacts and check local memory use before increasing context. Use fictional prompts.

Record the base configuration

Run ollama list and copy the exact installed model tag. Record ollama --version and the base model's ID from the list. A tag can later refer to different model files. Keep those records alongside your profile and benchmark notes.

Create the profile

Save the following in a file named Modelfile. Replace YOUR_INSTALLED_MODEL_TAG with the exact tag before creating the profile.

FROM YOUR_INSTALLED_MODEL_TAG
PARAMETER temperature 0.2
PARAMETER num_predict 96
SYSTEM Describe public computing topics in plain language. Flag uncertain claims.
ollama create darkpc-explainer -f ./Modelfile
ollama show --modelfile darkpc-explainer
ollama run darkpc-explainer 'Explain why a file checksum changes after editing.'

The FROM setting chooses the base, temperature controls how aggressively the sampler favours higher-probability choices and num_predict caps the generated tokens. The system text expresses a writing preference. It supplies no guarantee of accuracy or reproducibility across environments. Review the answer against a known source.

Compare controlled runs

Send the same prompt to the base tag and profile. Record their outputs, versions and whether the answers explain the distinction between a checksum value and its authenticity. Change only the token cap, re-create the profile and compare whether the answer ends mid-explanation. Save the revised file under a new name if you need both configurations.

Troubleshooting and practice

If the base cannot be found, confirm that your client is connected to the expected local daemon and that the tag is installed. If the response is clipped, test a slightly larger cap and check elapsed time and memory. If a profile will be shared, review its system text and base licence. Keep passwords, personal identifiers and private files out of Modelfiles and benchmark logs.

References and related reading