#!/usr/bin/env bash # Kimi K3.1 Pro lokal ausprobieren – Linux # Automatisch erzeugt von Tokenstrom (tokenstrom.de). # Aufruf: bash try_linux.sh set -e cd "$(dirname "$0")" echo "== Kimi K3.1 Pro ==" 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ß (2800 Mrd. Parameter, MoE): komplett auf der Grafikkarte braucht es viel VRAM, mit MoE-Offloading reicht eine normale Grafikkarte plus viel Arbeitsspeicher (siehe Tabelle). Colab Free reicht nicht." echo "== Python / Hugging Face ==" python3 -m venv .venv-kimi-k3-1-pro source .venv-kimi-k3-1-pro/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 pillow scipy else pip install -q -U torch --index-url https://download.pytorch.org/whl/cpu pip install -q -U transformers accelerate pillow scipy fi echo 'Gated-Modell: falls der Download scheitert, vorher hf auth login ausführen.' python3 demo.py