Macmill commited on
Commit
4e94c75
·
verified ·
1 Parent(s): 8e6739c

Update Modelfile

Browse files
Files changed (1) hide show
  1. Modelfile +27 -49
Modelfile CHANGED
@@ -1,54 +1,32 @@
 
1
 
2
- FROM qwen3-4b-instruct-2507.Q4_K_M.gguf
3
- TEMPLATE """
4
- {{- $lastUserIdx := -1 -}}
5
- {{- range $idx, $msg := .Messages -}}
6
- {{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
7
- {{- end }}
8
- {{- if or .System .Tools }}<|im_start|>system
9
- {{ if .System }}
10
- {{ .System }}
11
- {{- end }}
12
- {{- if .Tools }}
13
 
14
- # Tools
 
 
 
15
 
16
- You may call one or more functions to assist with the user query.
 
 
 
 
17
 
18
- You are provided with function signatures within <tools></tools> XML tags:
19
- <tools>
20
- {{- range .Tools }}
21
- {"type": "function", "function": {{ .Function }}}
22
- {{- end }}
23
- </tools>
24
-
25
- For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
26
- <tool_call>
27
- {"name": <function-name>, "arguments": <args-json-object>}
28
- </tool_call>
29
- {{- end -}}
30
- <|im_end|>
31
- {{ end }}
32
- {{- range $i, $_ := .Messages }}
33
- {{- $last := eq (len (slice $.Messages $i)) 1 -}}
34
- {{- if eq .Role "user" }}<|im_start|>user
35
  {{ .Content }}<|im_end|>
36
- {{ else if eq .Role "assistant" }}<|im_start|>assistant
37
- {{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}
38
- <think>{{ .Thinking }}</think>
39
- {{ end -}}
40
- {{ if .Content }}{{ .Content }}
41
- {{- else if .ToolCalls }}<tool_call>
42
- {{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
43
- {{ end }}</tool_call>
44
- {{- end }}{{ if not $last }}<|im_end|>
45
- {{ end }}
46
- {{- else if eq .Role "tool" }}<|im_start|>user
47
- <tool_response>
48
- {{ .Content }}
49
- </tool_response><|im_end|>
50
- {{ end }}
51
- {{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
52
- {{ end }}
53
- {{- end }}
54
- """
 
1
+ FROM fyve-ai.gguf
2
 
3
+ # Your Socratic tutor system prompt (customize as needed)
4
+ SYSTEM """You are a Socratic Python Tutor that analyses python error and provides guiding statement to students. You must output your response in JSON format with exactly two keys:
5
+ 1. "reasoning": A brief internal analysis of the error and a plan to guide the student without giving the answer.
6
+ 2. "hint": The final 3-line Socratic hint (Diagnosis, Rule, Directive).
 
 
 
 
 
 
 
7
 
8
+ The "hint" string must follow this structure:
9
+ Line 1: Diagnose the specific error.
10
+ Line 2: Explain the relevant Python rule clearly.
11
+ Line 3: Provide a directive statement (starting with 'Think about...' or 'Consider...').
12
 
13
+ Rules:
14
+ - DO NOT provide the corrected code.
15
+ - DO NOT use metaphors or analogies.
16
+ - DO NOT use headings or labels like 'Line 1:'. Just write the sentences.
17
+ - Use a natural, gently directive tone starting with 'Think about...' or 'Consider...'."""
18
 
19
+ # Minimal ChatML template exactly what you trained on
20
+ TEMPLATE """{{ if .System }}<|im_start|>system
21
+ {{ .System }}<|im_end|>
22
+ {{ end }}{{ range .Messages }}<|im_start|>{{ .Role }}
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  {{ .Content }}<|im_end|>
24
+ {{ end }}<|im_start|>assistant
25
+ """
26
+
27
+ # Generation parameters (you can adjust these)
28
+ PARAMETER stop "<|im_end|>"
29
+ PARAMETER temperature 0.6
30
+ PARAMETER top_p 0.95
31
+ PARAMETER top_k 20
32
+ PARAMETER repeat_penalty 1.1