Skip to content

Instantly share code, notes, and snippets.

@namnd
Forked from adrienbrault/llama2-mac-gpu.sh
Created July 19, 2023 04:57
Show Gist options
  • Save namnd/8c1f6637f85af300679acb51353ac26a to your computer and use it in GitHub Desktop.
Save namnd/8c1f6637f85af300679acb51353ac26a to your computer and use it in GitHub Desktop.
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}"
# Run
echo "Prompt: " \
&& read PROMPT \
&& ./main \
-t 8 \
-ngl 1 \
-m ${MODEL} \
--color \
-c 2048 \
--temp 0.7 \
--repeat_penalty 1.1 \
-n -1 \
-p "### Instruction: ${PROMPT} \n### Response:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment