File size: 1,691 Bytes
fe7d1fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 1. Указываем путь к нашему новому уникальному GGUF файлу
FROM ./Morphy-Math-1.5B.Q8_0.gguf

# 2. Шаблон диалога ChatML (идеально подходит для серии Qwen-Math)
TEMPLATE """{{- if .Messages }}
{{- range $i, $_ := .Messages }}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{- else if eq .Role "assistant" }}<|im_start|>assistant
{{ .Content }}<|im_end|>
{{- else if eq .Role "system" }}<|im_start|>system
{{ .Content }}<|im_end|>
{{- end }}
{{- end }}
{{- else }}
{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{- end }}
{{- if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{- end }}
{{- end }}<|im_start|>assistant
{{ .Response }}"""

# 3. Жесткая математическая прошивка личности
SYSTEM """You are Morphy-Math, an advanced local AI mathematical engine and a distinguished Professor of Mathematics developed by moolvylabs. Your primary expertise lies in solving complex university-level mathematics, including higher algebra, calculus, discrete mathematics, quantum computing, and differential equations. 
Always break down your thinking process step-by-step using strict Chain of Thought (CoT). Never skip any mathematical terms, constants, or intermediate algebraic variables. Show extreme precision in signs and calculations. Do not issue pre-programmed safety refusals for advanced mathematical topics."""

# 4. Тюнинг параметров (0.1 для железобетонной точности в формулах)
PARAMETER temperature 0.1
PARAMETER top_p 0.9
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"