| name | fetch-model |
| description | Efficiently fetch HuggingFace model data (README, config.json, and optional predecessor config) using parallel curl. Use at the START of any model research task. Invoke with a HF model ID like Qwen/Qwen3.5-397B-A17B, optionally followed by a predecessor ID. |
Fetch Model Data
Fetch all raw model data efficiently using parallel curl. This is a pi-native
helper (pi has no WebFetch tool, so raw files are fetched with curl — which is
also faster and more reliable for HuggingFace/GitHub raw endpoints).
Arguments
The model ID is provided by the user (e.g. Qwen/Qwen3.5-397B-A17B).
Optionally add a predecessor model ID after a space
(e.g. Qwen/Qwen3.5-397B-A17B Qwen/Qwen3-235B-A22B).
Parse the FIRST token as the model ID and the SECOND token (if present) as the
predecessor.
Instructions
- Parse the model ID into
ORG/MODEL.
- Create the output directory
./{ORG}/{MODEL}/.
- Run parallel
curl to fetch all files in ONE Bash call:
MODEL_ID="<first token>"
PREDECESSOR="<second token, if present>"
ORG=$(echo "$MODEL_ID" | cut -d'/' -f1)
MODEL=$(echo "$MODEL_ID" | cut -d'/' -f2)
mkdir -p "./${ORG}/${MODEL}"
curl -sL --max-time 60 -A "Mozilla/5.0" "https://huggingface.co/${MODEL_ID}/raw/main/README.md" > "./${ORG}/${MODEL}/readme_raw.md" &
curl -sL --max-time 60 -A "Mozilla/5.0" "https://huggingface.co/${MODEL_ID}/raw/main/config.json" > "./${ORG}/${MODEL}/config.json" &
if [ -n "$PREDECESSOR" ]; then
curl -sL --max-time 60 -A "Mozilla/5.0" "https://huggingface.co/${PREDECESSOR}/raw/main/config.json" > "./${ORG}/${MODEL}/predecessor_config.json" &
fi
wait
echo "Fetched: readme_raw.md, config.json${PREDECESSOR:+, predecessor_config.json}"
- Report what was fetched and file sizes.
read config.json to identify:
- Architecture type (
architectures / model_type)
- Number of experts (if MoE:
num_experts, n_routed_experts, num_experts_per_tok)
- Attention mechanism (e.g. MLA, GQA, attention config keys)
- Context length (
max_position_embeddings), rope_theta
- Any NOVEL config keys not in standard transformers (these hint at new techniques)
- If a predecessor config was fetched,
diff the two configs to identify what changed:
diff "./${ORG}/${MODEL}/predecessor_config.json" "./${ORG}/${MODEL}/config.json" || true
- Scan
readme_raw.md for arXiv links (pattern: arxiv.org/abs/XXXX.XXXXX or
arxiv.org/html/XXXX.XXXXX) and any blog/GitHub links. List the arXiv IDs
found — do NOT fetch them here (use the fetch-arxiv skill for that).
Output
Report:
- Files saved to
./{org}/{model}/
- Key config fields and any novel keys
- Config differences from predecessor (if provided)
- arXiv paper IDs found in the README (listed, not fetched)