Mikrodev commited on
Commit
aa5641a
·
verified ·
1 Parent(s): 5605c67

Upload Modelfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Modelfile +10 -18
Modelfile CHANGED
@@ -10,29 +10,21 @@
10
  # 2) ollama create stcoder-qwen25-7b:<quant> -f Modelfile e.g. ollama create stcoder-qwen25-7b:q8_0 -f Modelfile
11
  # 3) ollama run stcoder-qwen25-7b:<quant> "Motor starts 5 seconds after the start button; stop and E-stop drop it."
12
  #
13
- # Requires Ollama 0.3 or newer.
 
 
 
 
 
 
 
 
14
  # num_ctx 8192 matches the sequence length this model was fine-tuned at.
15
  # Published numbers were measured greedily (temperature 0, seed 42) at num_ctx 16384 / num_predict 8192. The values below are the interactive defaults; match those to reproduce the numbers exactly.
16
- # Standard ChatML. Any Ollama from 0.3 on serves this build.
17
 
18
  FROM ./qwen25_coder_7b-tc.q8_0.gguf
19
 
20
- TEMPLATE """{{- if .System }}<|im_start|>system
21
- {{ .System }}<|im_end|>
22
- {{ end }}
23
- {{- range .Messages }}
24
- {{- if eq .Role "user" }}<|im_start|>user
25
- {{ .Content }}<|im_end|>
26
- {{ else if eq .Role "assistant" }}<|im_start|>assistant
27
- {{ .Content }}<|im_end|>
28
- {{ end }}
29
- {{- end }}<|im_start|>assistant
30
- """
31
-
32
- PARAMETER stop "<|im_end|>"
33
- PARAMETER stop "<|endoftext|>"
34
- PARAMETER stop "<|im_start|>"
35
-
36
  PARAMETER temperature 0.2
37
  PARAMETER top_p 0.95
38
  PARAMETER top_k 20
 
10
  # 2) ollama create stcoder-qwen25-7b:<quant> -f Modelfile e.g. ollama create stcoder-qwen25-7b:q8_0 -f Modelfile
11
  # 3) ollama run stcoder-qwen25-7b:<quant> "Motor starts 5 seconds after the start button; stop and E-stop drop it."
12
  #
13
+ # Requires Ollama 0.3 or newer; verified on 0.32.5.
14
+ #
15
+ # No TEMPLATE line here, deliberately: Ollama uses the chat template stored inside the GGUF
16
+ # - the template of the tokenizer this model was trained with, so it cannot drift out of
17
+ # sync with the weights. We measured this: adding a TEMPLATE to this file does not change
18
+ # the prompt the model receives (identical prompt token counts with, without, and with a
19
+ # deliberately wrong template). With llama.cpp directly, pass --jinja so llama-cli and
20
+ # llama-server use that same embedded template.
21
+ #
22
  # num_ctx 8192 matches the sequence length this model was fine-tuned at.
23
  # Published numbers were measured greedily (temperature 0, seed 42) at num_ctx 16384 / num_predict 8192. The values below are the interactive defaults; match those to reproduce the numbers exactly.
24
+ # Does not support Ollama's thinking switch - passing `think` to /api/chat returns HTTP 400 (measured). It answers with code directly, which is the point of this build.
25
 
26
  FROM ./qwen25_coder_7b-tc.q8_0.gguf
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  PARAMETER temperature 0.2
29
  PARAMETER top_p 0.95
30
  PARAMETER top_k 20