#!/usr/bin/env bash # Ternary-Bonsai-2-9B lokal ausprobieren – macOS # Automatisch erzeugt von Tokenstrom (tokenstrom.de). # Aufruf: bash try_mac.sh set -e cd "$(dirname "$0")" echo "== Ternary-Bonsai-2-9B ==" echo "== Python / Hugging Face ==" python3 -m venv .venv-ternary-bonsai-2-9b source .venv-ternary-bonsai-2-9b/bin/activate pip install -q -U pip pip install -q -U torch huggingface_hub python3 demo.py if true; then echo "== Ollama ==" if ! command -v ollama >/dev/null 2>&1; then if command -v brew >/dev/null 2>&1; then brew install ollama; else echo "Bitte zuerst die Ollama-App installieren: https://ollama.com/download/mac"; exit 1; fi fi curl -s http://localhost:11434/api/tags >/dev/null 2>&1 || (ollama serve >/dev/null 2>&1 &) sleep 3 MODEL="${MODEL:-}" MODEL="${MODEL:-hf.co/prism-ml/Ternary-Bonsai-2-9B-gguf}" echo "Lade $MODEL herunter (beim ersten Mal dauert das je nach Größe einige Minuten) ..." ollama pull "$MODEL" echo "" echo "Fertig! Tippe jetzt deine Frage ein und drücke Enter. Beenden mit /bye" exec ollama run "$MODEL" fi