Files changed (1) hide show
  1. install.sh +16 -27
install.sh CHANGED
@@ -8,49 +8,38 @@ if ! command -v ollama &> /dev/null; then
8
  exit 1
9
  fi
10
 
11
- # Download model files
12
- MODEL_DIR="$HOME/.ollama/models/indo_math_teacher"
13
- mkdir -p "$MODEL_DIR"
14
 
 
15
  echo "Downloading model files..."
16
- FILES=(
17
- "added_tokens.json"
18
- "config.json"
19
- "merges.txt"
20
- "model.safetensors"
21
- "model.safetensors.index.json"
22
- "special_tokens_map.json"
23
- "tokenizer.json"
24
- "tokenizer_config.json"
25
- "vocab.json"
26
- )
27
-
28
- HF_REPO="Lckoo1230/indo-math-teacher-complete"
29
-
30
- for file in "${FILES[@]}"; do
31
- echo "Downloading $file..."
32
- curl -L "https://huggingface.co/$HF_REPO/resolve/main/$file" -o "$MODEL_DIR/$file"
33
- done
34
 
35
  # Create Modelfile
36
- cat > Modelfile.temp << EOL
37
- FROM qwen/Qwen2.5-1.5B
38
  SYSTEM "You are a math teacher using the Gasing method"
39
 
40
  PARAMETER temperature 0.1
41
  PARAMETER top_p 0.9
42
  PARAMETER num_predict 200
43
 
44
- # Set stop sequences
45
- TEMPLATE "{{ .System }}\n\n{{ .Prompt }}"
46
  STOP "[/INST]"
47
  STOP ">>> "
48
  STOP "\n\nHuman:"
49
  STOP "\nHuman:"
50
  EOL
51
 
52
- # Create the model in Ollama
53
- ollama create indo_math_teacher -f Modelfile.temp
54
 
55
  echo "Indo Math Teacher installed successfully!"
56
  echo "Run with: ollama run indo_math_teacher"
 
8
  exit 1
9
  fi
10
 
11
+ # Create directory for model files
12
+ mkdir -p model_files
 
13
 
14
+ # Download model files
15
  echo "Downloading model files..."
16
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/added_tokens.json -o model_files/added_tokens.json
17
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/config.json -o model_files/config.json
18
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/merges.txt -o model_files/merges.txt
19
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/model.safetensors -o model_files/model.safetensors
20
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/special_tokens_map.json -o model_files/special_tokens_map.json
21
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/tokenizer.json -o model_files/tokenizer.json
22
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/tokenizer_config.json -o model_files/tokenizer_config.json
23
+ curl -L https://huggingface.co/Lckoo1230/indo-math-teacher-complete/resolve/main/vocab.json -o model_files/vocab.json
 
 
 
 
 
 
 
 
 
 
24
 
25
  # Create Modelfile
26
+ cat > Modelfile_Indo_Math_Teacher << EOL
27
+ FROM Qwen/Qwen2.5-Math-1.5B
28
  SYSTEM "You are a math teacher using the Gasing method"
29
 
30
  PARAMETER temperature 0.1
31
  PARAMETER top_p 0.9
32
  PARAMETER num_predict 200
33
 
34
+ TEMPLATE "{{.System}}\n\n{{.Prompt}}"
 
35
  STOP "[/INST]"
36
  STOP ">>> "
37
  STOP "\n\nHuman:"
38
  STOP "\nHuman:"
39
  EOL
40
 
41
+ # Create the Ollama model
42
+ ollama create indo_math_teacher -f Modelfile_Indo_Math_Teacher
43
 
44
  echo "Indo Math Teacher installed successfully!"
45
  echo "Run with: ollama run indo_math_teacher"