Run the powerful open-source Mistral 7B Instruct language model completely offline on your MacBook Pro using Metal GPU acceleration.
No APIs. No token limits. No cost. Just raw, local intelligence 💻⚡
- 🐍 Python interface using
llama-cpp-python
- ⚡ Optimized for Apple Silicon (M1, M2, M3, M4)
- 🧠 Run quantized Mistral 7B (4-bit) models locally
- 📝 Easily modify prompts, automate tasks, and build cool stuff
- macOS with Apple Silicon (M1 or newer)
- Python 3.10+
- Metal GPU support (comes with macOS)
- llama-cpp-python
mkdir -p ~/Documents/python-projects/mistral-demo
cd ~/Documents/python-projects/mistral-demo
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
mkdir -p ~/mistral-model
cd ~/mistral-model
curl -L -o mistral-7b.Q4_K_M.gguf \
https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.1-GGUF/resolve/main/mistral-7b-instruct-v0.1.Q4_K_M.gguf
pip install google-cloud-translate
python3 google_translate.py
caffeinate -di python your_script.py