AGENT SKILL

reward-model

Guide InternLM-XComposer2.5-Reward scoring, ranking, preference data, runnable reward training, LoRA merge, and benchmark workflows.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
reward-model
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Guide InternLM-XComposer2.5-Reward scoring, ranking, preference data, runnable reward training, LoRA merge, and benchmark workflows.
disable-model-invocation
true

02 资源文件 18

03 SKILL.md 正文

Reward Model Sub-skill

Use this sub-skill when the task is specifically about InternLM-XComposer2.5-Reward (IXC-2.5-Reward): scoring one chat, batch scoring, pairwise comparison, ranking candidate answers, validating preference-pair training data, rendering full/LoRA reward training launchers, or planning RewardBench/RM-Bench/VL-RewardBench evaluation.

For ordinary InternLM-XComposer generation, image/video chat, web/article composition, LMDeploy, or Gradio demos, route to the sibling model-inference sub-skill. For supervised non-reward fine-tuning, route to finetuning. For general XComposer benchmark plans that are not reward-model benchmarks, route to evaluation-and-projects.

Operating checklist

  1. Identify the requested reward workflow:
    • API scoring with get_score or get_scores;
    • pairwise preference decision with compare;
    • ranking candidate responses with rank;
    • preference JSON or data.txt manifest validation;
    • full-parameter or LoRA reward training command rendering;
    • RewardBench, RM-Bench, or VL-RewardBench evaluation layout planning.
  2. Collect the minimum inputs before producing commands: model id or checkpoint path, CUDA/GPU budget, chat samples, image paths or text-only marker, hd_num, optional max_length, data/manifest path, output directory, and benchmark data roots.
  3. Load the nearest reference before answering:
    • references/api-reference.md for get_score, get_scores, compare, rank, chat shape, image nesting, hd_num, and rank interpretation;
    • references/data-formats.md for preference-pair JSON, conversations_a/conversations_b, image placeholders, and data.txt sampling semantics;
    • references/training-and-evaluation.md for torchrun/DeepSpeed full/LoRA launchers and RewardBench/RM-Bench/VL-RewardBench layouts;
    • references/troubleshooting.md for ordering mistakes, missing images, filtered bad responses, the documented iinternlm typo, CUDA/model-path failures, and benchmark blockers.
  4. Use bundled helpers for safe local checks and command rendering. They use only Python's standard library and never import torch, transformers, deepspeed, peft, pandas, or benchmark packages:
python scripts/validate_reward_data.py entrypoints/ixc25-reward-training/data.txt --given-num --manifest-base manifest
python scripts/render_reward_training_command.py --mode full --model-path /models/ixc_reward --data-path data.txt --output-dir output/ixc_reward
python scripts/render_reward_training_command.py --mode lora --model-path /models/ixc_reward --data-path data.txt --output-dir output/ixc_reward_lora
  1. For approved reward training or reward LoRA merge, use entrypoints/ixc25-reward-training/ as the self-contained source-derived bundle. It contains finetune.py, trainer.py, data_mix.py, ixc_utils.py, ds_config_zero2.json, launch_full.sh, launch_lora.sh, merge_reward_lora.py, and a small example data/image fixture.

Boundaries

  • Do not download the 7B reward model, benchmark data, VL-RewardBench images, or training data from this sub-skill.
  • Do not launch model inference, torchrun, DeepSpeed, LoRA merging, benchmark inference, or CUDA jobs unless a separate execution-oriented Researcher session has explicit model/data/GPU approval.
  • Do not assume the original source checkout is available. Preserve command shapes, schemas, result signals, and blockers in self-contained guidance.
  • Treat text-only reward calls as image-list-aligned batches with empty image lists ([]) per sample, not as arbitrary generation prompts.

Output expectations

A good response from this sub-skill names the selected reward workflow, validates or states the expected data shape, gives a non-executing command pattern when needed, explains the expected score/rank/result signal, lists CUDA/model/dataset blockers, and routes any non-reward XComposer task to the correct sibling sub-skill.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351