Views
No views yet
1# Prerequisites
2apt update -y
3apt install -y git git-lfs python3 python3-pip curl pkg-config libssl-dev
4python3 -m pip install numpy==1.25.0 sentencepiece==0.1.99
5curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && source "$HOME/.cargo/env"
6
7# Clone repositories
8git clone https://huggingface.co/OpenBuddy/openbuddy-openllama-7b-v5-fp16 # Commit hash 1fedac68b34952eecec849a5938b778d6004d632
9git clone https://github.com/ggerganov/llama.cpp # Commit hash 16b9cd193965769089881bb8ec012fccca7b37b6
10git clone --recurse-submodules https://github.com/rustformers/llm.git # Commit hash 3becd728c0d6eeb2d649f86158c7018d5aaaba40
11
12# Build ggml model
13cd llama.cpp/
14python3 convert.py ../openbuddy-openllama-7b-v5-fp16/
15cd ../llm/
16cargo build --release
17cargo run --release llama quantize ../openbuddy-openllama-7b-v5-fp16/ggml-model-f16.bin ../openbuddy-openllama-7b-v5-fp16/openbuddy-openllama-7b-v5-q4_0.bin q4_0