Skip to content
Machine Learning
Skill

/model-factory

Launch and monitor prime-rl runs on Model Factory with prime train, and retrieve their traces. Use for requests such as "run this on model factory", including custom code revisions, private datasets, credentials, and team setup. Explicit local or SLURM jobs use start-run.

BOOST
From plugin
prime-rl
2.2k10 skills
Install
$ npx -y skills add primeintellect-ai/prime-rl --skill model-factory --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/model-factory

Context preview

The summary Claude sees to decide when to auto-load this skill.

Launch and monitor prime-rl runs on Model Factory with prime train, and retrieve their traces. Use for requests such as "run this on model factory", including custom code revisions, private datasets, credentials, and team setup. Explicit local or SLURM jobs use start-run.

SKILL.md

model-factory.SKILL.md
name: model-factory
description: Launch and monitor prime-rl runs on Model Factory with prime train, and retrieve their traces. Use for requests such as "run this on model factory", including custom code revisions, private datasets, credentials, and team setup. Explicit local or SLURM jobs use start-run.

Model Factory

Use `prime train run CONFIG.toml` for managed training. `prime train CONFIG.toml` is the same command. The platform provisions and launches the components. Pass a single TOML filename directly; `@`, local `uv run rl` / `uv run sft`, and arbitrary dotted training flags belong to the local entrypoints. Put training overrides in the TOML. An explicit request to submit a SLURM job on a Model Factory cluster still uses the [start-run skill](../training/start-run/SKILL.md).

All local paths below are relative to the selected prime-rl checkout. Discover the user's checkout, credentials, team, and available CLI; do not assume a home directory, secret-file location, organization, GPU type, or previous run.

CLI, authentication, and team

command -v prime
prime --version
prime train run --help

Install a missing CLI with `uv tool install prime`; update an existing tool with `uv tool upgrade prime` when a required feature needs it. Check which executable the shell resolves: a project environment can shadow the tool installation.

Authenticate with `prime login`, an existing exported `PRIME_API_KEY`, or the secure prompt from `prime config set-api-key`. For automation, load the key from the user's chosen secret store into the process environment. Do not put its value in command arguments, TOML, Git, or chat. A file on disk is not automatically exported. The [CLI config implementation](https://github.com/PrimeIntellect-ai/prime/blob/main/packages/prime/src/prime_cli/core/config.py) gives `PRIME_API_KEY` and nonempty `PRIME_TEAM_ID` precedence over saved settings.

For an API-key workflow, after loading the key securely:

: "${PRIME_API_KEY:?Load a Prime API key for the launching account}"
export PRIME_API_KEY

Inspect the effective account configuration and available teams:

prime config view --plain
prime teams list --plain -o json

`config view` masks the API key. Reuse the account/team the user selected; if the intended owner is ambiguous, resolve it before launching billable work. Set the chosen team ID from that list with `prime config set-team-id "$TEAM_ID"`, or use `export PRIME_TEAM_ID="$TEAM_ID"` for the current process. An exported team ID overrides `set-team-id`. To intentionally use a personal account, unset `PRIME_TEAM_ID` and use `prime config remove-team-id`. Team choice also scopes volumes and run access. See [CLI configuration](https://docs.primeintellect.ai/cli-reference/config-cli) and [teams](https://docs.primeintellect.ai/cli-reference/teams).

The launching credential and the remote run credential have different roles: the platform supplies a run-scoped `PRIME_API_KEY` to the Model Factory job. Do not include the launching key in `-e` or `--env-file`. Read [data and secrets](references/data-and-secrets.md) before forwarding credentials or using private Hugging Face data.

Choose the source and a checked-in example

For custom training code, branches, commits, dependencies, or environments, read [custom code](references/custom-code.md) first. Select the runtime revision before adapting or validating its config.

Start from an existing example in that revision, copying it to a task-specific TOML if edits are needed. Do not use personal debug configs or prior experiment artifacts as the default recipe.

| Task | Starting point | | --- | --- | | Small RL run | [examples/basic/reverse-text/rl.toml](../../examples/basic/reverse-text/rl.toml) | | SFT | [examples/basic/reverse-text/sft.toml](../../examples/basic/reverse-text/sft.toml) | | Larger model or environment | Select a matching checked-in TOML under [examples/advanced](../../examples/advanced) |

prime train models --plain -o json
prime train gpus --plain -o json

Use the exact model ID and GPU type available for the selected account/team. The [Model Factory RL docs](https://docs.primeintellect.ai/hosted-training/hosted-rl) describe uncached HF downloads on on-demand capacity, while reserved clusters require cached weights or weights on a volume. Check the actual dispatch path; an `HF_TOKEN` grants repository access, not cluster capacity or model-cache access.

Adapt the example to the requested experiment:

  • Remove SLURM configuration and machine-local `output_dir` / `run.dir` paths.

Put prompts and other required assets in the launched source or a supported volume. A path in TOML does not upload the file.

  • Set `[deployment]` explicitly, including trainer and inference GPU counts.

Check TP/DP/EP/CP and context length against the model, hardware, and schema. Preserve `optimization_dtype` and `reduce_dtype` unless explicitly requested.

  • Use the revision's `[run]` and `[monitors.wandb]` schema for names and logging;

consult the [configs skill](../configs/SKILL.md) for config structure. The selected revision's schema takes precedence over snippets from another build.

  • Keep RL train/eval sources separate under `orchestrator.train.source` and

`orchestrator.eval.source`. Dataset arguments belong to the selected taskset's config under `env.taskset`; inspect its supported fields before setting them.

  • SFT uses `[data]` and needs real data staged on a volume. The checked-in SFT

example also enables online eval; check CLI and cluster support before using it. See [data and secrets](references/data-and-secrets.md) for both paths.

  • Keep `[ckpt]` and attach a named volume when checkpoints must persist. Choose

its size for the dataset, model, and retained checkpoints; see [volume sizing](https://docs.primeintellect.ai/hosted-training/volume-capacity).

Validate and dispatch

If `prime train validate --help` is available, use that com

Read more
Ships withprime-rl

Agentic RL Training at Scale

Get the whole plugin
Stats
2,199
Stars
479
Forks
Active
Maintenance
Python
Language
Apache-2.0
License
30m ago
Last commit
1y ago
Created
20d ago
Added

Repo: primeintellect-ai/prime-rl

Other skills on prime-rl.