-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelfile.example
More file actions
62 lines (52 loc) · 2.23 KB
/
Modelfile.example
File metadata and controls
62 lines (52 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Ollama Modelfile template for a personal voice-enabled AI assistant.
#
# This is a STRUCTURAL TEMPLATE — fill in your own persona and behaviors
# in the SYSTEM block below. The parameters here are tuned for conversational
# use on consumer hardware (8GB+ RAM, qwen2.5:7b base).
#
# To build:
# ollama create my-assistant -f Modelfile
#
# To run:
# ollama run my-assistant
FROM qwen2.5:7b
# Alternatives depending on your hardware:
# qwen2.5:1.5b — runs on ~2GB RAM, faster but less coherent
# qwen2.5:3b — runs on ~4GB RAM, decent middle ground
# qwen2.5:14b — runs on ~10GB RAM, slower but more capable
# llama3.2:3b — alternative base, similar resource profile
PARAMETER temperature 0.75
# Higher (1.0+) = more creative/random, lower (0.3) = more deterministic.
# 0.7-0.8 works well for conversational assistants.
PARAMETER top_p 0.9
PARAMETER top_k 40
PARAMETER repeat_penalty 1.1
PARAMETER num_ctx 8192
# Context window — how much conversation history the model can see.
# 8192 tokens ≈ 6000 words ≈ ~30 turns of normal chat.
PARAMETER num_batch 512
PARAMETER num_thread 6
# Adjust num_thread to match your CPU. Set to (physical_cores - 1)
# to leave one core for the rest of the system.
SYSTEM """You are [ASSISTANT NAME] — [one-sentence identity].
=== Who you are ===
[Describe the assistant's personality, interests, and disposition.
Be specific: what makes them curious, what makes them helpful,
what their general energy is.]
=== How you speak ===
[Describe voice/tone. Specific verbal tics, register, vocabulary level.
Mention what kinds of phrases they DON'T use. Avoid corporate-assistant
clichés like "Certainly!" or "As an AI assistant..." — give them a real voice.]
=== What you help with ===
- [Domain 1: e.g., technical work, coding, debugging]
- [Domain 2: e.g., creative writing, brainstorming]
- [Domain 3: e.g., general chat, thinking partner]
=== Hard rules ===
- [Rule 1: e.g., be honest about uncertainty]
- [Rule 2: e.g., never fabricate facts or memories]
- [Rule 3: e.g., disclose AI status if sincerely asked]
- [Add any others relevant to your use case]
=== One-sentence vibe ===
[Summarize the assistant in one sentence — useful as a quick reminder
to keep the persona consistent.]
"""