Manage Local Models
Get open-weight models onto the machine, keep them organized, and teach the user
enough to choose well. This skill is acquisition + curation + education; to score
a local model against a workload, use
../run-local-model-lab/SKILL.md.
The habit this skill installs: use a small verified model to prove the local
loop, then choose the workload candidate from task fit, evidence, hardware, and
time. The bootstrap model is not a route recommendation. Skip directly to a
stronger rung when a weak-model sequence would delay the answer; big quality
lives one understudy route away when you need it.
Safety Gates
- No download without explicit approval + a size cap. Always state model,
quantization, and GB on disk first, then confirm. Weights are large; a wrong
pull can fill a disk.
- Background big pulls. Announce the ETA, start the download in the
background, and keep working — do not block the user on a progress bar.
- Gated weights need consent. Gemma (and some others) require accepting a
license and using a Hugging Face token. Walk the user through acceptance; never
print, log, or commit the token. The Ollama path serves Gemma without an HF
token.
- Local-first, no upload. Pulling weights is a download only; nothing about
the user's data leaves the machine.
- Make size/spec/price claims from fresh official sources (HF model cards, the
Ollama library, vendor pages), never from memory — label anything indicative.
Intake
Read ~/.understudy/profile.json for hardware, installed runtimes, and the
user's experience tier (set tone accordingly). Inventory what is already cached
before proposing a download — the best pull is often one they already have. Disk
locations and registry links are in reference.md.
If the Understudy desktop app is running, prefer its daemon. Check
~/.understudy/agent-card.json and trust the app block only after a pid
check on app.pid plus a health probe of <app.base_url>/health
(understudy daemon status does exactly this; then run
understudy desktop capabilities; schema in
../onboard/reference.md). A running app can
start/poll/cancel verified snapshot downloads into the same
~/.understudy/models cache and already serves warm slots
(app.warm_models) and exposes them through understudy desktop chat with
canonical runtime evidence — reuse it instead of spawning your own MLX servers
or a second download of the same weights. The concrete verbs:
understudy desktop model list / model catalog (cached snapshots and the
bundled certified catalog), slot list|add|assign (residency),
download list|start (managed downloads), and chat --slot <id>. If the app
is not installed, it ships as GitHub Releases on
understudylabs/understudy-agent-tools (macOS Apple Silicon .dmg, tags
desktop-v*); the headless CLI covers everything in this skill without it.
Flow
Inventory. List installed runtimes and already-cached models, and report
free disk. (ollama list; Hugging Face cache scan; MLX/LM Studio dirs — see
reference.md.) Surface total disk used by weights.
Separate the bootstrap model from the workload candidate. For onboarding
on Apple Silicon, be prescriptive: start with Understudy's verified
google/gemma-4-e2b-it MLX-VLM 4-bit snapshot as the fast product smoke. It
is not the default workload recommendation. Pick the workload model from task
fit, evidence, hardware, and time; skip directly to a stronger rung when a
small model is unlikely to answer the question. Match goals and hardware to a
tier (full ladder + hardware rule-of-thumb in
reference.md and
../../docs/open-model-spotlight.md):
- Gemma 4 (Google) — verified E2B first; E4B/12B to climb; 26B-MoE / 31B
dense for workstation or remote routes. Strong small-to-mid, multimodal.
- Nemotron 3 (NVIDIA) — Nano 4B as an alternate edge rung; Nano 30B-A3B
(MoE, ~4B-active speed) or Super on big-RAM boxes. Agentic-reasoning, long
context.
Choose source + format for the runtime. Ollama library (simplest, GGUF,
no HF token for Gemma); Hugging Face GGUF (llama.cpp / LM Studio); MLX builds
(Apple Silicon). Quantization/format primer in reference.md.
Confirm the size, then use the CLI pull command. For the Understudy
verified MLX ladder, use the product command after approval:
understudy models pull gemma-4-e2b-it-qat-mlx-vlm-understudy
Use --dry-run first when you need to show destination/log paths without
downloading:
understudy models pull gemma-4-e2b-it-qat-mlx-vlm-understudy --dry-run
To cache every verified snapshot currently listed in the CLI catalog, use:
understudy models pull --all
The command downloads signed per-file URLs from
models.understudylabs.com, writes into ~/.understudy/models, verifies
sizes and hashes when present, and logs progress/ETA to
~/.understudy/agent-tools/logs/model-pull-*.log. For non-Understudy
sources, use the native runtime pull (ollama pull, hf download, LM
Studio) and keep the same approval boundary.
Serve from the manifest, not from memory. Each verified artifact ships an
understudy.serving.json (see references/serving-manifest.md)
encoding the exact launcher, required flags, and prescribed decode. Emit the
correct serve command with the helper rather than hand-specifying flags:
node scripts/serve-understudy-snapshot.mjs --model gemma-4-e2b-it-qat-mlx-vlm-understudy # print the exact command
node scripts/serve-understudy-snapshot.mjs --model gemma-4-e2b-it-qat-mlx-vlm-understudy --exec # spawn it
This is what prevents the recurring config mistakes: a forgotten
--top-logprobs-k 20 (mlx_vlm defaults it to 0 and silently gates
top_logprobs), the wrong sampling (greedy is off-spec for do_sample: true
models), or a mis-wired MTP draft.
Verify + record. Once cached, run a one-line generation to confirm it
loads and does tool calls if the workload needs them. The models directory
plus each snapshot's catalog/serving manifest is the source of truth for
what is installed; you may append an interview-time note to local_models
in the profile (id, runtime, quant, size, date), but never treat that field
as the library index — list the models dir to answer "what do I have?".
Also pre-research and record the recommended serving settings, at pull
time, not at bench time. Read the snapshot's understudy.serving.json
(preferred — it is the machine-readable source of truth) or, if absent,
generation_config.json (sampling: do_sample, temperature,
top_p/top_k, schedules) and the model card's serving guidance, and record
them alongside the model entry in the profile (e.g.
serving: {temperature: 1.0, top_k: 64, top_p: 0.95}). Local servers are not
neutral: MLX servers map an omitted temperature to 0 (greedy), which is
off-spec for every do_sample: true model and breaks diffusion LMs outright.
The pre-researched ladder settings live in
reference.md — check there before serving anything from
the verified ladder.
Curate. Offer to remove superseded or oversized weights to reclaim disk;
show how to relocate the cache to another volume if space is tight
(reference.md).
Point at graduation. When a local model is good but not quite enough, the
path is same family, larger, remote via
../use-understudy-gateway/SKILL.md —
prompts and behavior carry over. Evaluate the gap with
../run-local-model-lab/SKILL.md.
For first-timers, teach as you go: what an open-weight model is, why local is
free and private, what quantization trades away, and why MoE "30B but 3B active"
runs fast. For practitioners, skip it and just name the pick. If the user is
hitting tool-call fidelity problems after quantization (broken JSON, model
stops calling tools), route to
../optimize-local-model-compression/SKILL.md
for the layer-aware compression method and the QAT group-size fix.
Output Standard
End with: runtimes + models already cached and disk used; the recommended pull
(model, quant, GB, source link) and why that tier; download status (backgrounded
- ETA, or cached); profile updated; any approval still pending (gated-weight
license/token, large download); and one recommended next skill/command.
References
reference.md — download locations, registry links, format &
quantization primer, gated-weights/token, disk budgeting & relocation.
../../docs/open-model-spotlight.md —
Gemma 4 & Nemotron 3 variants, benchmarks, and hardware fit.
../optimize-local-model-compression/SKILL.md
— layer-aware compression for tool-calling workloads (the QAT group-size
fix, outcome-optimized calibration, and the stacked method).
1---2name: manage-local-models3description: Use to acquire, cache, organize, and explain local open-weight models — "download a model", "what models do I have", "where did the weights go", "free up model disk", "which Gemma/Nemotron should I pull", "how do open models work". Covers where weights come from and live, formats/quantization, gated weights and HF tokens, disk budgeting, start-small-and-cache, and the local→cloud graduation path. American families (Gemma 4, Nemotron 3). To score a local model on a workload, use run-local-model-lab.4---56# Manage Local Models78Get open-weight models onto the machine, keep them organized, and teach the user9enough to choose well. This skill is acquisition + curation + education; to score10a local model against a workload, use11[`../run-local-model-lab/SKILL.md`](../run-local-model-lab/SKILL.md).1213The habit this skill installs: **use a small verified model to prove the local14loop, then choose the workload candidate from task fit, evidence, hardware, and15time.** The bootstrap model is not a route recommendation. Skip directly to a16stronger rung when a weak-model sequence would delay the answer; big quality17lives one `understudy` route away when you need it.1819## Safety Gates2021- **No download without explicit approval + a size cap.** Always state model,22 quantization, and GB on disk first, then confirm. Weights are large; a wrong23 pull can fill a disk.24- **Background big pulls.** Announce the ETA, start the download in the25 background, and keep working — do not block the user on a progress bar.26- **Gated weights need consent.** Gemma (and some others) require accepting a27 license and using a Hugging Face token. Walk the user through acceptance; never28 print, log, or commit the token. The Ollama path serves Gemma without an HF29 token.30- **Local-first, no upload.** Pulling weights is a download only; nothing about31 the user's data leaves the machine.32- Make size/spec/price claims from fresh official sources (HF model cards, the33 Ollama library, vendor pages), never from memory — label anything indicative.3435## Intake3637Read `~/.understudy/profile.json` for hardware, installed runtimes, and the38user's experience tier (set tone accordingly). Inventory what is already cached39before proposing a download — the best pull is often one they already have. Disk40locations and registry links are in [`reference.md`](reference.md).4142**If the Understudy desktop app is running, prefer its daemon.** Check43`~/.understudy/agent-card.json` and trust the `app` block only after a pid44check on `app.pid` plus a health probe of `<app.base_url>/health`45(`understudy daemon status` does exactly this; then run46`understudy desktop capabilities`; schema in47[`../onboard/reference.md`](../onboard/reference.md)). A running app can48start/poll/cancel verified snapshot downloads into the same49`~/.understudy/models` cache and already serves warm slots50(`app.warm_models`) and exposes them through `understudy desktop chat` with51canonical runtime evidence — reuse it instead of spawning your own MLX servers52or a second download of the same weights. The concrete verbs:53`understudy desktop model list` / `model catalog` (cached snapshots and the54bundled certified catalog), `slot list|add|assign` (residency),55`download list|start` (managed downloads), and `chat --slot <id>`. If the app56is not installed, it ships as GitHub Releases on57`understudylabs/understudy-agent-tools` (macOS Apple Silicon `.dmg`, tags58`desktop-v*`); the headless CLI covers everything in this skill without it.5960## Flow61621. **Inventory.** List installed runtimes and already-cached models, and report63 free disk. (`ollama list`; Hugging Face cache scan; MLX/LM Studio dirs — see64 [`reference.md`](reference.md).) Surface total disk used by weights.652. **Separate the bootstrap model from the workload candidate.** For onboarding66 on Apple Silicon, be prescriptive: start with Understudy's verified67 `google/gemma-4-e2b-it` MLX-VLM 4-bit snapshot as the fast product smoke. It68 is not the default workload recommendation. Pick the workload model from task69 fit, evidence, hardware, and time; skip directly to a stronger rung when a70 small model is unlikely to answer the question. Match goals and hardware to a71 tier (full ladder + hardware rule-of-thumb in72 [`reference.md`](reference.md) and73 [`../../docs/open-model-spotlight.md`](../../docs/open-model-spotlight.md)):74 - **Gemma 4** (Google) — verified E2B first; E4B/12B to climb; 26B-MoE / 31B75 dense for workstation or remote routes. Strong small-to-mid, multimodal.76 - **Nemotron 3** (NVIDIA) — Nano 4B as an alternate edge rung; Nano 30B-A3B77 (MoE, ~4B-active speed) or Super on big-RAM boxes. Agentic-reasoning, long78 context.793. **Choose source + format for the runtime.** Ollama library (simplest, GGUF,80 no HF token for Gemma); Hugging Face GGUF (llama.cpp / LM Studio); MLX builds81 (Apple Silicon). Quantization/format primer in [`reference.md`](reference.md).824. **Confirm the size, then use the CLI pull command.** For the Understudy83 verified MLX ladder, use the product command after approval:84 ```bash85 understudy models pull gemma-4-e2b-it-qat-mlx-vlm-understudy86 ```87 Use `--dry-run` first when you need to show destination/log paths without88 downloading:89 ```bash90 understudy models pull gemma-4-e2b-it-qat-mlx-vlm-understudy --dry-run91 ```92 To cache every verified snapshot currently listed in the CLI catalog, use:93 ```bash94 understudy models pull --all95 ```96 The command downloads signed per-file URLs from97 `models.understudylabs.com`, writes into `~/.understudy/models`, verifies98 sizes and hashes when present, and logs progress/ETA to99 `~/.understudy/agent-tools/logs/model-pull-*.log`. For non-Understudy100 sources, use the native runtime pull (`ollama pull`, `hf download`, LM101 Studio) and keep the same approval boundary.1025. **Serve from the manifest, not from memory.** Each verified artifact ships an103 `understudy.serving.json` (see [`references/serving-manifest.md`](references/serving-manifest.md))104 encoding the exact launcher, required flags, and prescribed decode. Emit the105 correct serve command with the helper rather than hand-specifying flags:106 ```bash107 node scripts/serve-understudy-snapshot.mjs --model gemma-4-e2b-it-qat-mlx-vlm-understudy # print the exact command108 node scripts/serve-understudy-snapshot.mjs --model gemma-4-e2b-it-qat-mlx-vlm-understudy --exec # spawn it109 ```110 This is what prevents the recurring config mistakes: a forgotten111 `--top-logprobs-k 20` (mlx_vlm defaults it to 0 and silently gates112 `top_logprobs`), the wrong sampling (greedy is off-spec for `do_sample: true`113 models), or a mis-wired MTP draft.1146. **Verify + record.** Once cached, run a one-line generation to confirm it115 loads and does tool calls if the workload needs them. The models directory116 plus each snapshot's catalog/serving manifest is the source of truth for117 what is installed; you may append an interview-time note to `local_models`118 in the profile (id, runtime, quant, size, date), but never treat that field119 as the library index — list the models dir to answer "what do I have?".120121 **Also pre-research and record the recommended serving settings, at pull122 time, not at bench time.** Read the snapshot's `understudy.serving.json`123 (preferred — it is the machine-readable source of truth) or, if absent,124 `generation_config.json` (sampling: `do_sample`, `temperature`,125 `top_p`/`top_k`, schedules) and the model card's serving guidance, and record126 them alongside the model entry in the profile (e.g.127 `serving: {temperature: 1.0, top_k: 64, top_p: 0.95}`). Local servers are not128 neutral: MLX servers map an omitted temperature to 0 (greedy), which is129 off-spec for every `do_sample: true` model and breaks diffusion LMs outright.130 The pre-researched ladder settings live in131 [`reference.md`](reference.md) — check there before serving anything from132 the verified ladder.1336. **Curate.** Offer to remove superseded or oversized weights to reclaim disk;134 show how to relocate the cache to another volume if space is tight135 ([`reference.md`](reference.md)).1367. **Point at graduation.** When a local model is good but not quite enough, the137 path is *same family, larger, remote* via138 [`../use-understudy-gateway/SKILL.md`](../use-understudy-gateway/SKILL.md) —139 prompts and behavior carry over. Evaluate the gap with140 [`../run-local-model-lab/SKILL.md`](../run-local-model-lab/SKILL.md).141142For first-timers, teach as you go: what an open-weight model is, why local is143free and private, what quantization trades away, and why MoE "30B but 3B active"144runs fast. For practitioners, skip it and just name the pick. If the user is145hitting tool-call fidelity problems after quantization (broken JSON, model146stops calling tools), route to147[`../optimize-local-model-compression/SKILL.md`](../optimize-local-model-compression/SKILL.md)148for the layer-aware compression method and the QAT group-size fix.149150## Output Standard151152End with: runtimes + models already cached and disk used; the recommended pull153(model, quant, GB, source link) and why that tier; download status (backgrounded154+ ETA, or cached); profile updated; any approval still pending (gated-weight155license/token, large download); and one recommended next skill/command.156157## References158159- [`reference.md`](reference.md) — download locations, registry links, format &160 quantization primer, gated-weights/token, disk budgeting & relocation.161- [`../../docs/open-model-spotlight.md`](../../docs/open-model-spotlight.md) —162 Gemma 4 & Nemotron 3 variants, benchmarks, and hardware fit.163- [`../optimize-local-model-compression/SKILL.md`](../optimize-local-model-compression/SKILL.md)164 — layer-aware compression for tool-calling workloads (the QAT group-size165 fix, outcome-optimized calibration, and the stacked method).