diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85068b13..530fa3fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: echo "$RUNNER_TEMP/zig" >> "$GITHUB_PATH" - name: the installer's scripts and manifests parse, and its plan runs (INSTALL.md) run: | - for f in tools/install/*.sh deploy/jarvis/*.sh deploy/mac/*.sh tools/spark/install.sh tools/spark/prepare.sh; do bash -n "$f"; done + for f in tools/install/*.sh deploy/jarvis/*.sh deploy/mac/*.sh deploy/strix-halo/*.sh tools/gufo/*.sh tools/spark/install.sh tools/spark/prepare.sh; do bash -n "$f"; done for f in deploy/profiles/*.json tools/twin/packs/sources/*.json tools/twin/packs/built/*.json; do jq empty "$f"; done for p in deploy/profiles/*.json; do tools/install/bootstrap.sh --profile "$(basename "$p" .json)" --prefix "$RUNNER_TEMP/jarvis" --dry-run; done # the Mac service's config: every profile model has its tool entry, each booked and resident as the profile says @@ -32,6 +32,15 @@ jobs: run: bash tools/install/test_amd.sh - name: the openai_audio worker against a fake server (no GPU) run: python3 -I tools/speech/openai_audio/test_worker.py + - name: every lock file pins every artifact by sha256 (tools/install/check_hashes.py), and the pinned downloads verify + run: | + python3 -I tools/install/check_hashes.py + python3 -I tools/install/test_check_hashes.py + python3 -I tools/install/test_hf_pinned.py + - name: the Strix Halo unit passes the pinned Gufo image to its workers (no GPU, stub systemd-run and podman) + run: bash deploy/strix-halo/test_start.sh + - name: a hard kill of serve.sh's process group removes its Gufo container (stub podman; no GPU) + run: bash tools/gufo/test_serve.sh - run: zig build - run: zig build test timeout-minutes: 20 diff --git a/deploy/profiles/strix-halo-gfx1151.json b/deploy/profiles/strix-halo-gfx1151.json new file mode 100644 index 00000000..cefea30f --- /dev/null +++ b/deploy/profiles/strix-halo-gfx1151.json @@ -0,0 +1,310 @@ +{ + "profile": "strix-halo-gfx1151", + "status": "preview", + "description": "LocalRouter on one AMD Strix Halo box (Ryzen AI Max+ 395, Radeon 8060S gfx1151, unified memory with a 96 GiB GTT pool): Qwen3.8 Flash-Next chat through Gufo (ROCm, Q4 + MTP) or llama.cpp (Vulkan, Q3 + MTP) as openai_server tools, Qwen3-TTS and Qwen3-ASR through Gufo behind the generic openai_audio cmd worker, and Whisper large-v3-turbo on PyTorch ROCm. Model servers run in rootless Podman (tools/gufo/serve.sh); the daemon runs as a transient systemd user unit (deploy/strix-halo). The compiled-in CUDA engines (Qwen-Image, MiniMax H3, Kandinsky-6) and Drama 3 have no AMD build and are not part of this profile.", + "tested_on": "Ryzen AI Max+ 395 / Radeon 8060S (gfx1151), 128 GB LPDDR5X with amdgpu.gttsize=98304 (96 GiB GTT), kernel 7.2, ROCm 7.2.4, Podman 6.1 (runc), 2026-11-15: chat over /v1 on both chat tools, speech and transcription over /v1/audio, the voice loop over /v1/realtime (tools/spark/jarvis/voice_e2e.py --smoke)", + "hardware": { + "arch": "x86_64", + "gpu": "gfx1151", + "gfx": "gfx1151", + "unified_memory": true, + "min_memory_gib": 96, + "min_gtt_gib": 90, + "min_rocm": "7.2", + "min_free_gib": 96, + "os": "omarchy 4.5.0" + }, + "disk_margin_gib": 30, + "env": { + "LR_BIN": "$REPO/zig-out/bin/localrouter", + "STEPS": "bash $REPO/tools/install/steps.sh", + "UV_CACHE_DIR": "$J/uv-cache", + "FLASHNEXT_DIR": "${FLASHNEXT_DIR:-$J/models/Qwen3.8-Flash-Next-GGUF}", + "TTS_DIR": "${TTS_DIR:-$J/models/Qwen3-TTS-12Hz-1.7B-CustomVoice}", + "ASR_DIR": "${ASR_DIR:-$J/models/Qwen3-ASR-1.7B}", + "LLAMA_BIN": "${LLAMA_BIN:-$J/llama.cpp/bin}", + "GUFO_IMAGE": "${GUFO_IMAGE:-$(cat $REPO/tools/gufo/IMAGE)}", + "PINS": "$REPO/deploy/strix-halo/pins", + "HF_PINNED": "python3 -I $REPO/tools/install/hf_pinned.py", + "HF": "$J/bin/uvx --from huggingface_hub==2.4.0 hf" + }, + "prereqs": [ + { + "id": "commands", + "title": "jq, curl, git, tar, xz, sha256sum, python3, podman, systemd-run", + "test": "for t in jq curl git tar xz sha256sum python3 podman systemctl systemd-run; do command -v $t > /dev/null || exit 1; done", + "fix": "install them with the distribution's package manager (Arch/Omarchy: sudo pacman -S jq curl git tar xz python podman)" + }, + { + "id": "python", + "title": "/usr/bin/python3 3.11 or newer (the openai_audio worker and the scripts)", + "test": "/usr/bin/python3 -I -c 'import sys; sys.exit(sys.version_info < (3, 11))'", + "fix": "install python 3.11 or newer" + }, + { + "id": "amdgpu", + "title": "an AMD GPU on amdgpu with ROCm (rocminfo lists a gfx1151 agent)", + "test": "rocminfo 2> /dev/null | grep -q gfx1151", + "fix": "install ROCm 7.2 or newer (rocminfo, the HIP runtime); add yourself to the video and render groups and log in again" + }, + { + "id": "gpu-devices", + "title": "/dev/kfd and /dev/dri/renderD* usable by this user", + "test": "[ -r /dev/kfd ] && [ -w /dev/kfd ] && ls /dev/dri/renderD* > /dev/null 2>&1", + "fix": "sudo usermod -aG video,render $(id -un), then log in again" + }, + { + "id": "gtt", + "title": "a GTT pool of 90 GiB or more (amdgpu.gttsize / ttm.pages_limit on the kernel command line)", + "test": "source $REPO/tools/install/lib.sh && [ $(hw_gtt) -ge $((90 * 1073741824)) ]", + "fix": "a host setting this installer never changes: see the Gufo host configuration guide (amdgpu.gttsize=98304 ttm.pages_limit=25165824) and reboot" + }, + { + "id": "podman-rootless", + "title": "rootless Podman that can run a container", + "test": "podman info --format '{{.Host.Security.Rootless}}' 2> /dev/null | grep -qx true", + "fix": "install podman (and crun or runc); check: podman run --rm docker.io/library/alpine true" + }, + { + "id": "systemd-user", + "title": "a systemd user session (the daemon runs as a transient user unit)", + "test": "systemctl --user show-environment > /dev/null", + "fix": "log in through ssh or a desktop session (not su)" + }, + { + "id": "network", + "title": "HTTPS to huggingface.co, github.com, ghcr.io and ziglang.org", + "test": "for u in https://huggingface.co https://github.com https://ziglang.org; do curl -fsS -m 15 -o /dev/null -I $u || exit 1; done; curl -sS -m 15 -o /dev/null https://ghcr.io/v2/", + "fix": "open outbound HTTPS to those hosts (and download.pytorch.org, pypi.org)" + } + ], + "host": { + "download_bytes": 73986483, + "disk_bytes": 450000000, + "tools": { + "zig": { + "url": "https://ziglang.org/download/0.17.0/zig-x86_64-linux-0.17.0.tar.xz", + "sha256": "1cbe9df9f27e6b78d14ccbca43b6703a404ef79ef1c463de901d7f088d4e2026", + "bytes": 57332648, + "bin": [ + "zig" + ], + "version": "0.17.0", + "version_cmd": "$J/bin/zig version" + }, + "uv": { + "url": "https://github.com/astral-sh/uv/releases/download/0.13.4/uv-x86_64-unknown-linux-gnu.tar.gz", + "sha256": "2b428396f12572d4429cf210ca234dd599a33b3af0958a4d5ed569d63e3f344f", + "bytes": 16653835, + "bin": [ + "uv-x86_64-unknown-linux-gnu/uv", + "uv-x86_64-unknown-linux-gnu/uvx" + ], + "version": "uv 0.13.4", + "version_cmd": "$J/bin/uv --version" + } + }, + "steps": [ + { + "id": "zig", + "download_bytes": 57332648, + "disk_bytes": 330000000, + "title": "Zig 0.17.0 (x86_64 Linux, builds LocalRouter)", + "run": "$STEPS tool zig", + "done": "$STEPS tool-ok zig", + "fix": "a failed download or checksum: run again (it resumes)" + }, + { + "id": "uv", + "download_bytes": 16653835, + "disk_bytes": 50000000, + "title": "uv 0.13.4 (the Whisper ROCm venv, hf downloads)", + "run": "$STEPS tool uv", + "done": "$STEPS tool-ok uv", + "fix": "a failed download or checksum: run again (it resumes)" + }, + { + "id": "build", + "download_bytes": 0, + "disk_bytes": 300000000, + "title": "LocalRouter itself, from this checkout (zig build without -Dnvcc: the CUDA engines are compiled with empty kernel images and are not configured)", + "run": "cd $REPO && $J/bin/zig build -Doptimize=ReleaseSafe", + "done": "[ -x \"$LR_BIN\" ]", + "fix": "the build output says why; check zig version (0.17.0)" + }, + { + "id": "gufo-image", + "download_bytes": 3490000000, + "disk_bytes": 3490000000, + "title": "the Gufo runtime image (ghcr.io/gufo-org/toolboxes/gufo-runtime 0.34.0, MIT; ROCm 10.1 inside), pinned by digest in tools/gufo/IMAGE", + "run": "case $GUFO_IMAGE in *@sha256:*) ;; *) echo \"GUFO_IMAGE $GUFO_IMAGE is not pinned by digest\" >&2; exit 1 ;; esac; podman pull $GUFO_IMAGE && [ \"$(podman image inspect --format '{{.Digest}}' $GUFO_IMAGE)\" = \"${GUFO_IMAGE##*@}\" ]", + "done": "podman image exists $GUFO_IMAGE && [ \"$(podman image inspect --format '{{.Digest}}' $GUFO_IMAGE)\" = \"${GUFO_IMAGE##*@}\" ]", + "fix": "network to ghcr.io: run again; a digest mismatch means the registry served other bytes than the pin (podman refuses those too)" + }, + { + "id": "gufo-diagnose", + "gpu": true, + "min_free_gib": 8, + "download_bytes": 0, + "disk_bytes": 0, + "title": "gufo diagnose in the pinned image: the host's GPU devices, groups and GTT as Gufo sees them", + "run": "podman run --rm --device /dev/kfd --device /dev/dri --group-add video --group-add render $GUFO_IMAGE gufo diagnose && mkdir -p $J/install/state && echo $GUFO_IMAGE > $J/install/state/gufo-diagnose", + "done": "[ \"$(cat $J/install/state/gufo-diagnose 2> /dev/null)\" = \"$GUFO_IMAGE\" ]", + "fix": "gufo diagnose says what the host lacks (the gpu-devices and gtt prerequisites above)" + } + ] + }, + "models": [ + { + "key": "chat", + "id": "qwen3.8-flash-next", + "warm": false, + "title": "Qwen3.8 Flash-Next, Gufo (ROCm) UD-Q4_K_XL with the shared MTP head; 88 GiB GTT at 32k context", + "licence": { + "name": "Apache-2.0", + "url": "https://huggingface.co/Qwen/Qwen3.8-Flash-Next" + }, + "download_bytes": 115028765978, + "disk_bytes": 115100000000, + "memory_bytes": 94489280512, + "steps": [ + { + "id": "weights", + "download_bytes": 115028765978, + "disk_bytes": 115100000000, + "title": "unsloth/Qwen3.8-Flash-Next-GGUF at f5d175de: UD-Q4_K_XL (4 shards), MTP/mtp-...-shared-Q8_0.gguf, mmproj-BF16.gguf; every file by sha256 (deploy/strix-halo/pins/flash-next-q4.json)", + "run": "$HF_PINNED download $PINS/flash-next-q4.json $FLASHNEXT_DIR --hf '$HF' && $STEPS stamp flash-next-q4 $PINS/flash-next-q4.json", + "done": "$STEPS stamped flash-next-q4 $PINS/flash-next-q4.json && $HF_PINNED verify $PINS/flash-next-q4.json $FLASHNEXT_DIR --sizes", + "fix": "network to huggingface.co: run again (hf resumes); a file that differs from its pin is named in the log" + } + ], + "pins": "deploy/strix-halo/pins/flash-next-q4.json" + }, + { + "key": "chat-q3", + "id": "qwen3.8-flash-next-q3", + "warm": false, + "title": "Qwen3.8 Flash-Next, llama.cpp (Vulkan, Unsloth fork b12347) UD-Q3_K_XL with the shared MTP head; 62 GiB GTT, the voice loop's chat model", + "licence": { + "name": "Apache-2.0", + "url": "https://huggingface.co/Qwen/Qwen3.8-Flash-Next" + }, + "download_bytes": 89497018544, + "disk_bytes": 89600000000, + "memory_bytes": 66571993088, + "steps": [ + { + "id": "llama-cpp", + "download_bytes": 32070038, + "disk_bytes": 120000000, + "title": "llama.cpp b12347-mix-241a0f3 (unslothai fork, Vulkan x64: loads the qwen4exp architecture and the shared MTP head)", + "run": "$STEPS file https://github.com/unslothai/llama.cpp/releases/download/b12347-mix-241a0f3/app-b12347-mix-241a0f3-linux-x64-vulkan.tar.gz 3eb345b7abd8cab58e6915543e5cb30686c0726c3f082f2787ec19b1a1592615 $J/dl/llama-us-vk.tgz && mkdir -p $LLAMA_BIN && tar -xzf $J/dl/llama-us-vk.tgz -C $LLAMA_BIN", + "done": "[ -x $LLAMA_BIN/llama-server ]", + "fix": "network to github.com: run again" + }, + { + "id": "weights", + "download_bytes": 89464948506, + "disk_bytes": 89500000000, + "title": "unsloth/Qwen3.8-Flash-Next-GGUF at f5d175de: UD-Q3_K_XL (4 shards) and the shared MTP head; every file by sha256 (deploy/strix-halo/pins/flash-next-q3.json)", + "run": "$HF_PINNED download $PINS/flash-next-q3.json $FLASHNEXT_DIR --hf '$HF' && $STEPS stamp flash-next-q3 $PINS/flash-next-q3.json", + "done": "$STEPS stamped flash-next-q3 $PINS/flash-next-q3.json && $HF_PINNED verify $PINS/flash-next-q3.json $FLASHNEXT_DIR --sizes", + "fix": "network to huggingface.co: run again (hf resumes); a file that differs from its pin is named in the log" + } + ], + "pins": "deploy/strix-halo/pins/flash-next-q3.json" + }, + { + "key": "tts", + "id": "qwen3-tts-customvoice", + "warm": true, + "title": "Qwen3-TTS 12Hz 1.7B CustomVoice through Gufo and tools/speech/openai_audio (9 voices, 24 kHz, streamed; 6.5 GiB)", + "licence": { + "name": "Apache-2.0", + "url": "https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice" + }, + "download_bytes": 4544233100, + "disk_bytes": 4600000000, + "memory_bytes": 6979321856, + "steps": [ + { + "id": "weights", + "download_bytes": 4544233100, + "disk_bytes": 4600000000, + "title": "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice at 0c0e3051, every file by sha256 (deploy/strix-halo/pins/qwen3-tts-customvoice.json)", + "run": "$HF_PINNED download $PINS/qwen3-tts-customvoice.json $TTS_DIR --hf '$HF' && $STEPS stamp qwen3-tts-customvoice $PINS/qwen3-tts-customvoice.json", + "done": "$STEPS stamped qwen3-tts-customvoice $PINS/qwen3-tts-customvoice.json && $HF_PINNED verify $PINS/qwen3-tts-customvoice.json $TTS_DIR --sizes", + "fix": "network to huggingface.co: run again (hf resumes); a file that differs from its pin is named in the log" + } + ], + "pins": "deploy/strix-halo/pins/qwen3-tts-customvoice.json" + }, + { + "key": "stt", + "id": "qwen3-asr", + "warm": true, + "title": "Qwen3-ASR 1.7B through Gufo and tools/speech/openai_audio (5.5 GiB)", + "licence": { + "name": "Apache-2.0", + "url": "https://huggingface.co/Qwen/Qwen3-ASR-1.7B" + }, + "download_bytes": 4703117477, + "disk_bytes": 4750000000, + "memory_bytes": 5905580032, + "steps": [ + { + "id": "weights", + "download_bytes": 4703117477, + "disk_bytes": 4750000000, + "title": "Qwen/Qwen3-ASR-1.7B at 7278e1e7, every file by sha256 (deploy/strix-halo/pins/qwen3-asr.json)", + "run": "$HF_PINNED download $PINS/qwen3-asr.json $ASR_DIR --hf '$HF' && $STEPS stamp qwen3-asr $PINS/qwen3-asr.json", + "done": "$STEPS stamped qwen3-asr $PINS/qwen3-asr.json && $HF_PINNED verify $PINS/qwen3-asr.json $ASR_DIR --sizes", + "fix": "network to huggingface.co: run again (hf resumes); a file that differs from its pin is named in the log" + } + ], + "pins": "deploy/strix-halo/pins/qwen3-asr.json" + }, + { + "key": "whisper", + "id": "whisper-large-v3-turbo", + "warm": false, + "title": "Whisper large-v3-turbo on PyTorch ROCm 7.2 (tools/speech/whisper/rocm/uv.lock; FP16; 2.5 GiB)", + "licence": { + "name": "MIT", + "url": "https://huggingface.co/openai/whisper-large-v3-turbo" + }, + "pins": "tools/speech/whisper/rocm/uv.lock", + "download_bytes": 6120000000, + "disk_bytes": 12000000000, + "memory_bytes": 3221225472, + "steps": [ + { + "id": "venv", + "download_bytes": 4500000000, + "disk_bytes": 10000000000, + "title": "the Whisper venv from tools/speech/whisper/rocm/uv.lock (Python 3.12, torch 2.13.0+rocm7.2, transformers 5.19.0; every wheel by its locked hash)", + "run": "UV_PROJECT_ENVIRONMENT=$J/venvs/whisper-rocm $J/bin/uv sync --locked --python 3.12 --project $REPO/tools/speech/whisper/rocm && $STEPS stamp whisper-rocm-venv $REPO/tools/speech/whisper/rocm/uv.lock", + "done": "[ -x $J/venvs/whisper-rocm/bin/python ] && $STEPS stamped whisper-rocm-venv $REPO/tools/speech/whisper/rocm/uv.lock", + "fix": "network (download.pytorch.org, pypi.org): run again" + }, + { + "id": "model", + "download_bytes": 1620000000, + "disk_bytes": 1620000000, + "title": "openai/whisper-large-v3-turbo at its pinned revision, every file by sha256", + "run": "python3 -I $REPO/tools/speech/whisper/fetch_model.py --root $J/models/whisper", + "done": "python3 -I $REPO/tools/speech/whisper/fetch_model.py --verify $J/models/whisper/whisper-large-v3-turbo/41f01f3fe87f28c78e2fbf8b568835947dd65ed9 > /dev/null", + "fix": "network: run again" + } + ] + } + ], + "deploy": { + "service": "systemd-transient", + "install": "deploy/strix-halo/render.sh", + "start": "deploy/strix-halo/start.sh", + "stop": "deploy/strix-halo/stop.sh", + "status": "deploy/strix-halo/status.sh", + "smoke": "python3 -I tools/spark/jarvis/voice_e2e.py --smoke --skip-barge --leak-probe 0 --url http://127.0.0.1:$PORT --out $J/smoke --tts qwen3-tts-customvoice --stt qwen3-asr --chat qwen3.8-flash-next-q3" + } +} diff --git a/deploy/strix-halo/README.md b/deploy/strix-halo/README.md new file mode 100644 index 00000000..6112c68f --- /dev/null +++ b/deploy/strix-halo/README.md @@ -0,0 +1,47 @@ +# deploy/strix-halo: LocalRouter on an AMD Strix Halo box + +Profile: `deploy/profiles/strix-halo-gfx1151.json` (status: preview). One box with a Ryzen AI Max+ 395 / Radeon 8060S +(gfx1151): unified LPDDR5X memory of which the GPU may map the GTT pool (96 GiB with `amdgpu.gttsize=98304`). The +installer never changes kernel parameters, firmware or the bootloader; the GTT size is a prerequisite it only checks. + +| Tool | Kind | Runs as | GTT | +| --- | --- | --- | --- | +| `qwen3.8-flash-next` | chat (default) | `openai_server` → `tools/gufo/serve.sh` → Gufo `serve llm` (UD-Q4_K_XL + MTP) on :8081 | 88 GiB | +| `qwen3.8-flash-next-q3` | chat (the voice loop's) | `openai_server` → llama.cpp `llama-server` (Vulkan, UD-Q3_K_XL + MTP) on :8080 | 62 GiB | +| `qwen3-tts-customvoice` | speech | `tools/speech/openai_audio` → Gufo `serve tts` on :8091 | 6.5 GiB | +| `qwen3-asr` | transcription (default) | `tools/speech/openai_audio` → Gufo `serve asr` on :8092 | 5.5 GiB | +| `whisper-large-v3-turbo` | transcription | `tools/speech/whisper/worker.py` in the ROCm venv | 2.5 GiB | + +`budget_bytes` is the GTT pool less 2 GiB (`render.sh`, from `tools/install/lib.sh hw_gtt`): a GPU allocation past GTT +fails even when MemAvailable has room, so the scheduler must plan against GTT. Q3 + TTS + ASR fit together (the voice +loop); Q4 + TTS + ASR do not, so a `/v1` chat on the Q4 model unloads the speech models and the voice loop swaps back. + +```sh +zig build -Doptimize=ReleaseSafe # no -Dnvcc: the CUDA engines build with empty kernel images +deploy/strix-halo/start.sh # render config.json, start the transient user unit, wait for /health +deploy/strix-halo/status.sh # unit, health, each tool's state, containers, GTT +deploy/strix-halo/stop.sh # stop the daemon (its workers stop their servers), then leftovers +SITE=path/to/site.env deploy/strix-halo/start.sh # with a site file (paths, voice, which model does what) +``` + +Every download is pinned: the Gufo runtime by digest (`tools/gufo/IMAGE`; `start.sh` passes it into the unit, so the +workers run the image bootstrap pulled), the Hugging Face weights by commit with every file's size and sha256 +(`pins/*.json`, fetched and checked by `tools/install/hf_pinned.py`), the Whisper venv by `uv.lock` hashes, llama.cpp +and the host tools by sha256. `gufo diagnose` is a GPU step of its own (`--no-gpu` skips it). + +`env.sh` holds every default (prefix `$J`, ports, model directories, measured memory); a site file sourced after it +overrides any of them. `tools/install/doctor.sh --profile strix-halo-gfx1151 --unit localrouter-amd` checks the box +(GPU, ROCm, GTT, Podman, the steps, the service); export the site file's variables first when it moves model paths. + +## Measured (2026-11-15, Radeon 8060S, ROCm 7.2.4, kernel 7.2, Podman 6.1 with runc) + +- `/v1/chat/completions` on `qwen3.8-flash-next` (cold load 17.5 s): 56 tokens in 1.69 s; streamed answers. +- `/v1/audio/speech` (`stream`: pcm, chunked): first audio 226 ms, about 2.4x real time; `wav` 4.75 s cold. +- `/v1/audio/transcriptions`: Qwen3-ASR 2.4 s cold, 0.58 s warm for a 5.9 s clip; Whisper ROCm 9.8 s cold, 0.52 s warm. +- Voice loop over `/v1/realtime` (`tools/spark/jarvis/voice_e2e.py --smoke --skip-barge`, chat on the Q3 tool): + PASSED; first audio after the end of speech 1217 ms and 1376 ms on warm turns (25 s on the first, a cold chat load), + a 42.6 s spoken reply with no underrun. + +Not here: the compiled-in engines (Qwen-Image, MiniMax H3, Kandinsky-6) are CUDA kernels, and Drama 3 has GB10 and Metal +builds only. Gufo serves Qwen-Image 2.1 and MiniMax H3 on gfx1151; wrapping them is the next step (a `cmd` image/video +worker, or ComfyUI behind one). diff --git a/deploy/strix-halo/config.json.in b/deploy/strix-halo/config.json.in new file mode 100644 index 00000000..4b4ea4af --- /dev/null +++ b/deploy/strix-halo/config.json.in @@ -0,0 +1,69 @@ +{ + "machine": "@MACHINE@", + "reserve_bytes": @RESERVE_BYTES@, + "budget_bytes": @BUDGET_BYTES@, + "local_files": ["@DEPLOY@/inbox"], + "defaults": {"chat_completion": "@CHAT_DEFAULT@", "text_to_speech": "qwen3-tts-customvoice", + "speech_to_text": "@STT_DEFAULT@"}, + "stt": {"language": "en"}, + "voice": { + "chat_model": "@VOICE_CHAT@", + "chat_extra": {"chat_template_kwargs": {"enable_thinking": false}, "top_p": 0.8}, + "temperature": 0.7, + "speech_models": ["qwen3-tts-customvoice"], + "voice": "@VOICE@", + "prime_chat": true, "greedy_transcripts": true, "partial_interval_ms": 0, "manage_models": true + }, + "tools": [ + {"id": "qwen3.8-flash-next", "kind": "chat", + "name": "Qwen3.8 Flash-Next (Gufo on ROCm, UD-Q4_K_XL + MTP head, rootless Podman)", + "engine": "openai_server", "weights": "@FLASHNEXT_DIR@", "resident_bytes": @FLASHNEXT_RESIDENT@, "working_bytes": 0, "keep_loaded": false, + "priority": 100, "idle_ttl_s": 900, "load_timeout_s": 600, "generate_timeout_s": 600, + "license": {"name": "Apache-2.0 (model); MIT (Gufo)", "url": "https://github.com/gufo-org/gufo", "commercial": true}, + "options": {"server": ["@SRC@/tools/gufo/serve.sh", "llm", "{port}", "-v", "{weights}:/m:ro", "--", + "gufo", "serve", "llm", "--model", "/m/UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf", + "--mmproj", "/m/mmproj-BF16.gguf", "--speculative", "mtp", + "--mtp-model", "/m/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf", + "--served-model-name", "{id}", "--context", "32768", "--sessions", "2", + "--cache-ram-bytes", "4294967296"], + "port": @GUFO_LLM_PORT@, "health": "/v1/models", "stop_timeout_s": 30, + "memory": "Strix Halo (Radeon 8060S, 96 GiB GTT): GTT peak 88.0 GiB serving at 32k context, 2 sessions, MTP"}}, + {"id": "qwen3.8-flash-next-q3", "kind": "chat", + "name": "Qwen3.8 Flash-Next (llama.cpp llama-server, Vulkan, UD-Q3_K_XL + MTP head)", + "engine": "openai_server", "weights": "@Q3_DIR@", "resident_bytes": @Q3_RESIDENT@, "working_bytes": 0, "keep_loaded": false, + "priority": 90, "idle_ttl_s": 900, "load_timeout_s": 600, "generate_timeout_s": 600, + "license": {"name": "Apache-2.0 (model); MIT (llama.cpp)", "url": "https://github.com/ggml-org/llama.cpp", "commercial": true}, + "options": {"server": ["@LLAMA_BIN@/llama-server", "-m", "{weights}/UD-Q3_K_XL/Qwen3.8-Flash-Next-UD-Q3_K_XL-00001-of-00004.gguf", + "-ngl", "999", "-fa", "on", "-c", "32768", "--jinja", "--host", "127.0.0.1", "--port", "{port}", + "--alias", "{id}", "--temp", "1.0", "--top-p", "0.95", "--top-k", "20", "--min-p", "0", + "-md", "{weights}/MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf", "-ngld", "999", + "--spec-type", "draft-mtp", "--spec-draft-n-max", "2"], + "env": {"LD_LIBRARY_PATH": "@LLAMA_BIN@"}, "port": @LLAMA_PORT@, "health": "/health", + "memory": "Strix Halo: GTT 61.4 GiB serving at 32k context with the MTP head"}}, + {"id": "qwen3-tts-customvoice", "kind": "speech", "capabilities": ["text_to_speech"], + "name": "Qwen3-TTS 12Hz 1.7B CustomVoice (Gufo on ROCm, 24 kHz, streamed)", + "cmd": ["@PYTHON@", "-I", "@SRC@/tools/speech/openai_audio/worker.py"], "weights": "@TTS_DIR@", + "resident_bytes": @TTS_RESIDENT@, "working_bytes": 0, "keep_loaded": true, "priority": 95, "lane": "realtime", + "idle_ttl_s": 3600, "load_timeout_s": 300, "generate_timeout_s": 600, + "license": {"name": "Apache-2.0", "url": "https://huggingface.co/Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", "commercial": true}, + "options": {"server": ["@SRC@/tools/gufo/serve.sh", "tts", "{port}", "-v", "{weights}:/m:ro", "--", + "gufo", "serve", "tts", "--model", "/m", "--served-model-name", "{id}"], + "port": @GUFO_TTS_PORT@, "health": "/v1/audio/voices", "sample_rate": 24000, "stream": true, + "voices": ["aiden", "dylan", "eric", "ono_anna", "ryan", "serena", "sohee", "uncle_fu", "vivian"], + "default_voice": "@VOICE@", "min_speed": 1, "max_speed": 1, "max_input_chars": 4096}}, + {"id": "qwen3-asr", "kind": "transcription", + "name": "Qwen3-ASR 1.7B (Gufo on ROCm)", + "cmd": ["@PYTHON@", "-I", "@SRC@/tools/speech/openai_audio/worker.py"], "weights": "@ASR_DIR@", + "resident_bytes": @ASR_RESIDENT@, "working_bytes": 0, "keep_loaded": true, "priority": 92, "lane": "realtime", + "idle_ttl_s": 3600, "load_timeout_s": 300, "generate_timeout_s": 600, + "license": {"name": "Apache-2.0", "url": "https://huggingface.co/Qwen/Qwen3-ASR-1.7B", "commercial": true}, + "options": {"server": ["@SRC@/tools/gufo/serve.sh", "asr", "{port}", "-v", "{weights}:/m:ro", "--", + "gufo", "serve", "asr", "--model", "/m", "--served-model-name", "{id}"], + "port": @GUFO_ASR_PORT@, "health": "/v1/models", "max_audio_s": 1800}}, + {"id": "whisper-large-v3-turbo", "kind": "transcription", "name": "Whisper large-v3-turbo (PyTorch ROCm, FP16)", + "cmd": ["@J@/venvs/whisper-rocm/bin/python", "@SRC@/tools/speech/whisper/worker.py"], "weights": "@WHISPER_DIR@", + "resident_bytes": 2684354560, "working_bytes": 536870912, "priority": 85, "idle_ttl_s": 600, + "license": {"name": "MIT", "url": "https://huggingface.co/openai/whisper-large-v3-turbo", "commercial": true}, + "options": {"device": "cuda", "dtype": "float16", "attn": "sdpa", "threads": 4, "vad": "off"}} + ] +} diff --git a/deploy/strix-halo/env.sh b/deploy/strix-halo/env.sh new file mode 100644 index 00000000..ec934000 --- /dev/null +++ b/deploy/strix-halo/env.sh @@ -0,0 +1,33 @@ +# Defaults for deploy/strix-halo (sourced by render.sh, start.sh, stop.sh, status.sh). Override any of them in a site +# file passed as SITE=path/to/site.env; a site file is sourced after this one. +J=${J:-$HOME/localrouter-amd} # the deployment prefix: venvs, models, deploy/{config.json,data,logs} +DEPLOY=${DEPLOY:-$J/deploy} +PORT=${PORT:-8190} # the daemon, on loopback +UNIT=${UNIT:-localrouter-amd} # the transient systemd user unit start.sh runs the daemon in +MACHINE=${MACHINE:-strix-halo} +LR_BIN=${LR_BIN:-$REPO/zig-out/bin/localrouter} +PYTHON=${PYTHON:-/usr/bin/python3} +# models (Hugging Face snapshots / GGUF directories) +FLASHNEXT_DIR=${FLASHNEXT_DIR:-$J/models/Qwen3.8-Flash-Next-GGUF} # UD-Q4_K_XL/, MTP/, mmproj-BF16.gguf (Gufo) +Q3_DIR=${Q3_DIR:-$FLASHNEXT_DIR} # UD-Q3_K_XL/, MTP/ (llama.cpp) +TTS_DIR=${TTS_DIR:-$J/models/Qwen3-TTS-12Hz-1.7B-CustomVoice} +ASR_DIR=${ASR_DIR:-$J/models/Qwen3-ASR-1.7B} +WHISPER_DIR=${WHISPER_DIR:-$J/models/whisper/whisper-large-v3-turbo/41f01f3fe87f28c78e2fbf8b568835947dd65ed9} +LLAMA_BIN=${LLAMA_BIN:-$J/llama.cpp/bin} # a llama.cpp build with llama-server +GUFO_IMAGE=${GUFO_IMAGE:-$(cat "$REPO/tools/gufo/IMAGE")} # the Gufo runtime, pinned by digest; start.sh passes it to the unit +# which model serves what +CHAT_DEFAULT=${CHAT_DEFAULT:-qwen3.8-flash-next} +VOICE_CHAT=${VOICE_CHAT:-qwen3.8-flash-next-q3} # Q3 + TTS + ASR fit the 96 GiB GTT together; Q4 + both do not +STT_DEFAULT=${STT_DEFAULT:-qwen3-asr} +VOICE=${VOICE:-serena} +# fixed loopback ports of the model servers +GUFO_LLM_PORT=${GUFO_LLM_PORT:-8081}; LLAMA_PORT=${LLAMA_PORT:-8080} +GUFO_TTS_PORT=${GUFO_TTS_PORT:-8091}; GUFO_ASR_PORT=${GUFO_ASR_PORT:-8092} +# memory: measured GTT peaks on a Radeon 8060S (gfx1151) with 96 GiB GTT; the budget is the GTT pool less a margin, +# because GPU allocations beyond GTT fail even when MemAvailable has room +FLASHNEXT_RESIDENT=${FLASHNEXT_RESIDENT:-94489280512} # 88 GiB +Q3_RESIDENT=${Q3_RESIDENT:-66571993088} # 62 GiB +TTS_RESIDENT=${TTS_RESIDENT:-6979321856} # 6.5 GiB +ASR_RESIDENT=${ASR_RESIDENT:-5905580032} # 5.5 GiB +RESERVE_BYTES=${RESERVE_BYTES:-4294967296} +GTT_MARGIN_BYTES=${GTT_MARGIN_BYTES:-2147483648} diff --git a/deploy/strix-halo/pins/flash-next-q3.json b/deploy/strix-halo/pins/flash-next-q3.json new file mode 100644 index 00000000..e67b721e --- /dev/null +++ b/deploy/strix-halo/pins/flash-next-q3.json @@ -0,0 +1,8 @@ +{"repo": "unsloth/Qwen3.8-Flash-Next-GGUF", "revision": "f5d175de2cf7f720d45d6064019a81fcf056e986", + "files": { + "MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf": [2786568256, "5ff54097406a905cf3a724c709124ceb0e3e10235ee862298969e91c96fa96e6"], + "UD-Q3_K_XL/Qwen3.8-Flash-Next-UD-Q3_K_XL-00001-of-00004.gguf": [10946618, "7666000ba91eb5527f8e12e0414de36766dc82a082876337f7827c2caa859143"], + "UD-Q3_K_XL/Qwen3.8-Flash-Next-UD-Q3_K_XL-00002-of-00004.gguf": [49742117248, "e954cb3044ae087a003ce8cc1631c9d40fe15ae64a8befcf4aa06457848c647c"], + "UD-Q3_K_XL/Qwen3.8-Flash-Next-UD-Q3_K_XL-00003-of-00004.gguf": [10911746208, "fcce26b1e5e6e54559a7e7c2f8d6e37067ec695ff1f14bce662810bde78abe1f"], + "UD-Q3_K_XL/Qwen3.8-Flash-Next-UD-Q3_K_XL-00004-of-00004.gguf": [28800138432, "5de8b5dbf89409acc39468decafd4a4a95b13c29d88a14b0356107897829ec36"] + }} diff --git a/deploy/strix-halo/pins/flash-next-q4.json b/deploy/strix-halo/pins/flash-next-q4.json new file mode 100644 index 00000000..91e0fb7c --- /dev/null +++ b/deploy/strix-halo/pins/flash-next-q4.json @@ -0,0 +1,9 @@ +{"repo": "unsloth/Qwen3.8-Flash-Next-GGUF", "revision": "f5d175de2cf7f720d45d6064019a81fcf056e986", + "files": { + "MTP/mtp-Qwen3.8-Flash-Next-shared-Q8_0.gguf": [2786568256, "5ff54097406a905cf3a724c709124ceb0e3e10235ee862298969e91c96fa96e6"], + "UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00001-of-00004.gguf": [10946618, "acc44040f74d0e55fb89c3967056cce5dbda1bcc52e909c3ba6fc72b5e9c0858"], + "UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00002-of-00004.gguf": [49720539552, "45792ae869072d8229384c51c7c73dd959e191505252b41dd71852d9746f5ce4"], + "UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00003-of-00004.gguf": [32803030176, "8c76e79d444b16a663d9c8db54e585ed3b1da13eebd2619c37b0c355da803c82"], + "UD-Q4_K_XL/Qwen3.8-Flash-Next-UD-Q4_K_XL-00004-of-00004.gguf": [28800138432, "5de8b5dbf89409acc39468decafd4a4a95b13c29d88a14b0356107897829ec36"], + "mmproj-BF16.gguf": [907542944, "2e788f8c511d8093c7b43cb87b2fd7e14228340318057f8fb20c86df2efe2355"] + }} diff --git a/deploy/strix-halo/pins/qwen3-asr.json b/deploy/strix-halo/pins/qwen3-asr.json new file mode 100644 index 00000000..91d22eed --- /dev/null +++ b/deploy/strix-halo/pins/qwen3-asr.json @@ -0,0 +1,15 @@ +{"repo": "Qwen/Qwen3-ASR-1.7B", "revision": "7278e1e70fe206f11671096ffdd38061171dd6e5", + "files": { + ".gitattributes": [1519, "11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361"], + "README.md": [57456, "5058416891bc47a2051557765997e8c42f8eb78a0e33c3e775bd17d4b0ba4d50"], + "chat_template.json": [1161, "75a8cfca24f00de72d796fbfed6858fc9614ef3dabd8696684cc3bc03a9c58ff"], + "config.json": [6194, "2e74a751548b8ad7d7526d29365ad8144c345d8b412b1152d25dc6698452712f"], + "generation_config.json": [142, "1da527824d81e07118facff437e03f2e24a23311e3bdeb2368973fe77e5f275c"], + "merges.txt": [1671853, "8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5"], + "model-00001-of-00002.safetensors": [4220320824, "a4cd1f1a04d90b757dc7f7dd26254e69a013b19e80efe590a83c6a3bde8608d6"], + "model-00002-of-00002.safetensors": [478200688, "6e0b9d9e09e2e0238e7ef3cc8a484ab387e91b90f1900bedf88bc92d7929ccfc"], + "model.safetensors.index.json": [64821, "f994739fe38e5210b9e3e8ce6c6307315e2ceac3cb630e7b7414d69dce520f60"], + "preprocessor_config.json": [330, "45e120a4eda2c20c5d7f2ea9354e63536bf35e27aa573fb7cdf78017b378770d"], + "tokenizer_config.json": [12487, "4942d005604266809309cabc9f4e9cb89ce855d59b14681fdc0e1cc62ea26c4c"], + "vocab.json": [2776833, "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910"] + }} diff --git a/deploy/strix-halo/pins/qwen3-tts-customvoice.json b/deploy/strix-halo/pins/qwen3-tts-customvoice.json new file mode 100644 index 00000000..b7910b69 --- /dev/null +++ b/deploy/strix-halo/pins/qwen3-tts-customvoice.json @@ -0,0 +1,16 @@ +{"repo": "Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice", "revision": "0c0e3051f131929182e2c023b9537f8b1c68adfe", + "files": { + ".gitattributes": [1519, "11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361"], + "README.md": [57846, "64f65e809b51cc0c35f393fbbfcc2d735c0cb3fdbbc6f3fdc4a5e6ce55e9d088"], + "config.json": [4908, "17a07f527a1c25ea30b4e023a184482a23d3e279d697b1dc81b1bde498d29cf9"], + "generation_config.json": [245, "f1b90b4513f3b34c62851049e2492d7b4c5940daf1276f89c82b8ef04127f3aa"], + "merges.txt": [1671839, "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3"], + "model.safetensors": [3833402552, "38b1d5971bdbd982b561cccec982669a53b0537c3cf5e9bd4778ed07bb2f5137"], + "preprocessor_config.json": [127, "efdde1022ea9d76928bf7a9cd53139138f5ba2e466e837f08f6105ab1af1c119"], + "speech_tokenizer/config.json": [2336, "ee65bb901c876664ab8707c487157aa1a6ee57c65969b28fb5ec9dc211e68167"], + "speech_tokenizer/configuration.json": [76, "6bc26d64eb5024b4d1dab5a52371958b429256d6c9d59787f1f5294a54e0cebd"], + "speech_tokenizer/model.safetensors": [682293092, "836b7b357f5ea43e889936a3709af68dfe3751881acefe4ecf0dbd30ba571258"], + "speech_tokenizer/preprocessor_config.json": [234, "fcb3805e597e786d4067706e602f6688524640f8d3396790e2e09b5942fcbdfb"], + "tokenizer_config.json": [7344, "dc3c31c3bdaedd5016382bb3cbe07323026775ad51f5a4fb564505992ae4a670"], + "vocab.json": [2776833, "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910"] + }} diff --git a/deploy/strix-halo/render.sh b/deploy/strix-halo/render.sh new file mode 100755 index 00000000..4489e90d --- /dev/null +++ b/deploy/strix-halo/render.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Renders deploy/strix-halo/config.json.in into $DEPLOY/config.json from env.sh (+ $SITE). budget_bytes defaults to +# the GPU's GTT pool less GTT_MARGIN_BYTES (tools/install/lib.sh hw_gtt). Prints the path. +set -euo pipefail +here=$(cd "$(dirname "$0")" && pwd); REPO=$(cd "$here/../.." && pwd) +source "$REPO/tools/install/lib.sh" +source "$here/env.sh"; [ -z "${SITE:-}" ] || source "$SITE" +gtt=$(hw_gtt); BUDGET_BYTES=${BUDGET_BYTES:-$(( gtt > GTT_MARGIN_BYTES ? gtt - GTT_MARGIN_BYTES : 0 ))} +SRC=$REPO +mkdir -p "$DEPLOY/inbox" "$DEPLOY/data" "$DEPLOY/logs" +export MACHINE RESERVE_BYTES BUDGET_BYTES DEPLOY CHAT_DEFAULT STT_DEFAULT VOICE_CHAT VOICE FLASHNEXT_DIR FLASHNEXT_RESIDENT \ + GUFO_LLM_PORT Q3_DIR Q3_RESIDENT LLAMA_BIN LLAMA_PORT PYTHON SRC TTS_DIR TTS_RESIDENT GUFO_TTS_PORT ASR_DIR ASR_RESIDENT \ + GUFO_ASR_PORT J WHISPER_DIR +python3 -I - "$here/config.json.in" "$DEPLOY/config.json" <<'PY' +import json, os, re, sys +src, out = sys.argv[1], sys.argv[2] +text = re.sub(r"@([A-Z0-9_]+)@", lambda m: os.environ[m.group(1)], open(src).read()) +json.loads(text) # a template or site value that breaks JSON fails here, not in the daemon +open(out + ".tmp", "w").write(text); os.replace(out + ".tmp", out) +PY +echo "$DEPLOY/config.json" diff --git a/deploy/strix-halo/start.sh b/deploy/strix-halo/start.sh new file mode 100755 index 00000000..da5501f8 --- /dev/null +++ b/deploy/strix-halo/start.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Starts the daemon as a transient systemd user unit ($UNIT; no unit file, no sudo), after rendering the config, and +# waits for /health. Logs: journalctl --user -u $UNIT. SITE=path/to/site.env selects a site file. A transient unit +# starts with an empty environment: what the workers need from this one (PATH, HOME, GUFO_IMAGE) is passed explicitly. +set -euo pipefail +here=$(cd "$(dirname "$0")" && pwd); REPO=$(cd "$here/../.." && pwd) +source "$here/env.sh"; [ -z "${SITE:-}" ] || source "$SITE" +[ -x "$LR_BIN" ] || { echo "start.sh: no $LR_BIN (cd $REPO && zig build -Doptimize=ReleaseSafe)" >&2; exit 1; } +cfg=$(bash "$here/render.sh") +systemctl --user is-active -q "$UNIT" && { echo "start.sh: $UNIT is already running (stop.sh first)" >&2; exit 1; } +systemctl --user reset-failed "$UNIT" 2> /dev/null || true +systemd-run --user --unit="$UNIT" --collect -p KillMode=mixed -p TimeoutStopSec=90 \ + --setenv=PATH="$PATH" --setenv=HOME="$HOME" --setenv=GUFO_IMAGE="$GUFO_IMAGE" \ + ${GUFO_ALLOW_UNPINNED:+--setenv=GUFO_ALLOW_UNPINNED="$GUFO_ALLOW_UNPINNED"} ${GUFO_STOP_TIMEOUT:+--setenv=GUFO_STOP_TIMEOUT="$GUFO_STOP_TIMEOUT"} \ + "$LR_BIN" serve --config "$cfg" --host 127.0.0.1 --port "$PORT" --data "$DEPLOY/data" > /dev/null +for _ in $(seq 1 60); do curl -fs -m 2 "http://127.0.0.1:$PORT/health" > /dev/null && { echo "localrouter up on http://127.0.0.1:$PORT ($UNIT)"; exit 0; }; sleep 1; done +echo "start.sh: no /health after 60 s; journalctl --user -u $UNIT -n 50" >&2; exit 1 diff --git a/deploy/strix-halo/status.sh b/deploy/strix-halo/status.sh new file mode 100755 index 00000000..3ab941af --- /dev/null +++ b/deploy/strix-halo/status.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# The unit, /health, each tool's state, the model containers and GTT. +set -uo pipefail +here=$(cd "$(dirname "$0")" && pwd); REPO=$(cd "$here/../.." && pwd) +source "$here/env.sh"; [ -z "${SITE:-}" ] || source "$SITE" +source "$REPO/tools/install/lib.sh" +echo "unit $UNIT: $(systemctl --user is-active "$UNIT" 2> /dev/null)" +curl -fs -m 3 "http://127.0.0.1:$PORT/health" > /dev/null && echo "health: ok" || echo "health: no answer on :$PORT" +curl -fs -m 5 "http://127.0.0.1:$PORT/v1/tools" 2> /dev/null | jq -r '.data[] | " \(.id): \(.state)"' 2> /dev/null +echo "containers: $(podman ps --format '{{.Names}}' --filter name=lr-gufo- | tr '\n' ' ')" +hw_amd && echo "GTT in use: $(gib "$(hw_gtt_used)") of $(gib "$(hw_gtt)") GiB" diff --git a/deploy/strix-halo/stop.sh b/deploy/strix-halo/stop.sh new file mode 100755 index 00000000..9aee6d10 --- /dev/null +++ b/deploy/strix-halo/stop.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Stops the daemon (its workers stop their model servers), then any Gufo container a killed worker left behind. +set -uo pipefail +here=$(cd "$(dirname "$0")" && pwd); REPO=$(cd "$here/../.." && pwd) +source "$here/env.sh"; [ -z "${SITE:-}" ] || source "$SITE" +systemctl --user stop "$UNIT" 2> /dev/null +left=$(podman ps -q --filter name=lr-gufo- 2> /dev/null) +[ -z "$left" ] || { echo "stopping leftover containers: $(podman ps --format '{{.Names}}' --filter name=lr-gufo- | tr '\n' ' ')"; podman stop -t 10 $left > /dev/null; } +source "$REPO/tools/install/lib.sh" +hw_amd && echo "GTT in use: $(gib "$(hw_gtt_used)") GiB" +exit 0 diff --git a/deploy/strix-halo/test_start.sh b/deploy/strix-halo/test_start.sh new file mode 100755 index 00000000..86c71614 --- /dev/null +++ b/deploy/strix-halo/test_start.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# Tests that the Gufo image start.sh chooses reaches the workers' containers (no GPU, no systemd, no podman): +# bash deploy/strix-halo/test_start.sh +# A stub systemd-run runs the daemon the way a transient unit does, with an empty environment plus its --setenv +# values; the stub daemon starts tools/gufo/serve.sh as a worker would, and a stub podman records the image it is given. +set -uo pipefail +here=$(cd "$(dirname "$0")" && pwd); REPO=$(cd "$here/../.." && pwd) +pinned=$(cat "$REPO/tools/gufo/IMAGE") +other="registry.invalid/gufo/runtime:9.9@sha256:$(printf 'ab%.0s' $(seq 32))" +fails=0 n=0 +scratch=$(mktemp -d); trap 'rm -rf "$scratch"' EXIT +check() { n=$((n + 1)); if [ "$2" = "$3" ]; then echo "PASS $1"; else echo "FAIL $1: got '$2', want '$3'"; fails=$((fails + 1)); fi; } + +# start [VAR=VALUE...]: start.sh in a fresh prefix with these variables exported; sets $t (the scratch directory) +start() { + t=$(mktemp -d "$scratch/run.XXXXXX"); mkdir -p "$t/bin" + cat > "$t/bin/systemd-run" < "$t/unit.log" 2>&1 +SH + printf '#!/bin/sh\n[ "$2" = is-active ] && exit 3\nexit 0\n' > "$t/bin/systemctl" + printf '#!/bin/sh\nexit 0\n' > "$t/bin/curl" + printf '#!/bin/sh\nfor a in "$@"; do case $a in *@sha256:*|*:latest|*/*:*) echo "$a" > %q ;; esac; done\n' "$t/podman-image" > "$t/bin/podman" + cat > "$t/lr" < "$t/unit-env" +"$REPO/tools/gufo/serve.sh" asr 18092 -- gufo serve asr --model /m 2> "$t/serve.err" +echo \$? > "$t/serve-rc" +SH + chmod +x "$t/bin/"* "$t/lr" + ( export PATH="$t/bin:$PATH" J="$t/j" LR_BIN="$t/lr" "$@"; bash "$here/start.sh" > "$t/start.out" 2>&1 ) +} +unit() { sed -n "s/^$1=//p" "$t/unit-env"; } +seen() { cat "$t/podman-image" 2> /dev/null; } + +start +check "default: the unit gets the pinned image" "$(unit GUFO_IMAGE)" "$pinned" +check "default: the worker's container runs it" "$(seen)" "$pinned" +check "the pin is a digest" "$(grep -c '@sha256:[0-9a-f]\{64\}$' "$REPO/tools/gufo/IMAGE")" 1 +start GUFO_IMAGE="$other" UNRELATED=leak +check "exported override: reaches the unit" "$(unit GUFO_IMAGE)" "$other" +check "exported override: reaches the container" "$(seen)" "$other" +check "a variable start.sh does not pass stays out (the unit's environment is empty)" "$(unit UNRELATED)" "" +site=$scratch/site.env; echo "GUFO_IMAGE=$other" > "$site" +start SITE="$site" +check "site file override: reaches the container" "$(seen)" "$other" +start GUFO_IMAGE=ghcr.io/gufo-org/toolboxes/gufo-runtime:latest +check "a tag without a digest: serve.sh refuses (exit 2)" "$(cat "$t/serve-rc")" 2 +check "a tag without a digest: no container" "$(seen)" "" +check "a tag without a digest: it says why" "$(grep -c 'not pinned by digest' "$t/serve.err")" 1 +start GUFO_IMAGE=ghcr.io/gufo-org/toolboxes/gufo-runtime:latest GUFO_ALLOW_UNPINNED=1 +check "GUFO_ALLOW_UNPINNED=1 reaches the unit and runs the tag" "$(unit GUFO_ALLOW_UNPINNED) $(seen)" "1 ghcr.io/gufo-org/toolboxes/gufo-runtime:latest" +echo "$((n - fails))/$n passed" +[ $fails = 0 ] diff --git a/tools/gufo/IMAGE b/tools/gufo/IMAGE new file mode 100644 index 00000000..ea0f585b --- /dev/null +++ b/tools/gufo/IMAGE @@ -0,0 +1 @@ +ghcr.io/gufo-org/toolboxes/gufo-runtime:0.34.0@sha256:49b1fce40cb43e33c46d91595e300cb320cdec768fcd976f8c8da24b402fc133 diff --git a/tools/gufo/README.md b/tools/gufo/README.md new file mode 100644 index 00000000..69884d53 --- /dev/null +++ b/tools/gufo/README.md @@ -0,0 +1,28 @@ +# Gufo in rootless Podman + +[Gufo](https://github.com/gufo-org/gufo) (MIT) is an inference engine for AMD Strix Halo (gfx1151): Qwen3.8 Flash-Next +and 27B, Qwen3-TTS, Qwen3-ASR, Qwen-Image, MiniMax H3 and more behind OpenAI-compatible servers. +`serve.sh NAME PORT [podman options] -- gufo serve ...` runs one of them in the foreground so a LocalRouter worker can +supervise it: the `openai_server` engine for chat, `tools/speech/openai_audio` for speech and transcription. + +- The container is `lr-gufo-NAME`, published on `127.0.0.1:PORT` only; `--host 0.0.0.0 --port 8080` are added after + `serve` inside the container. `TZ` is the host's zone (`$TZ`, else `/etc/timezone`, else the `/etc/localtime` + link). The image has no zoneinfo, so when the host has `/usr/share/zoneinfo` it is mounted read-only there; + otherwise the container stays on UTC. +- SIGTERM or SIGINT (the worker unloading) runs `podman stop` and waits, so the GPU memory is free when the script exits. + A SIGKILL of the worker's process group (the daemon's, on abort or timeout) skips that trap, and conmon keeps the + container running outside the group, so a watcher in its own session removes this run's container (by its + `--cidfile` id, never a later run's of the same name) once the script is gone (`test_serve.sh`, stub podman; checked + with real rootless Podman on the Strix Halo box: removed within the stop timeout). + `--replace` removes a container left by anything else; `deploy/strix-halo/stop.sh` also stops any + `lr-gufo-*` left over. +- `/dev/kfd` and `/dev/dri` are passed with the `video` and `render` groups by name: Gufo's docs use + `--group-add keep-groups`, which needs the crun runtime, and many hosts run runc. +- The image is pinned by digest in `IMAGE` (`gufo-runtime:0.34.0@sha256:49b1fce4…`, Gufo engine 2845939b), the + build these figures were measured on; podman checks the pulled manifest against the digest. `GUFO_IMAGE` overrides + it with another `name@sha256:…` (a reference without a digest is refused unless `GUFO_ALLOW_UNPINNED=1`). + `deploy/strix-halo/start.sh` passes the chosen image into the daemon's unit, so the workers run what bootstrap pulled. + +Measured on a Radeon 8060S with 96 GiB GTT (2026-11-15): Flash-Next UD-Q4_K_XL with the MTP head peaks at 88 GiB GTT +serving 32k context with 2 sessions (pp512 1196 tok/s, decode 60-78 tok/s with MTP); Qwen3-TTS CustomVoice 6.5 GiB, about +220 ms to first audio, 2.3x real time; Qwen3-ASR 5.5 GiB, 14x real time. diff --git a/tools/gufo/serve.sh b/tools/gufo/serve.sh new file mode 100755 index 00000000..c25977e6 --- /dev/null +++ b/tools/gufo/serve.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +# Runs one Gufo server (https://github.com/gufo-org/gufo, the AMD Strix Halo engine) in rootless Podman, in the +# foreground, for LocalRouter's `openai_server` engine and the openai_audio `cmd` worker: +# tools/gufo/serve.sh NAME PORT [podman options...] -- gufo serve ... [--port 8080 is added] +# The container listens on 127.0.0.1:PORT only. SIGTERM/SIGINT (the daemon unloading the tool) stops the container and +# waits until it is gone, so its GPU memory is free before this script exits. A SIGKILL of this script's process group +# (the daemon's, on abort or timeout: the trap never runs, and conmon keeps the container going outside the group) is +# covered by a watcher in its own session, which removes this run's container (by id) once the script is gone: exited, +# or a zombie its parent has not reaped yet. +# `--replace` clears a container left over from anything else. +# Environment: GUFO_IMAGE (default: tools/gufo/IMAGE, the runtime pinned by digest), GUFO_STOP_TIMEOUT (default 10 s), +# TZ (the host zone passed into the container; unset: read from the host). The image has no zoneinfo of its own, so +# when the host has one it is mounted read-only at /usr/share/zoneinfo (GUFO_ZONEINFO overrides that host path). +# An image named without @sha256: is refused unless GUFO_ALLOW_UNPINNED=1: a tag can move between two installs. +# Devices: /dev/kfd and /dev/dri; the video and render groups are passed by name, since keep-groups needs crun and +# many hosts run runc. +# Logs: the container's output reaches the daemon through this script's stdout and stderr, which it copies into the +# tool's log. podman's default log driver on a systemd host (journald) also wrote every line to the journal, stderr at +# priority 3, so each worker message appeared twice and as an error. --log-driver=none keeps the attached output and +# drops the journal copy (`podman logs` then has nothing; the tool's log has it all). A --log-driver among the podman +# options given to this script comes later on the command line and wins. +set -euo pipefail +name=${1:?usage: serve.sh NAME PORT [podman options...] -- gufo serve ...}; port=${2:?port}; shift 2 +popts=() +while [ $# -gt 0 ] && [ "$1" != -- ]; do popts+=("$1"); shift; done +[ "${1:-}" = -- ] || { echo "serve.sh: missing -- before the gufo command" >&2; exit 2; } +shift +image=${GUFO_IMAGE:-$(cat "$(dirname "$0")/IMAGE")} +case $image in + *@sha256:????????????????????????????????????????????????????????????????) ;; + *) [ "${GUFO_ALLOW_UNPINNED:-0}" = 1 ] || { echo "serve.sh: GUFO_IMAGE '$image' is not pinned by digest (name@sha256:...); GUFO_ALLOW_UNPINNED=1 runs it anyway" >&2; exit 2; } ;; +esac +# A zone name only (Area/City, UTC, ...): the container's clock matches the host's, and a value with a newline or a +# shell metacharacter cannot become another podman argument. +host_tz() { + local tz="${TZ:-}" + if [ -z "$tz" ] && [ -r /etc/timezone ]; then tz=$(tr -d ' \t\r\n' < /etc/timezone); fi + if [ -z "$tz" ]; then + local link + link=$(readlink /etc/localtime 2> /dev/null || true) + case $link in + */zoneinfo/*) tz=${link#*/zoneinfo/} ;; + esac + fi + case ${tz:-UTC} in + *[!A-Za-z0-9_+/-]*) printf '%s' UTC ;; + *) printf '%s' "${tz:-UTC}" ;; + esac +} +tz=$(host_tz) +# TZ alone leaves the container on UTC: the image ships neither /usr/share/zoneinfo nor /etc/localtime. +zoneinfo=${GUFO_ZONEINFO:-/usr/share/zoneinfo} +zi=() +if [ -d "$zoneinfo" ]; then zi=(-v "${zoneinfo}:/usr/share/zoneinfo:ro"); fi +cname="lr-gufo-$name" +stop() { podman stop -t "${GUFO_STOP_TIMEOUT:-10}" "$cname" > /dev/null 2>&1 || true; wait "$pid" 2> /dev/null || true; exit 0; } +trap stop TERM INT +# "gufo serve [global opts] KIND ...": insert host/port right after "serve" +args=(); placed=0 +for a in "$@"; do args+=("$a"); if [ $placed = 0 ] && [ "$a" = serve ]; then args+=(--host 0.0.0.0 --port 8080); placed=1; fi; done +run_dir=$(mktemp -d "${TMPDIR:-/tmp}/lr-gufo-$name.XXXXXX") +# the watcher: polls this script; when it is gone, removes the container this run made (not a later run's of the name). +# A zombie counts as gone: `kill -0` succeeds on one, so a parent that is slow to reap this script (a subreaper) kept the +# container running after a group SIGKILL. Where /proc is mounted the watcher reads the State: line instead. +setsid -f sh -c 'running() { + if [ -d /proc/self ]; then + st=$(sed -n "s/^State:[[:space:]]*\([A-Za-z]\).*/\1/p" "/proc/$1/status" 2> /dev/null) + [ -n "$st" ] && [ "$st" != Z ] && [ "$st" != X ] + else kill -0 "$1" 2> /dev/null; fi + } + while running "$1"; do sleep 0.5; done + [ -s "$2/cid" ] && podman rm -f -t "$3" "$(cat "$2/cid")" > /dev/null 2>&1; rm -rf "$2"' \ + gufo-watch "$$" "$run_dir" "${GUFO_STOP_TIMEOUT:-10}" < /dev/null > /dev/null 2>&1 +podman run --rm --replace --cidfile "$run_dir/cid" --name "$cname" --userns=keep-id:uid="$(id -u)",gid="$(id -g)" \ + --device /dev/kfd --device /dev/dri --group-add video --group-add render --ulimit memlock=-1 \ + --log-driver=none -e "TZ=$tz" ${zi[@]+"${zi[@]}"} -p "127.0.0.1:$port:8080" ${popts[@]+"${popts[@]}"} "$image" "${args[@]}" & +pid=$! +wait "$pid" diff --git a/tools/gufo/test_serve.sh b/tools/gufo/test_serve.sh new file mode 100755 index 00000000..e9ab294a --- /dev/null +++ b/tools/gufo/test_serve.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +# serve.sh without a GPU: a stub podman whose "container" runs outside the caller's process group, as conmon's does. +# A SIGKILL of serve.sh's group (the daemon's, on abort or timeout) must not leave the container running; SIGTERM +# stops it through the trap; a later run of the same name is not removed by an earlier run's watcher. +set -uo pipefail +here=$(cd "$(dirname "$0")" && pwd) +t=$(mktemp -d); trap 'pkill -KILL -f "stub-container $t" 2> /dev/null; rm -rf "$t"' EXIT +pass=0 fail=0 +check() { if eval "$2"; then pass=$((pass + 1)); else fail=$((fail + 1)); echo "FAIL: $1" >&2; fi; } +mkdir -p "$t/bin" "$t/state" +cat > "$t/bin/podman" < "\$S/last-args" + cid=\$(date +%s%N); name=; cidfile= + while [ \$# -gt 0 ]; do case "\$1" in --cidfile) cidfile=\$2; shift ;; --name) name=\$2; shift ;; esac; shift; done + setsid bash -c 'exec -a "stub-container $t \$0" sleep 300' "\$cid" < /dev/null > /dev/null 2>&1 & + echo \$! > "\$S/\$cid"; echo "\$cid" > "\$S/name-\$name"; echo "\$cid" > "\$cidfile" + wait ;; # the client waits; it dies with the group, the container does not + stop) for a in "\$@"; do f=\$S/\$(cat "\$S/name-\$a" 2> /dev/null); [ -f "\$f" ] && kill "\$(cat "\$f")" 2> /dev/null; done; exit 0 ;; + rm) shift; for a in "\$@"; do [ -f "\$S/\$a" ] && kill "\$(cat "\$S/\$a")" 2> /dev/null; echo "\$a" >> "\$S/removed"; done; exit 0 ;; +esac +STUB +chmod +x "$t/bin/podman" +export PATH="$t/bin:$PATH" GUFO_IMAGE="x@sha256:$(printf '0%.0s' {1..64})" GUFO_STOP_TIMEOUT=1 TMPDIR="$t" +container() { local c; c=$(cat "$t/state/name-lr-gufo-$1" 2> /dev/null) && cat "$t/state/$c" 2> /dev/null; } +alive() { [ -n "$1" ] && kill -0 "$1" 2> /dev/null; } +start() { local name=$1; shift; setsid bash "$here/serve.sh" "$name" 18080 "$@" -- gufo serve llm > /dev/null 2>&1 & echo $!; } # its own group, as a worker's +waitfor() { local i; for i in $(seq 100); do eval "$1" && return 0; sleep 0.1; done; return 1; } + +# a hard kill of the group: the container goes too +s=$(start a); waitfor '[ -n "$(container a)" ]'; c=$(container a) +check "the container runs" 'alive "$c"' +kill -KILL -- "-$s" +check "SIGKILL of serve.sh's group: the container is removed" 'waitfor "! alive $c"' +check "by its id" 'grep -q "$(cat "$t/state/name-lr-gufo-a")" "$t/state/removed"' +check "the watcher cleans up after itself" 'waitfor "[ -z \"\$(ls -d "$t"/lr-gufo-a.* 2> /dev/null)\" ]"' + +# SIGTERM (an unload): the trap stops the container and the script exits +s=$(start b); waitfor '[ -n "$(container b)" ]'; c=$(container b) +kill -TERM "$s" +check "SIGTERM: the container stops" 'waitfor "! alive $c"' +check "SIGTERM: serve.sh exits" 'waitfor "! alive $s"' + +# a run killed, then the same name started at once: the first run's watcher leaves the new container alone +s=$(start c); waitfor '[ -n "$(container c)" ]'; c1=$(container c) +kill -KILL -- "-$s"; s2=$(start c); waitfor '[ "$(container c)" != "$c1" ] && [ -n "$(container c)" ]'; c2=$(container c) +check "the first container is removed" 'waitfor "! alive $c1"' +sleep 1.5 +check "the second is not" 'alive "$c2"' +kill -KILL -- "-$s2"; waitfor "! alive $c2" + +# the host zone is an argument of podman run, so container logs use the host clock +export TZ=Europe/Helsinki +s=$(start tz); waitfor '[ -n "$(container tz)" ]' +check "podman run receives the host TZ" 'grep -qx "TZ=Europe/Helsinki" "$t/state/last-args"' +if [ -d /usr/share/zoneinfo ]; then + check "the host zoneinfo is mounted read-only" 'grep -qx "/usr/share/zoneinfo:/usr/share/zoneinfo:ro" "$t/state/last-args"' +fi +kill -KILL -- "-$s"; waitfor '! alive "$(container tz)"' + +# TZ cannot resolve without the zone database. A directory that exists is mounted; one that does not is left off. +mkdir -p "$t/zoneinfo" +export GUFO_ZONEINFO="$t/zoneinfo" +rm -f "$t/state/last-args" +s=$(start zi); waitfor '[ -n "$(container zi)" ]' +check "a present zoneinfo directory is mounted read-only" "grep -qx '$t/zoneinfo:/usr/share/zoneinfo:ro' '$t/state/last-args'" +kill -KILL -- "-$s"; waitfor '! alive "$(container zi)"' +export GUFO_ZONEINFO="$t/no-such-zoneinfo" +rm -f "$t/state/last-args" +s=$(start zn); waitfor '[ -n "$(container zn)" ]' +check "a missing zoneinfo directory is not mounted" '! grep -q zoneinfo "$t/state/last-args"' +kill -KILL -- "-$s"; waitfor '! alive "$(container zn)"' +unset GUFO_ZONEINFO + +rm -f "$t/state/last-args" +unset TZ +s=$(start zu); waitfor 'grep -q "^TZ=" "$t/state/last-args" 2>/dev/null' +check "without TZ, a zone name is still passed" 'grep -Eq "^TZ=[A-Za-z0-9_+/-]+$" "$t/state/last-args"' +kill -KILL -- "-$s"; waitfor '! alive "$s"' + +# the container's output goes to the attached stdout/stderr only: no journald copy at error priority +rm -f "$t/state/last-args" +s=$(start ld); waitfor '[ -s "$t/state/last-args" ]' +check "podman run gets --log-driver=none" 'grep -qx -- "--log-driver=none" "$t/state/last-args"' +kill -KILL -- "-$s"; waitfor '! alive "$s"' +rm -f "$t/state/last-args" +s=$(start lo --log-driver=k8s-file); waitfor '[ -s "$t/state/last-args" ]' +check "a caller's --log-driver comes after it, so it wins" '[ "$(grep -n -- "^--log-driver" "$t/state/last-args" | tail -1 | cut -d: -f2)" = "--log-driver=k8s-file" ]' +kill -KILL -- "-$s"; waitfor '! alive "$s"' + +# a parent slow to reap (a subreaper): after the group SIGKILL serve.sh stays a zombie, and the container must still go +cat > "$t/holder.py" <<'PY' +import os, sys, time +serve, name, pidfile = sys.argv[1:4] +pid = os.fork() +if pid == 0: + os.setsid() # its own group, as a worker's; this parent is outside it and survives the group kill + fd = os.open(os.devnull, os.O_RDWR) + for n in (0, 1, 2): + os.dup2(fd, n) + os.execvp("bash", ["bash", serve, name, "18080", "--", "gufo", "serve", "llm"]) +open(pidfile, "w").write(str(pid)) +time.sleep(60) # does not reap the child until then +os.waitpid(pid, 0) +PY +state() { sed -n 's/^State:[[:space:]]*\([A-Za-z]\).*/\1/p' "/proc/$1/status" 2> /dev/null; } +python3 "$t/holder.py" "$here/serve.sh" d "$t/d.pid" & h=$! +waitfor '[ -s "$t/d.pid" ] && [ -n "$(container d)" ]'; s=$(cat "$t/d.pid"); c=$(container d) +kill -KILL -- "-$s" +check "an unreaped serve.sh is a zombie" 'waitfor "[ \"\$(state $s)\" = Z ]"' +check "a zombie serve.sh: the container is removed before it is reaped" 'waitfor "! alive $c" && [ "$(state "$s")" = Z ]' +check "by its id, while unreaped" 'grep -q "$(cat "$t/state/name-lr-gufo-d")" "$t/state/removed"' +kill -KILL "$h" 2> /dev/null; wait "$h" 2> /dev/null + +echo "gufo serve.sh: $pass passed, $fail failed" +[ "$fail" -eq 0 ] diff --git a/tools/install/check_hashes.py b/tools/install/check_hashes.py new file mode 100644 index 00000000..b9ca8e98 --- /dev/null +++ b/tools/install/check_hashes.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +"""Refuses a lock file with an artifact it does not pin by hash (standard library only): + python3 -I tools/install/check_hashes.py [FILE...] +With no FILE it checks every uv.lock and requirements*.txt under the checkout (git ls-files, else a walk). uv.lock: +every wheel and sdist of every package must carry hash = "sha256:<64 hex>" (uv sync --locked then refuses any download +whose bytes differ; an artifact without a hash would be installed unchecked). requirements*.txt: every requirement +must carry --hash=sha256:<64 hex> (pip/uv --require-hashes). Exit 1 and one line per artifact otherwise.""" +import os +import re +import subprocess +import sys +import tomllib + +SHA = re.compile(r"sha256:[0-9a-f]{64}") +ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) + + +def uv_lock(path): + bad = [] + with open(path, "rb") as f: + lock = tomllib.load(f) + for p in lock.get("package", []): + src = p.get("source", {}) + if not any(k in src for k in ("registry", "url")): + continue # virtual, editable, path, git: no downloaded artifact + arts = ([p["sdist"]] if "sdist" in p else []) + list(p.get("wheels", [])) + if not arts: + bad.append(f"{p['name']} {p.get('version', '')}: no artifact listed") + for a in arts: + if not SHA.fullmatch(a.get("hash", "")): + bad.append(f"{p['name']} {p.get('version', '')}: {a.get('url') or a.get('path') or a.get('filename')} has no sha256") + return bad + + +def requirements(path): + bad, logical = [], "" + for raw in open(path): + line = raw.split(" #", 1)[0].rstrip("\n") if not raw.lstrip().startswith("#") else "" + if line.rstrip().endswith("\\"): + logical += line.rstrip()[:-1] + " " + continue + logical += line + req, logical = logical.strip(), "" + if not req or req.startswith("-"): + continue # an option line (--index-url, -r, ...) + if not any(SHA.fullmatch(h) for h in re.findall(r"--hash[= ](\S+)", req)): + bad.append(f"{req.split()[0]} has no --hash=sha256") + return bad + + +def tracked(): + try: + out = subprocess.run(["git", "-C", ROOT, "ls-files"], capture_output=True, text=True, check=True).stdout.split() + except (OSError, subprocess.CalledProcessError): + out = [os.path.relpath(os.path.join(d, f), ROOT) for d, _, fs in os.walk(ROOT) for f in fs] + return [os.path.join(ROOT, f) for f in sorted(out) + if os.path.basename(f) == "uv.lock" or re.fullmatch(r"requirements.*\.txt", os.path.basename(f))] + + +def main(argv): + files = argv or tracked() + failed = 0 + for f in files: + bad = uv_lock(f) if os.path.basename(f).endswith(".lock") else requirements(f) + for b in bad: + print(f"{os.path.relpath(f, ROOT)}: {b}") + failed += bool(bad) + print(f"{len(files) - failed}/{len(files)} lock files pin every artifact by sha256") + return 1 if failed else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/tools/install/hf_pinned.py b/tools/install/hf_pinned.py new file mode 100644 index 00000000..595f9457 --- /dev/null +++ b/tools/install/hf_pinned.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +"""Hugging Face downloads pinned by revision and checked file by file (standard library only). A manifest is +{"repo", "revision", "files": {"path": [bytes, "sha256"], ...}}, the files at one commit of the repo. + hf_pinned.py download MANIFEST DIR [--hf CMD] `CMD download REPO FILES... --revision REV --local-dir DIR` (hf resumes; + CMD default "hf"), then verify + hf_pinned.py verify MANIFEST DIR [--sizes] every manifest file in DIR has its size and sha256 (--sizes: its size + only, the cheap check of a tree a full verify already passed) + hf_pinned.py files MANIFEST the manifest's paths, one a line + hf_pinned.py pin REPO REVISION [GLOB...] writes a manifest for the files at REVISION matching GLOB (all when + none): sizes and sha256 from the Hub's LFS records, small files hashed + here. Needs the network; the others do not, except download +Exit 1 with one line per file that is missing or differs.""" +import fnmatch +import hashlib +import json +import os +import shlex +import subprocess +import sys +import urllib.parse +import urllib.request + +HUB = "https://huggingface.co" + + +def load(path): + with open(path) as f: + m = json.load(f) + if len(m.get("revision", "")) != 40 or not m.get("files"): + raise SystemExit(f"hf_pinned: {path} needs a 40-hex revision and files") + return m + + +def sha256_file(path): + h = hashlib.sha256() + with open(path, "rb") as f: + while chunk := f.read(1 << 24): + h.update(chunk) + return h.hexdigest() + + +def verify(m, root, sizes_only=False): + bad = [] + for name, (size, sha) in sorted(m["files"].items()): + p = os.path.join(root, name) + if not os.path.isfile(p): + bad.append(f"{name}: missing") + elif os.path.getsize(p) != size: + bad.append(f"{name}: {os.path.getsize(p)} bytes, the pin says {size}") + elif not sizes_only and sha256_file(p) != sha: + bad.append(f"{name}: sha256 differs from the pin {sha}") + return bad + + +def get(url): + req = urllib.request.Request(url, headers={"User-Agent": "localrouter-hf-pinned/1"}) + with urllib.request.urlopen(req, timeout=120) as r: + return r.read() + + +def pin(repo, rev, globs): + tree = json.loads(get(f"{HUB}/api/models/{repo}/tree/{rev}?recursive=true")) + files = {} + for e in tree: + if e.get("type") != "file" or (globs and not any(fnmatch.fnmatch(e["path"], g) for g in globs)): + continue + if e.get("lfs"): + files[e["path"]] = [e["lfs"]["size"], e["lfs"]["oid"]] + else: + data = get(f"{HUB}/{repo}/resolve/{rev}/{urllib.parse.quote(e['path'])}") + files[e["path"]] = [len(data), hashlib.sha256(data).hexdigest()] + if not files: + raise SystemExit(f"hf_pinned: nothing in {repo}@{rev} matches {globs}") + return {"repo": repo, "revision": rev, "files": dict(sorted(files.items()))} + + +def main(argv): + if not argv: + print(__doc__) + return 2 + cmd, args = argv[0], argv[1:] + if cmd == "pin": + print(json.dumps(pin(args[0], args[1], args[2:]), indent=1)) + return 0 + m = load(args[0]) + if cmd == "files": + print("\n".join(sorted(m["files"]))) + return 0 + root = args[1] + if cmd == "download": + hf = shlex.split(args[args.index("--hf") + 1]) if "--hf" in args else ["hf"] + r = subprocess.run([*hf, "download", m["repo"], *sorted(m["files"]), "--revision", m["revision"], "--local-dir", root], + stdout=subprocess.DEVNULL) + if r.returncode: + print(f"hf_pinned: hf download {m['repo']}@{m['revision'][:12]} failed ({r.returncode}); run again (it resumes)", file=sys.stderr) + return 1 + elif cmd != "verify": + print(__doc__) + return 2 + bad = verify(m, root, sizes_only="--sizes" in args) + for b in bad: + print(f"hf_pinned: {m['repo']}@{m['revision'][:12]} in {root}: {b}", file=sys.stderr) + if not bad and cmd == "download": + print(f"{m['repo']}@{m['revision'][:12]}: {len(m['files'])} file(s) verified in {root}") + return 1 if bad else 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) diff --git a/tools/install/test_check_hashes.py b/tools/install/test_check_hashes.py new file mode 100644 index 00000000..6e564da2 --- /dev/null +++ b/tools/install/test_check_hashes.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Tests of check_hashes.py on small lock files (standard library only): python3 -I tools/install/test_check_hashes.py""" +import os, subprocess, sys, tempfile + +HERE = os.path.dirname(os.path.abspath(__file__)) +H = "sha256:" + "ab" * 32 +LOCK = '''version = 1 +[[package]] +name = "app" +version = "0.1.0" +source = {{ virtual = "." }} + +[[package]] +name = "torch" +version = "2.13.0+rocm7.2" +source = {{ registry = "https://download.pytorch.org/whl/rocm7.2" }} +wheels = [ + {{ url = "https://example.invalid/torch-2.13.0-cp312-cp312-linux_x86_64.whl"{torch} }}, +] + +[[package]] +name = "numpy" +version = "2.5.4" +source = {{ registry = "https://pypi.org/simple" }} +sdist = {{ url = "https://example.invalid/numpy-2.5.4.tar.gz", hash = "{H}" }} +wheels = [ + {{ url = "https://example.invalid/numpy-2.5.4-cp312-cp312-linux_x86_64.whl", hash = "{H}" }}, +] +''' +fails = 0 +def check(name, cond, got=""): + global fails + print(("PASS " if cond else "FAIL ") + name + ("" if cond else f": {got}")); fails += not cond + +def run(name, text): + d = tempfile.mkdtemp(); f = os.path.join(d, name) + open(f, "w").write(text) + r = subprocess.run([sys.executable, "-I", os.path.join(HERE, "check_hashes.py"), f], capture_output=True, text=True) + return r.returncode, r.stdout + +code, out = run("uv.lock", LOCK.format(torch=f', hash = "{H}"', H=H)) +check("uv.lock: every artifact hashed passes", code == 0, out) +code, out = run("uv.lock", LOCK.format(torch="", H=H)) +check("uv.lock: an unhashed wheel is refused, by name", code == 1 and "torch 2.13.0+rocm7.2" in out and "numpy" not in out, out) +code, out = run("uv.lock", LOCK.format(torch=', hash = "sha256:1234"', H=H)) +check("uv.lock: a malformed sha256 is refused", code == 1 and "torch" in out, out) +code, out = run("uv.lock", LOCK.format(torch=f', hash = "md5:{"ab" * 16}"', H=H)) +check("uv.lock: another digest is refused", code == 1, out) +code, out = run("requirements-x.txt", f"# comment\n--index-url https://pypi.org/simple\nnumpy==2.5.4 \\\n --hash={H} \\\n --hash={H}\n # via app\n") +check("requirements: hashed passes", code == 0, out) +code, out = run("requirements-x.txt", f"numpy==2.5.4 \\\n --hash={H}\ntorch==2.13.0\n") +check("requirements: an unhashed requirement is refused", code == 1 and "torch==2.13.0" in out and "numpy" not in out, out) +r = subprocess.run([sys.executable, "-I", os.path.join(HERE, "check_hashes.py")], capture_output=True, text=True) +check("this checkout's lock files all pass", r.returncode == 0, r.stdout) +print(f"{'FAILED' if fails else 'ok'}: {fails} failure(s)") +sys.exit(1 if fails else 0) diff --git a/tools/install/test_hf_pinned.py b/tools/install/test_hf_pinned.py new file mode 100644 index 00000000..b86bbf55 --- /dev/null +++ b/tools/install/test_hf_pinned.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +"""Tests of hf_pinned.py verify/download with no network (standard library only): python3 -I tools/install/test_hf_pinned.py +A stub `hf` stands in for huggingface_hub's CLI and writes the files it is asked for.""" +import hashlib, json, os, subprocess, sys, tempfile + +HERE = os.path.dirname(os.path.abspath(__file__)) +TOOL = os.path.join(HERE, "hf_pinned.py") +fails = 0 +def check(name, cond, got=""): + global fails + print(("PASS " if cond else "FAIL ") + name + ("" if cond else f": {got}")); fails += not cond + +def run(*args): + r = subprocess.run([sys.executable, "-I", TOOL, *args], capture_output=True, text=True) + return r.returncode, r.stdout + r.stderr + +t = tempfile.mkdtemp() +files = {"a/model.gguf": b"weights" * 1000, "config.json": b"{}"} +m = {"repo": "org/model", "revision": "f" * 40, "files": {k: [len(v), hashlib.sha256(v).hexdigest()] for k, v in files.items()}} +man = os.path.join(t, "pin.json"); json.dump(m, open(man, "w")) +# the stub: `hf download REPO FILES... --revision REV --local-dir DIR`; logs its argv, writes FILES (one corrupted on request) +stub = os.path.join(t, "hf") +open(stub, "w").write(f"""#!{sys.executable} +import json, os, sys +a = sys.argv[1:]; open({os.path.join(t, 'argv')!r}, 'w').write(json.dumps(a)) +d = a[a.index('--local-dir') + 1]; names = a[2:a.index('--revision')] +data = {json.dumps({k: v.decode() for k, v in files.items()})} +for n in names: + os.makedirs(os.path.dirname(os.path.join(d, n)), exist_ok=True) + open(os.path.join(d, n), 'w').write(data[n] if not os.environ.get('CORRUPT') else data[n].upper()) +""") +os.chmod(stub, 0o755) + +d = os.path.join(t, "dl") +code, out = run("download", man, d, "--hf", stub) +argv = json.load(open(os.path.join(t, "argv"))) +check("download asks hf for the pinned revision and only the manifest's files", + argv[:2] == ["download", "org/model"] and argv[argv.index("--revision") + 1] == "f" * 40 and sorted(argv[2:4]) == sorted(files), argv) +check("download verifies what it got", code == 0 and "2 file(s) verified" in out, out) +check("verify: a good tree passes", run("verify", man, d)[0] == 0) +open(os.path.join(d, "config.json"), "w").write("[]") +code, out = run("verify", man, d) +check("verify: same size, other bytes: refused by sha256", code == 1 and "config.json: sha256 differs" in out, out) +check("verify --sizes: the cheap check does not hash", run("verify", man, d, "--sizes")[0] == 0) +os.remove(os.path.join(d, "a/model.gguf")) +code, out = run("verify", man, d, "--sizes") +check("verify --sizes: a missing file is refused", code == 1 and "a/model.gguf: missing" in out, out) +r = subprocess.run([sys.executable, "-I", TOOL, "download", man, os.path.join(t, "bad"), "--hf", stub], capture_output=True, text=True, env={**os.environ, "CORRUPT": "1"}) +check("download: bytes that differ from the pin fail the step", r.returncode == 1 and "sha256 differs" in r.stderr, r.stderr) +json.dump({**m, "revision": "main"}, open(man, "w")) +check("a manifest without a 40-hex revision is refused", run("verify", man, d)[0] != 0) +for p in sorted(os.listdir(os.path.join(HERE, "..", "..", "deploy", "strix-halo", "pins"))) if os.path.isdir(os.path.join(HERE, "..", "..", "deploy", "strix-halo", "pins")) else []: + q = json.load(open(os.path.join(HERE, "..", "..", "deploy", "strix-halo", "pins", p))) + check(f"pins/{p}: a commit and a sha256 for every file", len(q["revision"]) == 40 and all(len(h) == 64 and n > 0 for n, h in q["files"].values()), q["revision"]) +print(f"{'FAILED' if fails else 'ok'}: {fails} failure(s)") +sys.exit(1 if fails else 0) diff --git a/tools/speech/whisper/rocm/README.md b/tools/speech/whisper/rocm/README.md new file mode 100644 index 00000000..26e4f11b --- /dev/null +++ b/tools/speech/whisper/rocm/README.md @@ -0,0 +1,20 @@ +# Whisper on AMD GPUs (PyTorch ROCm) + +The same worker as the Spark (`../worker.py`, `../whisper_core.py`) with a venv locked to PyTorch's ROCm 7.2 wheels +(torch 2.13.0+rocm7.2, the release the other workers pin). On ROCm `torch.cuda` is the HIP device, so the tool's +`options.device` stays `"cuda"` (or `"auto"`). PyTorch's index publishes no digest for the torch wheel, so its sha256 +(`2ad8066c…`, 6227849000 bytes, hashed from download-r2.pytorch.org on 2026-11-16) was added to `uv.lock` by hand; +`uv sync --locked` refuses any other bytes, and `tools/install/check_hashes.py` (CI) refuses a lock with an unhashed +artifact. + +```sh +UV_PROJECT_ENVIRONMENT=$J/venvs/whisper-rocm uv sync --locked --python 3.12 --project tools/speech/whisper/rocm +python3 -I tools/speech/whisper/fetch_model.py --root $J/models/whisper +``` + +Tool: `"cmd": ["$J/venvs/whisper-rocm/bin/python", "tools/speech/whisper/worker.py"]`, options +`{"device": "cuda", "dtype": "float16", "attn": "sdpa", "vad": "silero", "vad_model": ...}` (or `"vad": "off"`). + +Measured on a Radeon 8060S (gfx1151), 2026-11-15: 73 LibriSpeech dev-clean clips (481 s), WER 4.09% (honorifics +normalized), 17x real time, 373 ms median per clip, 1.6 GiB allocated (2.3 GiB GTT); 9.8 s cold load through the daemon, +0.5 s per short clip warm. diff --git a/tools/speech/whisper/rocm/pyproject.toml b/tools/speech/whisper/rocm/pyproject.toml new file mode 100644 index 00000000..42b1c2b0 --- /dev/null +++ b/tools/speech/whisper/rocm/pyproject.toml @@ -0,0 +1,27 @@ +[project] +name = "localrouter-speech-whisper-rocm" +version = "0.1.0" +description = "Whisper large-v3-turbo speech-to-text worker for LocalRouter's cmd adapter on AMD GPUs (PyTorch ROCm)" +requires-python = "==3.12.*" +dependencies = [ + "torch==2.13.0", # the same release as the Spark and Mac workers, from PyTorch's ROCm 7.2 index + "transformers==5.19.0", + "numpy==2.5.4", + "triton-rocm==3.7.1", # torch's own pin, listed so uv takes it from the ROCm index (a source covers direct dependencies) +] + +[tool.uv] +package = false +# x86_64 Linux with an AMD GPU (ROCm 7.2 wheels; tested on Strix Halo, gfx1151). The worker itself is ../worker.py: +# torch.cuda is ROCm's HIP device, so options.device "cuda" (or "auto") runs it on the GPU. +# UV_PROJECT_ENVIRONMENT=$J/venvs/whisper-rocm uv sync --locked --python 3.12 --project tools/speech/whisper/rocm +environments = ["sys_platform == 'linux' and platform_machine == 'x86_64'"] + +[tool.uv.sources] +torch = [{ index = "pytorch-rocm72" }] +triton-rocm = [{ index = "pytorch-rocm72" }] + +[[tool.uv.index]] +name = "pytorch-rocm72" +url = "https://download.pytorch.org/whl/rocm7.2" +explicit = true diff --git a/tools/speech/whisper/rocm/uv.lock b/tools/speech/whisper/rocm/uv.lock new file mode 100644 index 00000000..df30c9d5 --- /dev/null +++ b/tools/speech/whisper/rocm/uv.lock @@ -0,0 +1,467 @@ +version = 1 +revision = 5 +requires-python = "==3.12.*" +resolution-markers = [ + "platform_machine == 'x86_64' and sys_platform == 'linux'", +] +supported-markers = [ + "platform_machine == 'x86_64' and sys_platform == 'linux'", +] + +[[package]] +name = "annotated-doc" +version = "0.0.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/6e/a61e86e43bb6039b31a33a8f5fba76fe1cdacf3661e7b9756d4ff1b28cdc/annotated_doc-0.0.6.tar.gz", hash = "sha256:7969bb69912085b2285849c0dcac0b4b374fd180c13cf10a87f284ffcf347bbf", size = 10767, upload-time = "2026-11-10T18:17:11.28Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/f5/3dd85d583e55be76cd02b1fc9bbec771b12d63124b01661d9535ccf8721f/annotated_doc-0.0.6-py3-none-any.whl", hash = "sha256:361ca0950cc7082f53fa69e9328409f40a62c61e57e0a47e1825a08078a58a53", size = 5293, upload-time = "2026-11-10T18:17:10.249Z" }, +] + +[[package]] +name = "annotated-types" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893, upload-time = "2026-07-23T20:16:13.995Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" }, +] + +[[package]] +name = "anyio" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/98/7e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2/anyio-4.16.0.tar.gz", hash = "sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb", size = 310971, upload-time = "2026-11-01T11:20:07.282Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/16/7757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a/anyio-4.16.0-py3-none-any.whl", hash = "sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026", size = 134521, upload-time = "2026-11-01T11:20:05.59Z" }, +] + +[[package]] +name = "click" +version = "8.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/37/edbf1b0707709013c0cf2e8317e03d97ed29bf4cac709fe328904ae92a38/click-8.5.1.tar.gz", hash = "sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4", size = 399151, upload-time = "2026-11-06T17:37:01.021Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/7d/164b7ffc8624fe9efb4221bf9af485d5c1e41b9ae118045d2b6dc5457d8b/click-8.5.1-py3-none-any.whl", hash = "sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37", size = 126163, upload-time = "2026-11-06T17:36:59.287Z" }, +] + +[[package]] +name = "filelock" +version = "4.2.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/cf/05bcdacabdc0aec7dc8e19d76281bd82325df62dae3b6430e9ba57397689/filelock-4.2.10.tar.gz", hash = "sha256:fcc3c0cb8bfe7f4b3bb0e231c04b15dbad068cb3c2515f343d8fde4dce93bd5d", size = 670595, upload-time = "2026-11-09T18:58:00.54Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/90/5d0096a325aa0f83ba7a3968bfb485b67e32c947bdf9cd0fcb4b485be718/filelock-4.2.10-py3-none-any.whl", hash = "sha256:9479aaeb4db20b5a53e3da28493edd24720b66b8a0b84030aa56ccdf243d6857", size = 218040, upload-time = "2026-11-09T18:57:59.088Z" }, +] + +[[package]] +name = "fsspec" +version = "2026.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/cd/9be253869fc42e764de7f3dedd6969af7d44ff9c3375214a3442a6f3fc08/fsspec-2026.9.0.tar.gz", hash = "sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe", size = 333545, upload-time = "2026-09-18T17:50:42.825Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", hash = "sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", size = 221738, upload-time = "2026-09-18T17:50:41.341Z" }, +] + +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "hf-xet" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2f/18/d91c20f815df6cc496a5d0ad8db6d274dad5c0cfcd59babfa2440a9aba44/hf_xet-1.8.0.tar.gz", hash = "sha256:10ed23b51dacf7917d64f335c25048deb470efa755e9989b218fc0531386138e", size = 1013014, upload-time = "2026-10-30T10:04:33.741Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/1e/1e8ecc05ef034e9a95c18ed32d2ec07905a7cd2ca611a9d88e25ee1f4850/hf_xet-1.8.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:29dab7c904cd1914a0439c6e1306c12c7497c8bd32290fbe563ebf51ca4b6d6d", size = 4292483, upload-time = "2026-10-30T10:04:22.875Z" }, + { url = "https://files.pythonhosted.org/packages/48/77/886f09e91a5eadb054ce03b8855323cd2a72f20db76ab4119e0ecda65eef/hf_xet-1.8.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1ebaf248c9bef8bb0c9d1d8d71db1fdf0cac14f922cc7a936a81adbf12eb5f01", size = 4500689, upload-time = "2026-10-30T10:04:28.394Z" }, +] + +[[package]] +name = "httpcore2" +version = "2.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "h11" }, + { name = "truststore" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/61/afa9d6b7452f9eca73f73d45324eb0bb52f098fd5e6049bf6b8263be9b4e/httpcore2-2.16.0.tar.gz", hash = "sha256:c72cd0413563b17e1cd8354677dff887466f8ec2551679759e93126534428643", size = 69886, upload-time = "2026-10-21T07:09:45.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/af/c2/ce417c397afa5181f0e3c6ff01a4d01639414e1adef08730d97571297151/httpcore2-2.16.0-py3-none-any.whl", hash = "sha256:5c4358319f2602d984ad93182c9fee5160f22e9da7babdda870a5e7c4e2dc34f", size = 85070, upload-time = "2026-10-21T07:09:42.802Z" }, +] + +[[package]] +name = "httpx2" +version = "2.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpcore2" }, + { name = "idna" }, + { name = "truststore" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/73/5ca2cedf5e4e50423d1c258877865a6b62793633b561c58499f8aeb33b7e/httpx2-2.16.0.tar.gz", hash = "sha256:0d54c98128e8f2ff7fbbde0fca8c359e5f032edeaaaac443cdb7f31f685bcd7f", size = 103116, upload-time = "2026-10-21T07:09:46.348Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/3d/2e4bc4fd1ef9770871669adb348d612a6e4786b303a23f9935b81c48dd60/httpx2-2.16.0-py3-none-any.whl", hash = "sha256:fd2c5d7909e8d86fe92d53020c310ca0e4e431b838c207c5754b9bbf0308d49a", size = 97880, upload-time = "2026-10-21T07:09:44.01Z" }, +] + +[[package]] +name = "huggingface-hub" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "filelock" }, + { name = "fsspec" }, + { name = "hf-xet" }, + { name = "httpx2" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b5/3b/2fcef1eabe52aec90fc8cd253cc154da1d02a446d7bbcdec59b4a51d4be7/huggingface_hub-2.4.0.tar.gz", hash = "sha256:13a6158b9e3393d9d3f248ce99074d50c2a0a1449fb9d8e2f710751e2084c188", size = 1066194, upload-time = "2026-10-29T15:30:12.321Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/55/ff47f1b082ecf5f43f4bc1e3b932d68eead171dabbbd1a92666c686301d7/huggingface_hub-2.4.0-py3-none-any.whl", hash = "sha256:42ecfd93ede47bdd333daebbf66a32d7bfe2e18752754fe4d2d4f98a0179d801", size = 857021, upload-time = "2026-10-29T15:30:10.421Z" }, +] + +[[package]] +name = "idna" +version = "3.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "localrouter-speech-whisper-rocm" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "numpy" }, + { name = "torch" }, + { name = "transformers" }, + { name = "triton-rocm" }, +] + +[package.metadata] +requires-dist = [ + { name = "numpy", specifier = "==2.5.4" }, + { name = "torch", specifier = "==2.13.0", index = "https://download.pytorch.org/whl/rocm7.2" }, + { name = "transformers", specifier = "==5.19.0" }, + { name = "triton-rocm", specifier = "==3.7.1", index = "https://download.pytorch.org/whl/rocm7.2" }, +] + +[[package]] +name = "markdown-it-py" +version = "4.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/16/fc/cee2c45553c9a9bf77d8b0c391560c556d7ed756b1f0bb35eb5d48db09ea/markdown_it_py-4.3.0.tar.gz", hash = "sha256:91a58fa5b72c71a40cf7177250fd767480d7a2bb3ac426ccfb76fb90305fdaaa", size = 242701, upload-time = "2026-11-10T16:18:30.467Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c9/31/5f0ac2f1a1c67423c995c731a11cd4ad05d081a2be969d74f868bdb9cc70/markdown_it_py-4.3.0-py3-none-any.whl", hash = "sha256:7aa1511a46c39138de78d9eba92ce47e63124d8003fc98b3a351909e04239efa", size = 96951, upload-time = "2026-11-10T16:18:28.975Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", size = 22985, upload-time = "2026-10-02T23:04:57.521Z" }, + { url = "https://files.pythonhosted.org/packages/0c/fe/fb1e79be0fea60aa32602ebefc9c35a82bb42b4df157285ab7dfec12341a/markupsafe-3.0.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e", size = 23048, upload-time = "2026-10-02T23:05:04.479Z" }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + +[[package]] +name = "mpmath" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e0/47/dd32fa426cc72114383ac549964eecb20ecfd886d1e5ccf5340b55b02f57/mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f", size = 508106, upload-time = "2023-03-07T16:47:11.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c", size = 536198, upload-time = "2023-03-07T16:47:09.197Z" }, +] + +[[package]] +name = "networkx" +version = "3.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/dc/76/3af777226b63a5e64a6b36b1ec5855c14e2b94a37096d4760e595fc43511/networkx-3.7.tar.gz", hash = "sha256:fd77a511bd90f39f3d016351345b52cf5319b813bdca01de3f755d3cca62e96a", size = 1866482, upload-time = "2026-09-21T16:45:16.974Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/cd/fe58041e9011f307c490e3e17dd48cc516448f7c698a3f2d9d9d65d7e6a8/networkx-3.7-py3-none-any.whl", hash = "sha256:e3fd2c13a7814cee3746340d8d7f8598a67f16a58bf47fb7f8793fab6efca1b0", size = 2142205, upload-time = "2026-09-21T16:45:14.609Z" }, +] + +[[package]] +name = "numpy" +version = "2.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/95/b0/c7453d0b6e2073c3264468b106ee1563750cecc910965e67357e3698c83e/numpy-2.5.4.tar.gz", hash = "sha256:9a94cf751c9ad8ebaa835bcd3d40dacf8534ad086b88c38029b65123c7999d2a", size = 20866315, upload-time = "2026-10-10T20:05:31.422Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/a3/c799c62e19c337e6d3770b08e475887fb30ce8477d3c09efca6b2f0228a6/numpy-2.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fbde6962867ee75b48b0ee29b2b9372ec5d617799dbaf38e82dc0596f2f7738a", size = 16727283, upload-time = "2026-10-10T20:02:53.186Z" }, + { url = "https://files.pythonhosted.org/packages/4a/7a/e8b58a5289a0d464c52885de47c35a935cdd70c03a4c3ab94a5126416dd0/numpy-2.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b89d0aaae2fe498c648f4c4795c084db535af5bd98ef942b2a3681fb74ce8645", size = 18485839, upload-time = "2026-10-10T20:02:59.018Z" }, +] + +[[package]] +name = "packaging" +version = "26.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, +] + +[[package]] +name = "pydantic" +version = "2.14.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b4/fc/1203d011145c98ddce3cd2f505bb54375ef8d43223053df6bfcf3c746f46/pydantic-2.14.3.tar.gz", hash = "sha256:1054f237f4d4733e5a30e1e2333bd33a2004ab9ab1510bd053a9a31bb48e232d", size = 925636, upload-time = "2026-11-05T09:17:04.686Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/72/b8/b864503789ef5c58597d2a7b4adbee62c26440ab1e682581fc6838df8947/pydantic-2.14.3-py3-none-any.whl", hash = "sha256:3f7b347782ab7e4cf4c798496ae3a82787d9f21ec12676a9c564355eeef8daa8", size = 494071, upload-time = "2026-11-05T09:17:02.426Z" }, +] + +[[package]] +name = "pydantic-core" +version = "2.50.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9c/0f/34f9ce4ba701dd0b815033ef94d99b56f66200e578ee6052aa3ac26f064e/pydantic_core-2.50.4.tar.gz", hash = "sha256:aead3b74b68396bf0feab5d57e050b730ded7df55853c1e048a87e00aaf033c6", size = 522249, upload-time = "2026-11-05T09:15:26.774Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/91/23/e0c6e3cd09a0ac809953fea698c816b9f03bf0b35b6820c9553e4f5d85a8/pydantic_core-2.50.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c81d98e27d9d9261909dcccab1ba5d6ea1c98b0bb9470e368604614fd1d36ddd", size = 2261727, upload-time = "2026-11-05T09:12:19.097Z" }, + { url = "https://files.pythonhosted.org/packages/6e/bb/7e44d4ac6e1292f1859384c688713045bdf5448e0635c49c003d2be3bb6c/pydantic_core-2.50.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:219114f8dcdcbe4720d82ef016b1287ce5a0a67d7c69ca61524eb72e82aac344", size = 2498172, upload-time = "2026-11-05T09:12:26.434Z" }, + { url = "https://files.pythonhosted.org/packages/e0/8d/4bfbacaf191f7939893d165e18eb301731fa3366c59a6e57336c4f168fbd/pydantic_core-2.50.4-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bee28aab5a580eec673f7b68dfa8dece3dd37bd207ef8d22fafe23a8e9837296", size = 2279952, upload-time = "2026-11-05T09:15:00.907Z" }, +] + +[[package]] +name = "pygments" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, +] + +[[package]] +name = "regex" +version = "2026.11.15" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cf/e7/67c67920a3b5183388e0853a0a564a4bf60f2dd190a4e7626f5dad2fed62/regex-2026.11.15.tar.gz", hash = "sha256:d6ec7e29e62ebf93ab2a593d1137022b6025497d8610e5cb666d52f9ee5bb0ce", size = 419660, upload-time = "2026-11-15T17:04:15.71Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/2c/d2c9f1c64151745d32b2fc389155cbd2af751c5c41ea634658b7fdcc199a/regex-2026.11.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3758c3b1689ab778f3e1ae0f9aa4d22b8e4efc362e2e4cfdbbc5a208fed0bc1", size = 809168, upload-time = "2026-11-15T17:02:06.631Z" }, + { url = "https://files.pythonhosted.org/packages/19/65/596d7ad62189d9113917dfed33e9e78c16dfbf9c7b60988b0654b64d0735/regex-2026.11.15-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:9a7d15f046e1ea4be447749462ad588effe5fe4c6e26271649385d89767d6e9b", size = 797025, upload-time = "2026-11-15T17:02:14.938Z" }, +] + +[[package]] +name = "rich" +version = "15.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, +] + +[[package]] +name = "safetensors" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/45/06/f955dbbb1859e3bd23c8ac6141af5106e7ad5fedec4a3a6e3d60f94b7001/safetensors-0.8.0.tar.gz", hash = "sha256:fabaf3e0f18a6618d9b36560682562157f77c2b71fcffc7b432be2baed9d753d", size = 325846, upload-time = "2026-06-09T07:52:25.563Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/28/50/f203ff3a3ddfe19308efc83c5a3a29ed02bf786732ec35e68bf9162f3365/safetensors-0.8.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd6f3f93c9a0a7cc2788ee63fb763353d4bd2e89b0751bc78fcf7dda00bea774", size = 516040, upload-time = "2026-06-09T07:52:16.29Z" }, + { url = "https://files.pythonhosted.org/packages/27/43/41c1621732edd934d868a00d1b891584c892a7b62a9aab82ea5a0a5623ee/safetensors-0.8.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:8e080062fcde23be189565e1c3305d16751a218ecf9412c8601e64204eb6f846", size = 722361, upload-time = "2026-06-09T07:52:23.924Z" }, +] + +[[package]] +name = "setuptools" +version = "84.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/b3/c19426f783614d625699a4b247faf628ea9ab1db228674491767b417f9e1/setuptools-84.2.1.tar.gz", hash = "sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc", size = 1230289, upload-time = "2026-10-20T19:01:37.742Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/55/6dc6d6bb953bdfc52519a0059592c52b6e3b8ad51cf8256dffceb55b0610/setuptools-84.2.1-py3-none-any.whl", hash = "sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2", size = 876263, upload-time = "2026-10-20T19:01:35.678Z" }, +] + +[[package]] +name = "shellingham" +version = "1.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" }, +] + +[[package]] +name = "sympy" +version = "1.14.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mpmath" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/83/d3/803453b36afefb7c2bb238361cd4ae6125a569b4db67cd9e79846ba2d68c/sympy-1.14.0.tar.gz", hash = "sha256:d3d3fe8df1e5a0b42f0e7bdf50541697dbe7d23746e894990c030e2b05e72517", size = 7793921, upload-time = "2025-04-27T18:05:01.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a2/09/77d55d46fd61b4a135c444fc97158ef34a095e5681d0a6c10b75bf356191/sympy-1.14.0-py3-none-any.whl", hash = "sha256:e091cc3e99d2141a0ba2847328f5479b05d94a6635cb96148ccb3f34671bd8f5", size = 6299353, upload-time = "2025-04-27T18:04:59.103Z" }, +] + +[[package]] +name = "tokenizers" +version = "0.23.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e0/7c/2cabb2174e772636683008f2c5621949b645da7d303c596589e84516a184/tokenizers-0.23.3.tar.gz", hash = "sha256:cded33237c77caeef62944d32aa9a7ef42bdce2b3497e18d137e072a8c4be438", size = 385286, upload-time = "2026-10-09T10:16:55.759Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/40/6706b82693715581457c6d5423eaa7faae576bb0526c5738a57085eb4449/tokenizers-0.23.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:376851d22bcf9d650a5c3090bb83e6cf9e895fbf0595369fa4cd43c1f69b5f87", size = 3396193, upload-time = "2026-10-09T10:01:05.48Z" }, + { url = "https://files.pythonhosted.org/packages/26/e5/065625317690ea3548d834dad81f48ea1fd32e4964610e658e195d7fe28e/tokenizers-0.23.3-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e05ab7baf7f47b406a95fea6f3b0a484b2ddcd9e1d14b68844c457eb755085a3", size = 10266026, upload-time = "2026-10-09T10:16:33.054Z" }, +] + +[[package]] +name = "torch" +version = "2.13.0+rocm7.2" +source = { registry = "https://download.pytorch.org/whl/rocm7.2" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "jinja2" }, + { name = "networkx" }, + { name = "setuptools" }, + { name = "sympy" }, + { name = "triton-rocm" }, + { name = "typing-extensions" }, +] +wheels = [ + { url = "https://download-r2.pytorch.org/whl/rocm7.2/torch-2.13.0%2Brocm7.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:2ad8066cb9d3c00b2dc77ec5af998eed495e7240e724e8c28124d4d5faba52f0", size = 6227849000, upload-time = "2026-07-08T11:26:11Z" }, +] + +[[package]] +name = "tqdm" +version = "4.70.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" }, +] + +[[package]] +name = "transformers" +version = "5.19.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "huggingface-hub" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "regex" }, + { name = "safetensors" }, + { name = "tokenizers" }, + { name = "tqdm" }, + { name = "typer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/65/4c/70012ed0795235fb6bd7806fafd4a1842f03e49ebbfa3bb9580e451948ce/transformers-5.19.0.tar.gz", hash = "sha256:87f38dd25e4521151b97e94520ac457f44a0ae8a8358a5b112daff6c64a822d6", size = 10032022, upload-time = "2026-10-06T16:39:00.229Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/59/1e7f1212c215c73690ae6cab4678efe1555ff985953e145d88cc212859b0/transformers-5.19.0-py3-none-any.whl", hash = "sha256:afcd2dd5f603ed28c1e1fcb00a338ccbb4ef5f878ed289635df8b58187afb518", size = 12599123, upload-time = "2026-10-06T16:38:56.794Z" }, +] + +[[package]] +name = "triton-rocm" +version = "3.7.1" +source = { registry = "https://download.pytorch.org/whl/rocm7.2" } +wheels = [ + { url = "https://download-r2.pytorch.org/whl/triton_rocm-3.7.1-cp312-cp312-linux_x86_64.whl", hash = "sha256:b200ade2418b8450e4e3e69c33c804e2cc07d1e36dc9678ac8ac1dd65f9e10e1", upload-time = "2026-06-17T17:05:14Z" }, +] + +[[package]] +name = "truststore" +version = "0.10.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/9f/c5201d42a484c061e528825fc8e2d565f5abd50a4ced6fb7d29c4ec99b2b/truststore-0.10.5.tar.gz", hash = "sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd", size = 28091, upload-time = "2026-10-12T22:27:31.808Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/e9/3a7820be2bb0fe53b6bc9c3be26d3d1158004e4c3ab953aa6840b955b1e9/truststore-0.10.5-py3-none-any.whl", hash = "sha256:9aaaedaefaf06d8b206278cf8b5012bc897f485a874503501e12d776df78951c", size = 19017, upload-time = "2026-10-12T22:27:30.377Z" }, +] + +[[package]] +name = "typer" +version = "0.29.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-doc" }, + { name = "pydantic" }, + { name = "rich" }, + { name = "shellingham" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6c/aa/0de7986aa1fa856adb961c67345189b97d13f6e250b34ba68884df865f07/typer-0.29.1.tar.gz", hash = "sha256:ab6eb3880bf67ce96147734717f9ec333c06f66e361f3ea947d0be43da39f242", size = 205843, upload-time = "2026-11-11T09:18:39.782Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/ff/51969745f31cea6bcd12151e668febcf979656316e67a7755942267c1273/typer-0.29.1-py3-none-any.whl", hash = "sha256:00dbc549c13428bec1be55fe1f4d0fb8c6637a310e4f178ef14abe9534ee7b58", size = 121064, upload-time = "2026-11-11T09:18:38.671Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ff/50/0195198eb1d75bab716bb0a813abea4cc394bfa17a92a189f021a34859af/typing_inspection-0.4.5.tar.gz", hash = "sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7", size = 81194, upload-time = "2026-11-04T14:13:23.774Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/0c/ea2544850a7c135e15033a5c7a8e7211136184b7ae63e2239d557c2b3019/typing_inspection-0.4.5-py3-none-any.whl", hash = "sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39", size = 14874, upload-time = "2026-11-04T14:13:22.616Z" }, +]