iandennismiller commited on
Commit
0c7ad1d
1 Parent(s): 10aeac7
Files changed (2) hide show
  1. bin/llama-hf-to-q6_k.sh +6 -6
  2. install.sh +7 -1
bin/llama-hf-to-q6_k.sh CHANGED
@@ -5,10 +5,10 @@ if [ $# -ne 1 ]; then
5
  exit 1
6
  fi
7
 
8
- # if $HOME/.config/llama-hf-to-q6_k.conf does not exist, create it
9
- if [ ! -f $HOME/.config/llama/llama-hf-to-q6_k.conf ]; then
10
- mkdir -p $HOME/.config/llama
11
- cat <<EOF > $HOME/.config/llama/llama-hf-to-q6_k.conf
12
  MODELS_ROOT=$HOME/.ai/models/llama/
13
  HF_DOWNLOADER=$HOME/.ai/bin/hfdownloader
14
  STORAGE_PATH=$HOME/scratch/hfdownloader
@@ -18,7 +18,7 @@ CONVERT_PY=$HOME/Work/llama.cpp/convert.py
18
  EOF
19
  fi
20
 
21
- source $HOME/.config/llama-hf-to-q6_k.conf
22
 
23
  HF_NAME=$1
24
  ACCOUNT_NAME=$(echo "$HF_NAME" | cut -d '/' -f 1)
@@ -53,7 +53,7 @@ EOF
53
  ls -alFh "$HF_TORCH_MODEL"
54
 
55
  $PYTHON3_EXEC \
56
- $CONVERT_PY \
57
  --outtype f16 \
58
  --outfile "$MODEL_F16" \
59
  "$HF_TORCH_MODEL"
 
5
  exit 1
6
  fi
7
 
8
+ # if $HOME/.config/llama/llama-hf-to-q6_k.conf does not exist, create it
9
+ if [ ! -f "$HOME/.config/llama/llama-hf-to-q6_k.conf" ]; then
10
+ mkdir -p "$HOME/.config/llama"
11
+ cat <<EOF > "$HOME/.config/llama/llama-hf-to-q6_k.conf"
12
  MODELS_ROOT=$HOME/.ai/models/llama/
13
  HF_DOWNLOADER=$HOME/.ai/bin/hfdownloader
14
  STORAGE_PATH=$HOME/scratch/hfdownloader
 
18
  EOF
19
  fi
20
 
21
+ source $HOME/.config/llama/llama-hf-to-q6_k.conf
22
 
23
  HF_NAME=$1
24
  ACCOUNT_NAME=$(echo "$HF_NAME" | cut -d '/' -f 1)
 
53
  ls -alFh "$HF_TORCH_MODEL"
54
 
55
  $PYTHON3_EXEC \
56
+ "$CONVERT_PY" \
57
  --outtype f16 \
58
  --outfile "$MODEL_F16" \
59
  "$HF_TORCH_MODEL"
install.sh CHANGED
@@ -1,3 +1,9 @@
1
  #!/bin/bash
2
 
3
- install -d ./bin/llama-hf-to-q6_k.sh ~/.local/bin
 
 
 
 
 
 
 
1
  #!/bin/bash
2
 
3
+ echo "installing"
4
+
5
+ mkdir -p ~/.local/bin
6
+
7
+ install -C -v ./bin/llama-hf-to-q6_k.sh ~/.local/bin
8
+
9
+ echo "done"