/loom:loom-setupfrom loom
Installs AMD Loom (hrx-loom) from PyPI, GitHub pre-release, or CI wheel, fetches catalog models, and manages loom-serve on GPU/NPU. Use for 'install loom', 'loom-fetch a model', or 'start loom-serve'.
Ships in loom. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Bundled paths ? first shell action. Before running commands, set LOOM_SKILL_DIR in the shell to the
absolute directory containing this SKILL.md, using its path from the skill listing or read tool.
In Claude Code, run export LOOM_SKILL_DIR="${CLAUDE_SKILL_DIR}" (the host substitutes the path).
In Codex, Pi or another host, export LOOM_SKILL_DIR to the loaded file's directory. Use a
shell-compatible absolute path (Git Bash on Windows). Rebind before using another skill's commands
and in every new shell; it is not the working directory or SDK root. On Windows, use native C:/...
paths for file tools; /c/... paths belong to Git Bash. Never run an unresolved placeholder. Run bundled commands by quoted absolute path; do not run scripts/... from the working directory
or change into the installed skill tree. Install the complete Loom suite: sibling paths are required.
Read the loom umbrella skill's hard rules first (memory limits, --pool_backing=fixed / --memory_bytes,
binary approval).
bash "${LOOM_SKILL_DIR}/scripts/install_loom.sh" ~/loom # hrx-loom 0.2.0 from PyPI (wheel sha256 recorded)
bash "${LOOM_SKILL_DIR}/scripts/install_loom.sh" ~/loom 0.1.0 # hrx-loom 0.1.0 from PyPI (packages without an SDK pin)
bash "${LOOM_SKILL_DIR}/scripts/install_loom.sh" ~/loom 0.2.0rc1 # a GitHub pre-release (sha256-verified against its SHA256SUMS)
bash "${LOOM_SKILL_DIR}/scripts/install_loom.sh" ~/loom latest # newest PyPI release
bash "${LOOM_SKILL_DIR}/scripts/install_loom.sh" ~/loom ci-latest # newest main CI wheel (needs gh)
The script:
~/loom/.venv with the pinned wheel (hrx-loom[hf] 0.2.0 from PyPI; the wheel's sha256 is recorded, and with gh the
release commit; a pre-release comes from its GitHub release asset, checked against SHA256SUMS, no gh or token needed), which provides loom-serve,
loom-fetch, loom-test, loom-run, loom-compile, loom-benchmark, loom-opt, loom-format, etc.
(Linux x86-64 glibc ≥ 2.39 and Windows 11 x86-64 wheels; no ROCm SDK needed);ROCm/hrx-loom-library to ~/loom/library and checks out the catalog revision the
SDK names in hrx_loom-*.dist-info/loom.json, so catalog cards and SDK agree;~/loom/.tools, a venv with gguf, numpy, tokenizers, requests, jinja2, fastapi,
uvicorn and httpx for the port, benchmark and UI scripts.Facts:
loom-port-llm templates target one text ABI (text_*_v1
exports). A newer release can change it; then registration fails with a "root symbol … was
not found" error and the templates need the diff of the upstream tiny-text fixture between
the two tags (see loom-port-llm).loom-fetch --list shows the release's compatible catalog.Scripts/. See the loom skill's
Windows section.ci-latest installs an unexpired ROCm/hrx-system main-branch development wheel. Use ci:ARTIFACT_ID
for an explicitly selected build. CI installation needs gh auth status. The installer checks the artifact
identity, checks the archive SHA-256 when GitHub supplies it, and extracts only the matching release wheel.VENV_NAME=.venv-npu install_loom.sh ~/loom ci:12623044407. If that artifact has expired, look for a newer build whose NPU path compiles.A package carries "sdk": {hrx_loom, source (release|pypi|ci), branch, artifact_id, hrx_system_sha, wheel_sha256, expires} in its llm_config.json; a package without a pin means hrx-loom 0.1.0 (PyPI), explicitly, so
the published v0.1.0 cards keep running on it while the installer default is 0.2.0. (A catalog package takes it from its catalog.json.) Every script that installs
Loom for a package calls scripts/ensure_sdk.sh ROOT llm_config.json, which prints the root to use: ROOT when it already is
that wheel, else ROOT-<artifact id | version> (installed from the pinned wheel), so pinned and default SDKs coexist.
LOOM_VERSION set explicitly overrides the pin. A pypi or release pin never expires; CI artifacts expire (~90 days; sdk.expires), and an expired CI pin makes
ensure_sdk.sh fail. Refresh it before then: install_loom.sh ROOT-new ci-latest (or ci:ID), rerun the gates on that SDK, then
python3 scripts/sdk_pin.py stamp ROOT-new FILE for the kit's catalog.json and the published card's llm_config.json
(republish the card; the nightly reads the pin from the card). A PyPI release, once one has the features, replaces the pin.
cd ~/loom && . .venv/bin/activate
loom-fetch --list # the catalog of this SDK (its pinned revision: no checkout needed)
loom-fetch --model moonshine-ai/moonshine-streaming-tiny --preset=streaming --output=models/moonshine --no-input
loom-fetch --model Qwen/Qwen3.8-27B --preset=vision --output=models/qwen27b-vision --no-input --dry-run # size check first
--model ID reads the catalog the installed SDK names (dist-info/loom.json), so a model and its programs always match the
SDK; with --preset omitted a multi-preset card answers preset: select explicitly (N choices).
Notes:
--dry-run prints what would be downloaded. Use it to check sizes against the
memory budget.
Weights come from Hugging Face; the HF cache (~/.cache/huggingface/hub) is reused.
Gated repos need the user to accept the license on the HF page first.
To use your own library checkout instead of the SDK's catalog: loom-fetch library/model/<org>/<name>/model.json ..., and if
fetch complains about a card/lock mismatch add --origin=library=$PWD/library so program sources resolve against it.
A published card fetches by repo: loom-fetch huggingface:loom-fun/REPO[:PRESET] --output=NAME (the revision is resolved and
pinned for you; the [hf] extra, installed by install_loom.sh, provides the Hugging Face client).
Catalog models seen working on Strix Halo:
| Model | Kind | Preset |
|---|---|---|
| Qwen3.8-27B | text + vision | vision |
| moonshine-streaming-tiny | ASR (recognition) | streaming |
| kyutai/pocket-tts | TTS (speech) | streaming |
| krea/Krea-2-Turbo | image | image or image-int8 |
| Qwen3-Embedding-0.6B | embedding (NPU) | embedding |
S="${LOOM_SKILL_DIR}/scripts"
VENV=~/loom/.venv "$S/serve.sh" asr 8100 amdgpu 16000000000 ~/loom/models/moonshine/model.json
VENV=~/loom/.venv "$S/serve.sh" gpu 8100 amdgpu 53687091200 models/a/model.json models/b/model.json -- --parameter_idle_ms=60000
VENV=~/loom/.venv-npu "$S/serve.sh" npu 8101 'xdna://0?columns=8' 4000000000 models/qwen3-embedding/model.json -- --pool_backing=fixed
"$S/stop.sh" asr
serve.sh waits until /v1/status reports every model registration: ready and
checks that its PID owns the port. If it reports failed, it prints the compile
diagnostics and stops the server. Logs, PIDs and ports go in ~/.cache/loom-serve/NAME.{log,pid,port}.
Use unique NAMEs. stop.sh refuses to kill a PID that is not a loom-serve.
Raw form: loom-serve '--device=amdgpu://?completion_spin_ns=4294967295' --listen=127.0.0.1:PORT --model=pkg/model.json --workers=8 --pool_backing=fixed [--preset=NAME] (the card's serving on Strix Halo and the R9700: the preset's context_capacity
KV and the weights are committed up front). The elastic option, for several models sharing one budget: --memory_bytes=N [--parameter_idle_ms=60000] instead of
--pool_backing=fixed (hrx-loom 0.2.0's elastic backing is 5-8 % slower on Strix prefill).
Active wait (the default on amdgpu). serve.sh turns amdgpu into
amdgpu://?completion_spin_ns=4294967295: while GPU work is in flight, Loom's amd-gpu-retire thread spins on the
completion signal instead of parking on the KFD interrupt (one core while busy, 0% CPU when idle). Strix Halo firmware
that ties the data-fabric and memory clocks to CPU activity (SMU 0x0a640600, BIOS 1.12, as on AMD DevLab) otherwise
holds FCLK/UCLK about 20% low while Loom's CPU sleeps, and Loom measures 10-45% slower (memory-bound kernels most).
llama.cpp is never affected: HIP keeps a core busy launching and waiting. With the active wait, energy per token
drops. The value is the SDK's maximum (uint32 nanoseconds, 4.29 s): the spin window restarts at each completion,
so a shorter one parks during multi-second long-prefill submissions. LOOM_ACTIVE_WAIT=0 serve.sh ... is the A/B arm
without it: on 0.2.x it passes --wait_mode=blocking (0.2's own default is an active 1 s window); on 0.1.x the SDK's default
(parked).
curl -s localhost:8100/v1/status | python3 -m json.tool # per model: id, loom.kind, registration, compilation, parameters, status
curl -s localhost:8100/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"<id from status>","messages":[{"role":"user","content":"hi"}],"max_tokens":64}'
Endpoints by loom.kind:
| Kind | Endpoint | Request |
|---|---|---|
text | /v1/chat/completions | Supports streaming and stream_options.include_usage. Reasoning arrives in reasoning_content. |
recognition | /v1/audio/transcriptions | Multipart, audio/pcm;rate=16000;channels=1. |
speech | /v1/audio/speech | Needs input and voice. {"response_format":"pcm"} gives 24 kHz s16le. |
image | /v1/images/generations | {"response_format":"b64_json","size":"512x512"}. |
embedding | /v1/embeddings |
Transcription example. The server takes raw 16 kHz mono s16le PCM:
ffmpeg -loglevel error -i in.wav -ar 16000 -ac 1 -f s16le /tmp/x.pcm
curl -s localhost:8100/v1/audio/transcriptions -F model=moonshine-ai/moonshine-streaming-tiny \
-F "file=@/tmp/x.pcm;type=audio/pcm;rate=16000;channels=1" # -> {"text": "..."}
TTS: curl -s localhost:8100/v1/audio/speech -H 'Content-Type: application/json' -d '{"model":"kyutai/pocket-tts","input":"Hello.","voice":"alba","response_format":"pcm"}' > out.pcm
returns 24 kHz s16le mono. voice is required. Voices are the card's voice/*.wav names
(alba, marius, anna, …). seed is optional.
The model field is the card's model.id, not a file name. Unknown models return
404, and unsupported fields are rejected rather than ignored.
Server behavior:
tokenizer.json; see loom-port-llm.loom/docs/src/serving/workflows/{fetch-and-serve,serve-models,operate-model-server,observe-model-server}.md
in hrx-system.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub loom-fun/loom-skills --plugin loom11 skills in this plugin
/loomEntry point for AMD Loom work (hrx-loom SDK, loom-serve, loom-fetch, Loom IR kernels) on AMD GPUs/NPUs such as Strix Halo — installing, serving catalog models, the demo web UI, porting a new LLM to Loom, optimizing it while preserving correctness, and benchmarking against llama.cpp. Use whenever the user mentions Loom, loom-serve, loom-fetch, hrx-loom, .loom files, or evaluating/porting models for Loom./loom-benchmarkCorrectness and performance methodology for Loom models vs llama.cpp ROCm — golden token-by-token comparison with log-prob near-tie analysis, a multi-turn tool-calling (agent) gate, a native-context admission check, batching consistency, decode/prefill/long-context/concurrency throughput on real-text workloads, and how to report results honestly (tables, executive artifact). Use for "benchmark", "compare with llama.cpp", "is the port correct", "performance report"./loom-demo-uiStart and use the Loom Playground web UI (chat with streaming reasoning and tok/s, ASR with mic recording, TTS, image generation, embedding similarity) that proxies to one or more running loom-serve instances and discovers their models automatically. Use when the user wants a browser demo/UI for Loom models./loom-fleetRuns loom-skills fleet work - a targeted fix to one model, family, GPU or quant (scoped change, sampled DevLab A/B, promotion), a campaign (new GPU, many models, a refactor, regenerating cards), populating or extending a Hugging Face org with new models (pick the top models, port and publish each, sweep gates on DevLab), publishing, staging and promoting regenerated cards, and improving the loom skills themselves against the KPIs with fresh-agent trials. Use for "improve the loom skill", "make the loom skill faster or more reliable", "targeted fix", "campaign", "populate the org", "polish the HF org", "which models still need cards", "regenerate cards", "publish to staging", "fresh-agent trial", or any change to the skills in this repo./loom-kbRouter for the Loom knowledge base - which facts to read for a given model, GPU and task. Run `kb.py route` with a model slug or config, GGUF or arch name plus device and topic, then read exactly the files it prints (device, quant, arch family, facets, topic). Use before porting, optimizing, benchmarking or rooflining any model, when asking "what is special about gemma4 / qwen35moe / flint", "which tricks apply to this model on the R9700", or when adding a model family, facet, device or scope rule to the knowledge base./loom-migrateMigrates the loom-skills kit, fleet of model cards and skills to a new hrx-loom SDK release - research the release, apply the version entry's mechanical steps (IR renames, program ABI, card schema, install/pin), prove the fleet parses and links under the new SDK, A/B the old cards against the new packages on DevLab, publish qualifying cards directly and stage regressions, and record simplifications and optimization opportunities. Holds one entry per adjacent SDK pair (v0.1.0 to v0.2.0 first) and sweep and rewrite scripts. Use for "new Loom SDK", "migrate to hrx-loom X", "SDK upgrade", "port the fleet to a new SDK", "my package fails to parse or load on the new SDK", or "what changed between hrx-loom versions".Other plugins' skills for the same job