# requirements.txt — PX Cognitive Architecture Explorer # # HF Space neuralworm/px-explorer-v4 (cpu-basic-Hardware, GPU-Runtime # für später geplant). Pre-requirements.txt-Stand crashte mit: # ModuleNotFoundError: No module named 'torch' # in model_manager.py:8. # # Pinning-Strategie: # - torch~=2.12.0 (compatible-release, Patch-Versionen erlaubt). # Standard-PyPI-Build ohne Suffix — pip installiert automatisch # die CUDA-Libs mit (User-Wahl 2026-07-08). Spart 2.4 GB cu130-wheel- # Download + OOM auf HF free-tier 16 GB build-RAM. # - transformers~=5.13.0: erforderlich für unsere 5.13.0-API-Refactor- # Commits (pe_dict[layer_type], position_embeddings= positional, # inputs_embeds plural). Minor eingefroren. # - alles andere: ~= für Sicherheitspatches. # # GPU-PLAN: User will CUDA-fähiges torch installiert haben. Standard-torch # bringt CUDA-Libs mit, läuft auf cpu-basic ohne Crash (torch.cuda.is_ # available() == False, models laden auf CPU). Bei späterem Switch auf # gpu-runtime wird torch automatisch CUDA nutzen. # ── ML-Stack ────────────────────────────────────────────────────────── torch~=2.12.0 # Plan 2026-07-09: torchvision erforderlich für gemma4-e2b multimodal # (image_processing_gemma4.py:17 importiert torchvision.transforms.v2). # Ohne torchvision crashed der ModelManager-Load mit ModuleNotFoundError. # WICHTIG: torchvision 0.28.0 pinned torch==2.13.0 (Konflikt mit unserem # torch~=2.12.0). 0.27.0 pinned torch==2.12.0 → kompatibel. torchvision~=0.27.0 transformers~=5.13.0 accelerate~=1.12.0 bitsandbytes~=0.48.0 huggingface_hub~=1.22.0 tokenizers~=0.22.2 safetensors~=0.8.0 sentencepiece~=0.2.0 protobuf~=5.28.0 # ── Numerik / Visualisierung ────────────────────────────────────────── # numpy==2.0.0 EXAKT pinnen: pip 24+ löst numpy~=2.0.0 manchmal zu # numpy-2.0.2.tar.gz (sdist) auf → 18.9 MB Source + Build (Compiler, # Linker, numpy-Build-System) brauchen >10 GB RAM → OOM auf HF free # tier 16 GB. Mit ==2.0.0 findet pip garantiert die # numpy-2.0.0-cp313-cp313-manylinux_2_27_x86_64.whl (binary wheel, # kein Compile). User-Feedback 2026-07-08: "numpy install wird von # source gemacht... immer wheels verwenden. duh!". numpy==2.0.0 Pillow~=11.0.0 matplotlib~=3.10.0 requests~=2.32.0 # ── Server-Stack (HF-Image hat das, aber explizit pinnen für Repro) ── gradio~=6.15.2 fastapi~=0.136.0 uvicorn~=0.32.0 websockets~=13.0 spaces~=0.50.4 # spaces 0.43.0+ erforderlich — HF gradio-Docker-Image startet intern # gradio/utils.py:322 watchdog-thread mit `spaces>0.43.0` requirement. # 0.42.0 crasht mit RuntimeError "Spaces hot-reloading requires spaces>0.43.0". hf-transfer~=0.1.4