界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

model_adapter_interface

model_adapter_interface

【开发与工程】Use this skill when you need to wrap a model backend behind loglikelihood, rolling loglikelihood, and generation request methods.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: model_adapter_interface description: Use this skill when you need to wrap a model backend behind loglikelihood, rolling loglikelihood, and generation request methods.

model_adapter_interface

When to use

Use this skill for paper-style language model evaluation harness work where reproducibility depends on explicit task contracts, model-request interfaces, response post-processing, metric aggregation, or an end-to-end auditable run. Do not use it to claim real leaderboard performance without a real model and dataset.

Inputs

  • Small JSON-like task, request, response, or metric records depending on the module.
  • Optional deterministic fake model/data fixtures for bounded validation.
  • A recovery attempt directory when producing experiment evidence.

Outputs

  • Validated Python dictionaries or JSON artifacts with deterministic fields.
  • Clear traces that keep raw responses separate from filtered predictions and scores.

Workflow

  1. Read the task/module contract before executing code.
  2. Validate required fields and fail loudly on incompatible output types or missing metrics.
  3. Preserve raw inputs and produce explicit trace records for downstream modules.
  4. Keep this skill self-contained and avoid reading the original lm-evaluation-harness repository during recovery.
  5. Run the validation command below after edits.

Validation

Run python /share/project/yuyang/workspace/Paper2Skills/Distiller/skills/module-to-skill/scripts/validate_skill_tree.py <skill_dir> --run-tests.

Limitations

These utilities are compact faithful proxies for the harness mechanisms. They are not a replacement for the full upstream package when full-scale benchmark evaluation is required.

我的收藏