model-selection
Rank pretrained models with TLLib transferability metrics including H-score, regularized H-score, LEEP, NCE, LogME, and TransRate.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-selection
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Rank pretrained models with TLLib transferability metrics including H-score, regularized H-score, LEEP, NCE, LogME, and TransRate.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/model-selection-workflows.md5.9 KB
- 参考文档references/ranking-api-reference.md7.3 KB
- 参考文档references/troubleshooting.md4.6 KB
- 脚本scripts/tllib_ranking_smoke.py4.5 KB
03 SKILL.md 正文
Model Selection Skill
Use this sub-skill when a user wants to choose or rank pretrained models before fine-tuning with TLLib transferability metrics.
Route here for
- Computing H-score or regularized H-score from extracted feature matrices and target labels.
- Computing LogME or TransRate from extracted feature matrices and target labels.
- Computing LEEP from source-class probability predictions and target labels.
- Computing NCE from source-class predicted labels and target labels.
- Deciding which metric is possible from the arrays a user already has: features, target labels, source-head probabilities, logits, or source predicted classes.
- Building a safe CPU smoke check for ranking APIs without downloading datasets or running full feature extraction.
Route elsewhere
- Dataset classes, image-list formats, model factories, transforms, and feature-extraction data/model setup: vision-data-models.
- Fine-tuning or adapting the selected pretrained model after ranking: task-generalization.
- Domain adaptation, self-training, or image translation methods beyond model ranking: use the corresponding sibling sub-skill.
Operating sequence
- Confirm the user has a labeled target ranking subset. TLLib ranking metrics need arrays aligned by sample; they are not unsupervised dataset-selection scores.
- Choose the metric by available inputs:
features+target labels: H-score, regularized H-score, LogME, TransRate.source-class probabilities+target labels: LEEP.source predicted class ids+target labels: NCE.regression features+ continuous targets: LogME withregression=True.
- Validate array shapes and label encoding with ranking API reference before computing scores.
- If features or predictions must be extracted, use vision-data-models for datasets/models and follow the cache/metadata guidance in model selection workflows.
- Interpret scores only within the same target dataset, split, preprocessing, feature layer, and candidate-model set. After selecting a model, route fine-tuning to task-generalization.
- For an installed-package sanity check, run
scripts/tllib_ranking_smoke.pyfrom any directory.
Bundled references
Bundled script
scripts/tllib_ranking_smoke.py: CPU-only synthetic smoke that imports installedtllib, computes all supported ranking metrics on small NumPy arrays, and asserts finite scalar outputs. It does not read datasets, download models, or rely on source checkout files.
Verification status
This sub-skill claims API-level CPU verification for ranking metrics using synthetic arrays. Full dataset feature extraction, pretrained model downloads, and benchmark ranking runs remain user workflow steps and are not bundled as required verification.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).