#!/usr/bin/env bash # Hydrogen-1.0 lokal ausprobieren – Linux # Automatisch erzeugt von Tokenstrom (tokenstrom.com). # Aufruf: bash try_linux.sh set -e cd "$(dirname "$0")" echo "== Hydrogen-1.0 ==" if command -v nvidia-smi >/dev/null 2>&1; then nvidia-smi --query-gpu=name,memory.total --format=csv,noheader; else echo "No NVIDIA GPU found – running on CPU (slow)"; fi echo "WARNUNG: Groß (753,3 B parameters, MoE): running entirely on the GPU takes a lot of VRAM (video memory). With MoE offloading, a regular graphics card plus plenty of RAM is enough (see table). Colab Free isn't enough." echo "== Python / Hugging Face ==" python3 -m venv .venv-hydrogen-1-0 source .venv-hydrogen-1-0/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 echo 'Gated model: if the download fails, run hf auth login first.' python3 demo.py