-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid_run.sh
executable file
·39 lines (31 loc) · 966 Bytes
/
android_run.sh
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
35
36
37
38
#!/data/data/com.termux/files/usr/bin/bash
InstallKoboldcpp() {
echo "Installing Koboldcpp"
yes | pkg update
yes | pkg upgrade
dependencies=("clang" "wget" "git" "cmake")
for dep in "${dependencies[@]}"; do
pkg install -y "$dep"
done
pkg install -y python
git clone https://github.com/LostRuins/koboldcpp
cd "$HOME/koboldcpp"
make
wget https://huggingface.co/Sosaka/Alpaca-native-4bit-ggml/resolve/main/ggml-alpaca-7b-q4.bin
python koboldcpp.py ggml-alpaca-7b-q4.bin
}
DownloadModel() {
cd "$HOME/koboldcpp"
wget https://huggingface.co/Sosaka/Alpaca-native-4bit-ggml/resolve/main/ggml-alpaca-7b-q4.bin
python koboldcpp.py ggml-alpaca-7b-q4.bin
}
if [ -d "$HOME/koboldcpp" ]; then
if [ -f "$HOME/koboldcpp/ggml-alpaca-7b-q4.bin" ]; then
cd "$HOME/koboldcpp"
python koboldcpp.py ggml-alpaca-7b-q4.bin
else
DownloadModel
fi
else
InstallKoboldcpp
fi