agentleFS
hyf020908hyf020908/modelscope-skills/skills/modelscope-local-trainer/SKILL.md

modelscope-local-trainer

Skill4 starsChanged 8 months agoApache-2.0View on GitHub

Turn plain-language local-training requests into editable configs and launch scripts, then run them after the user fills a local config file and replies continue.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants local training on a Linux GPU workstation or server and describes the job in natural language.

    line 8
  2. Very specific:

    Run scripts/prepare_local_training_workspace.py with the user's exact request text.

    line 24
  3. Very specific:

    If the user does not provide a dataset, the script may create a small local example dataset under data/local/<method>/.

    line 31
  4. Very specific:

    Only after the user replies continue, run bash scripts/run_local_training.sh.

    line 39
  5. Distinctive:

    Read the user request and infer method, model, dataset, and training parameters.

    line 48
  6. Very specific:

    Ask the user to review or edit configs/local.required.env.

    line 51
  7. Very specific:

    Only after continue, run bash scripts/run_local_training.sh.

    line 53
  8. Distinctive:

    Keep the generated launch script readable and editable.

    line 59
  9. Distinctive:

    Prefer one process by default unless the user clearly asks for distributed local training.

    line 60
  10. Very specific:

    Never skip the continue gate.

    line 69
  11. Distinctive:

    Never auto-run on macOS or an unknown host.

    line 70
  12. Distinctive:

    Never assume this machine has the right GPU stack without checking.

    line 71
  13. Distinctive:

    Never overwrite an existing launch script without making the new contents explicit in the plan file.

    line 72

≈ “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

ModelScope Local Trainer

Use this skill when the user wants local training on a Linux GPU workstation or server and describes the job in natural language.

Request Style

  • Accept requests such as:
    • Use Qwen/Qwen2.5-0.5B-Instruct on ./datasets/train.jsonl for local SFT, epoch=3, lr=5e-4.
    • 我想在本地 GPU 机器上做 DPO,对齐数据在 ./data/prefs.jsonl。
  • Infer missing fields instead of forcing a rigid template.
  • Default policy:
    • Method: SFT
    • Model: Qwen/Qwen2.5-0.5B-Instruct
    • Train type: LoRA
    • Output: ./outputs/local-<method>

What You Must Create

Run scripts/prepare_local_training_workspace.py with the user's exact request text. It must create:

  1. configs/local.training.plan.json
  2. configs/local.required.env
  3. configs/local.train.env
  4. scripts/run_local_training.sh

If the user does not provide a dataset, the script may create a small local example dataset under data/local/<method>/.

Execution Rule

  • This skill always pauses once before execution.
  • First create configs/local.required.env with non-empty default values.
  • Tell the user to review or edit that file.
  • Tell the user to reply with exactly continue.
  • Only after the user replies continue, run bash scripts/run_local_training.sh.
  • On macOS or any unknown host, stop after writing the files and report that execution should happen on the intended Linux GPU host.

Primary Script

  • scripts/prepare_local_training_workspace.py

Workflow

  1. Read the user request and infer method, model, dataset, and training parameters.
  2. Run scripts/prepare_local_training_workspace.py --request "<user text>".
  3. Inspect the generated plan, configs/local.required.env, and launch script.
  4. Ask the user to review or edit configs/local.required.env.
  5. Tell the user to reply with exactly continue.
  6. Only after continue, run bash scripts/run_local_training.sh.

Command Rules

  • SFT uses swift sft.
  • DPO and GRPO use swift rlhf --rlhf_type dpo|grpo.
  • Keep the generated launch script readable and editable.
  • Prefer one process by default unless the user clearly asks for distributed local training.
  • configs/local.required.env should start with sensible defaults instead of blank placeholders.

References

  • references/runtime_requirements.md

Guardrails

  • Never skip the continue gate.
  • Never auto-run on macOS or an unknown host.
  • Never assume this machine has the right GPU stack without checking.
  • Never overwrite an existing launch script without making the new contents explicit in the plan file.

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.