#!/usr/bin/env bash # Ornith-1.5-122B lokal ausprobieren – Linux # Automatisch erzeugt von Tokenstrom (tokenstrom.de). # Aufruf: bash try_linux.sh # Ollama (Standard) # MODE=hf bash try_linux.sh # Python/transformers set -e cd "$(dirname "$0")" echo "== Ornith-1.5-122B ==" if command -v nvidia-smi >/dev/null 2>&1; then nvidia-smi --query-gpu=name,memory.total --format=csv,noheader; else echo "Keine NVIDIA-GPU gefunden – läuft auf CPU (langsam)"; fi echo "WARNUNG: Groß (125.1 Mrd. Parameter): braucht auch quantisiert ~76.6 GB VRAM/RAM. Colab Free (T4, 15 GB) reicht nicht." if [ "${MODE:-ollama}" = "ollama" ]; then echo "== Ollama ==" if ! command -v ollama >/dev/null 2>&1; then curl -fsSL https://ollama.com/install.sh | sh fi curl -s http://localhost:11434/api/tags >/dev/null 2>&1 || (ollama serve >/dev/null 2>&1 &) sleep 3 ollama pull "hf.co/ornith-ai/Ornith-1.5-122B-GGUF" echo "Starte Chat – beenden mit /bye" exec ollama run "hf.co/ornith-ai/Ornith-1.5-122B-GGUF" fi echo "== Python / Hugging Face ==" python3 -m venv .venv-ornith-1-5-122b source .venv-ornith-1-5-122b/bin/activate pip install -q -U pip if command -v nvidia-smi >/dev/null 2>&1; then pip install -q -U torch --index-url https://download.pytorch.org/whl/cu124 pip install -q -U transformers accelerate bitsandbytes else pip install -q -U torch --index-url https://download.pytorch.org/whl/cpu pip install -q -U transformers accelerate fi python3 demo.py