Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BenjaminWegener/94c3a293994b3050cff880c4f802fd62 to your computer and use it in GitHub Desktop.
Save BenjaminWegener/94c3a293994b3050cff880c4f802fd62 to your computer and use it in GitHub Desktop.
install alpaca (chatGPT) on android
#install termux from f-droid
#copy commands or just use the command:
# pkg install curl -y && curl -s https://gist.githubusercontent.com/BenjaminWegener/94c3a293994b3050cff880c4f802fd62/raw/92b1c7056764af7e8548f66b4412c0615da46175/gistfile1.txt | bash
termux-setup-storage
pkg update -y
pkg upgrade -y
pkg install wget build-essential cmake git -y
git clone https://github.com/antimatter15/alpaca.cpp
cd alpaca.cpp
#fix for llvm
sed -i 's/-mfp16-format=ieee//g' Makefile
#fix for snapdragon
sed -i 's/native/generic/g' Makefile
make chat
wget https://huggingface.co/Sosaka/Alpaca-native-4bit-ggml/resolve/main/ggml-alpaca-7b-q4.bin
./chat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment