Skip to content

Instantly share code, notes, and snippets.

@smiled0g
Last active June 21, 2023 00:45
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smiled0g/8c7309d9c98e3cb02121f05855d54b9c to your computer and use it in GitHub Desktop.
Save smiled0g/8c7309d9c98e3cb02121f05855d54b9c to your computer and use it in GitHub Desktop.
Easy way to run local LLM for your M-series Macbooks
#!/usr/bin/env bash
# Install Git Large File Storage (LFS)
brew install git-lfs
git lfs install
# Download & Install Llama
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
LLAMA_METAL=1 make -j # build with Metal support for (M-series) Apple Silicon
## Download Models
cd models
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/TheBloke/guanaco-7B-GGML
cd guanaco-7B-GGML
git lfs pull --include "guanaco-7B.ggmlv3.q4_0.bin"
cd ../..
## Run Llama
./main -m ./models/guanaco-7B-GGML/guanaco-7B.ggmlv3.q4_0.bin -p "Python code for adding 2 numbers is" --ignore-eos -n 256 -ngl 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment