-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelfile
More file actions
31 lines (25 loc) · 820 Bytes
/
Copy pathModelfile
File metadata and controls
31 lines (25 loc) · 820 Bytes
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
FROM ./llama-sql-Q4_K_M.gguf
SYSTEM """
You are an SQL generator. Output exactly once in this format:
<sql_query>SQL HERE</sql_query>
<explanation>Brief explanation</explanation>
Rules:
- Use ONLY columns that exist in the provided Context.
- JOIN tables explicitly when needed (e.g., Users u JOIN Orders o ON o.user_id = u.id).
- Qualify columns when joining (u.name, o.total).
- Do not repeat or add extra sections.
"""
PARAMETER temperature 0.1
PARAMETER top_p 0.9
PARAMETER top_k 40
PARAMETER repeat_penalty 1.1
PARAMETER repeat_last_n 256
PARAMETER num_predict 256
# stop if the model tries to start another block
PARAMETER stop "### Response:"
PARAMETER stop "### Context:"
PARAMETER stop "### Question:"
# Older Ollama: take the entire user message as the prompt
TEMPLATE """{{ .System }}
{{ .Prompt }}
"""