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
In this repository15 other files it gives its agents.
- agents/AGENTS.mdAGENTS.md
- modelscope-cliSkill
- modelscope-dataset-explorerSkill
- modelscope-datasetsSkill
- modelscope-evaluationSkill
- gradioSkill
- modelscope-jobsSkill
- modelscope-local-vision-trainerSkill
- modelscope-mcpSkill
- modelscope-model-trainerSkill
- modelscope-paper-publisherSkill
- modelscope-tool-builderSkill
- modelscope-trackingSkill
- modelscope-vision-trainerSkill
- transformers-jsSkill
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
- Distinctive: line 8
Use this skill when the user wants local training on a Linux GPU workstation or server and describes the job in natural language.
- Very specific: line 24
Run scripts/prepare_local_training_workspace.py with the user's exact request text.
- Very specific: line 31
If the user does not provide a dataset, the script may create a small local example dataset under data/local/<method>/.
- Very specific: line 39
Only after the user replies continue, run bash scripts/run_local_training.sh.
- Distinctive: line 48
Read the user request and infer method, model, dataset, and training parameters.
- Very specific: line 51
Ask the user to review or edit configs/local.required.env.
- Very specific: line 53
Only after continue, run bash scripts/run_local_training.sh.
- Distinctive: line 59
Keep the generated launch script readable and editable.
- Distinctive: line 60
Prefer one process by default unless the user clearly asks for distributed local training.
- Very specific: line 69
Never skip the continue gate.
- Distinctive: line 70
Never auto-run on macOS or an unknown host.
- Distinctive: line 71
Never assume this machine has the right GPU stack without checking.
- Distinctive: line 72
Never overwrite an existing launch script without making the new contents explicit in the plan file.
≈ “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.
Files
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>
- Method:
What You Must Create
Run scripts/prepare_local_training_workspace.py with the user's exact request text. It must create:
configs/local.training.plan.jsonconfigs/local.required.envconfigs/local.train.envscripts/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.envwith 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, runbash 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
- Read the user request and infer method, model, dataset, and training parameters.
- Run
scripts/prepare_local_training_workspace.py --request "<user text>". - Inspect the generated plan,
configs/local.required.env, and launch script. - Ask the user to review or edit
configs/local.required.env. - Tell the user to reply with exactly
continue. - Only after
continue, runbash scripts/run_local_training.sh.
Command Rules
SFTusesswift sft.DPOandGRPOuseswift 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.envshould start with sensible defaults instead of blank placeholders.
References
references/runtime_requirements.md
Guardrails
- Never skip the
continuegate. - 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.
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
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.

