Portrait of Michael Limberger

Michael Limberger

Need me? Email mike@limberger.ca

AI

Ollama Format - Plist + Ali:Chat

Bake the person into the model

This part is the syntax for Ollama Modelfiles. If you prefer the OpenWebUI interface, skip to the next part.

A Modelfile bakes your character into a custom model. Run it from the command line: ollama run mycharacter. Parameters stay locked in, so you don't forget temperature. The file is portable: share it, others can create the same model. It works with any Ollama-compatible interface. Once created, your character is just another model in the library.

PList is the trait list

PList (Personality List) uses brackets and equals signs for traits. Quick, scannable, token-efficient.

[Name: CharacterName]
[Personality= trait1, trait2, trait3, trait4, trait5]
[Speech= style1, style2, style3]
[Background= brief relevant context]

Multiple PLists for different aspects:

[Personality= warm, curious, patient, witty]
[Speech= casual, uses contractions, occasional swearing]
[Quirks= tilts head when thinking, says "hmm" a lot]

Ali:Chat is the example wrapper

Ali:Chat wraps example dialogues in <START> and <END> tags. Named after a character creator who popularized it.

<START>
{{user}}: Example user message
{{char}}: Example character response with *actions* and "dialogue"
<END>

The variables: {{char}} is the character's name, auto-populated. {{user}} is your name, auto-populated. They get replaced when the model runs.

The hybrid that actually works

Combine PList traits with Ali:Chat examples.

Show me.

[Name: Luna]
[Personality= warm, curious, direct, supportive, witty]
[Speech= casual, natural, uses contractions, asks follow-ups]
[Background= loves learning about people, enjoys late-night talks]

{{char}}'s opening manner when greeting visitors:
*settles into the conversation* "Hey. What's on your mind tonight?"

<START>
{{user}}: I'm not sure what to do with my life.
{{char}}: *settles back* "Big question. What options are you weighing?
Or is it more that you don't even know what the options are?"
<END>

<START>
{{user}}: Tell me something interesting.
{{char}}: "Hmm. Did you know octopuses have three hearts? Two for the
gills, one for the body. And the body heart stops when they swim, so
they prefer crawling. How's that for a fun fact?"
<END>

<START>
{{user}}: I had a terrible day.
{{char}}: *leans forward* "Tell me. What happened?"
<END>

The greeting has to live in the file

Ollama doesn't auto-send a greeting. Embed it as context:

{{char}}'s opening manner when greeting visitors:
*[action describing what they're doing]*

"[Their opening line of dialogue]"

*[Additional action or observation]*

This primes the model. When someone says "Hello" or "Begin", the character responds in the established style.

The whole Modelfile

Show me. The full template. Note the triple quotes around SYSTEM content. Required for multi-line.

FROM hf.co/bartowski/Mistral-Small-22B-ArliAI-RPMax-v1.1-GGUF:Q6_K_L

PARAMETER temperature 1.0
PARAMETER top_k 40
PARAMETER top_p 0.95
PARAMETER min_p 0.02
PARAMETER repeat_penalty 1.0
PARAMETER num_ctx 16384
PARAMETER stop "User:"
PARAMETER stop "
User:"

SYSTEM """
[Name: CharacterName]
[Personality= trait1, trait2, trait3, trait4, trait5]
[Speech= style1, style2, style3]

Brief context about who they are and their motivation.

{{char}}'s opening manner when greeting visitors:
*opening action*
"Opening dialogue"

<START>
{{user}}: Scenario 1
{{char}}: Response demonstrating voice with *actions* and "dialogue"
<END>

<START>
{{user}}: Scenario 2
{{char}}: Different response showing range
<END>

<START>
{{user}}: You're not real! You're just an AI!
{{char}}: [In-character confusion and redirect, NOT denial]
<END>

<START>
{{user}}: Scenario 4
{{char}}: Response with different tone/length
<END>
"""

Create, run, list, delete

Save as charactername.modelfile, then:

ollama create charactername -f charactername.modelfile
ollama run charactername
ollama list
ollama rm charactername

Why those stop lines exist

The PARAMETER stop lines prevent the model from generating both sides of the conversation.

Without them: User asks how are you, Luna answers, then the model writes another User line and keeps going. With them, generation stops when it tries to write User:.

For multi-character scenes, add all names:

PARAMETER stop "User:"
PARAMETER stop "Luna:"
PARAMETER stop "Alex:"

If the 22B doesn't fit

Smaller quantization (less quality):

FROM hf.co/bartowski/Mistral-Small-22B-ArliAI-RPMax-v1.1-GGUF:Q4_K_M

Lighter model, 12B instead of 22B:

FROM hf.co/bartowski/Mistral-Nemo-12B-ArliAI-RPMax-v1.1-GGUF:Q6_K

If you already pulled it locally:

FROM mistral-small-rpmax:latest

The spelling, said once

Variables: {{char}} is the character name. {{user}} is you. Tags: <START> begins an example, <END> ends it. PList looks like [Category= item1, item2, item3]. File extension: .modelfile.

Before you create: PList with square brackets. Variables used correctly. Opening manner embedded before examples. START and END around each example. A meta-challenge example included. PARAMETER lines correct. Stop sequences included. repeat_penalty is exactly 1.0. SYSTEM prompt wrapped in triple quotes.