agentleFS
hemapriyan-rkhemapriyan-rk/claude-rigor-skills/skills/ml-model-selection/SKILL.md

ml-model-selection

Skill1 starsChanged 50 days agoMITView on GitHub

Choose the right ML model architecture, size, and family for a task given real constraints — latency ceiling, accuracy floor, compute/memory budget, and deployment target (cloud vs. edge/on-device) — instead of defaulting to the largest or most fashionable model. Use whenever picking a model for a new pipeline, or reconsidering one that's too slow, expensive, or large for its actual deployment target.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the best-fit model still exceeds budget, check what quantization or distillation actually does to the accuracy floor before assuming "it …

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ML Model Selection

Picking the largest available model and calling it a safety margin is picking on vibes, not evidence. This skill forces the constraints to be numbers first, and treats "biggest that fits" as a real trade-off decision, not a default.

Step 1 — State constraints as numbers before looking at any model

Latency ceiling, accuracy floor, and compute/memory budget. If the deployment target is edge or on-device, tie the budget to the embedded-constrained-coding skill's numbers (actual RAM/flash/power figures for the target) rather than assuming cloud-class headroom. State plainly if the target simply can't run a large model at all — that rules out entire classes before wasting time evaluating them.

Step 2 — Don't default to the largest or newest model

State the actual task complexity: does this problem genuinely need a large general-purpose model, or does a smaller, specialized/fine-tuned model already clear the accuracy floor at a fraction of the cost? A model that clears the bar by far more than the floor requires isn't a safety margin — it's wasted latency and compute budget that has to be paid on every inference.

Step 3 — Check what's actually available at the target size

Consider smaller open models, distilled variants, and — for a well-structured problem — a classical (non-deep-learning) baseline that might already clear the accuracy floor. A classical model hitting 90% of the target metric at 1% of the compute is often the right call, not the lesser one; don't dismiss it just because it's less fashionable.

Step 4 — Quantization/distillation fit, checked not assumed

If the best-fit model still exceeds budget, check what quantization or distillation actually does to the accuracy floor before assuming "it should still be fine" — this needs the same measured verification embedded-constrained-coding requires, not an estimate.

Step 5 — Verify against data that matches the real deployment distribution

Evaluate on a held-out set drawn from the actual deployment distribution, not just the benchmark the model is famous for. A model selected on a benchmark score that doesn't reflect the real input distribution (sensor noise, population, environment) is a decision made on the wrong evidence — this is the same distribution-match check the dataset-sourcing skill runs, applied here to model evaluation instead of dataset choice.

Output

# Model selection: [task]
## Constraints (latency / accuracy / compute-memory budget / deployment target)
## Candidates (2-3), each with: accuracy, latency, memory, cost against a matching-distribution eval
## Recommendation, and the specific reason the runner-up(s) were rejected

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.