Best for
- Run hosted GRPO/RL training with managed GPU infrastructure
- Train with environments (dataset + harness + rubric) for verifiable rewards
- Do agentic multi-turn training (tool-use, code execution, web browsing)
synthetic-sciences/openscience/backend/cli/skills/ml-training/prime-intellect-lab/SKILL.md
Expert guidance for hosted RL post-training with Prime Intellect Lab — environments, verifiers, GEPA prompt optimization, and agentic training
Decision brief
Expert-level guidance for running reinforcement learning post-training on Prime Intellect's hosted platform. Prime Intellect Lab handles GPU infrastructure, orchestration, and evaluation — you focus on environments, reward signals, and model selection.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/synthetic-sciences/openscience --skill "backend/cli/skills/ml-training/prime-intellect-lab"Inspect the Agent Skill "prime-intellect-lab" from https://github.com/synthetic-sciences/openscience/blob/95be136c06386eb18546ce94d134d2c7e66976ac/backend/cli/skills/ml-training/prime-intellect-lab/SKILL.md at commit 95be136c06386eb18546ce94d134d2c7e66976ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review the “Setup” section in the pinned source before continuing.
Review the “Verify setup” section in the pinned source before continuing.
Review the “Workspace Setup” section in the pinned source before continuing.
Review the “Training Workflow” section in the pinned source before continuing.
Review the “Step 1: Install an Environment” section in the pinned source before continuing.
Permission review
The documentation includes network, browsing, or remote request actions.
curl -LsSf https://astral.sh/uv/install.sh | shThe documentation asks the agent to create, modify, or delete local files.
# Create and enter a workspace directoryThe documentation asks the agent to run terminal commands or scripts.
python3.12 -m venv ~/prime-env && source ~/prime-env/bin/activateEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 3,338 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Expert-level guidance for running reinforcement learning post-training on Prime Intellect's hosted platform. Prime Intellect Lab handles GPU infrastructure, orchestration, and evaluation — you focus on environments, reward signals, and model selection.
Note: Hosted Training is currently in Private Beta. Apply for access at primeintellect.ai if needed.
Use Prime Intellect Lab when you need to:
Do NOT use Prime Intellect Lab for:
| Task | Platform |
|---|---|
| SFT / LoRA fine-tuning | Tinker (default) |
| Hosted RL with environments | Prime Intellect Lab |
| Agentic multi-turn RL | Prime Intellect Lab |
| GEPA prompt optimization | Prime Intellect Lab |
| Local RL with custom rewards | GRPO skill + TRL |
| On-demand GPU clusters | TensorPool |
| Custom compute (serverless) | Modal / Lambda |
An environment in Prime Intellect Lab combines:
Environments are the fundamental unit of training. Each environment defines what the model practices and how it's evaluated. Environments are identified as owner/name (e.g., primeintellect/alphabet-sort).
Prime Intellect's prime rl run orchestrates three components:
You don't manage these directly — prime rl run handles everything.
Pre-built environments available on the platform:
Browse and install environments with prime env list and prime env install.
The verifiers Python library provides building blocks for custom environments:
pip install verifiersGEPA (Genetic-Pareto prompt optimization) is a gradient-free method for refining environment system prompts:
prime gepa run configs/gepa/base.tomlWhen you run prime lab setup, bundled workflow skills are installed at .prime/skills/:
| Skill | Purpose |
|---|---|
| brainstorm | Ideation and planning for training experiments |
| create | Create new custom environments |
| browse | Browse existing environments and resources |
| review | Review environment code and configurations |
| eval | Run evaluations and benchmark models |
| train | Launch and manage training runs |
| GEPA | Automatic prompt optimization workflows |
These skills provide agent-friendly workflows that the openscience CLI can invoke.
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install the Prime CLI
uv tool install prime
# Authenticate
prime login
# Or manually set API key
prime config set-api-key
# Configure SSH key for pod access (optional)
prime config set-ssh-key-path
# Verify setup
prime config view
# Create and enter a workspace directory
mkdir ~/dev/my-lab && cd ~/dev/my-lab
# Initialize the full Lab workspace
prime lab setup
This creates:
configs/
endpoints.toml # OpenAI-compatible API endpoint config
rl/ # Example RL training configs
alphabet-sort.toml
gsm8k.toml
math-python.toml
reverse-text.toml
wiki-search.toml
wordle.toml
eval/ # Example eval configs
minimal.toml
multi-env.toml
gepa/ # GEPA prompt optimization configs
base.toml
wordle.toml
environments/
AGENTS.md # Documentation for AI coding agents
.prime/
skills/ # Bundled workflow skills (brainstorm, create, etc.)
AGENTS.md # Top-level agent documentation
CLAUDE.md # Claude-specific pointer to AGENTS.md
prime lab setup --prime-rl
This additionally clones the prime-rl trainer and sets up dependencies.
# Check if PRIME_API_KEY is set
[ -n "$PRIME_API_KEY" ] && echo "set" || echo "not set"
If connected via the Synthetic Sciences dashboard, PRIME_API_KEY is injected automatically.
# List available environments
prime env list
# Install an environment into your workspace
prime env install primeintellect/alphabet-sort
Before training, establish a baseline:
prime eval run primeintellect/alphabet-sort \
-m Qwen/Qwen3-4B-Instruct-2507 \
-n 20 \
-r 1
Example configs/rl/alphabet-sort.toml:
model = "Qwen/Qwen3-30B-A3B-Instruct-2507"
max_steps = 500
batch_size = 256
rollouts_per_example = 8
[sampling]
max_tokens = 512
[[env]]
id = "primeintellect/alphabet-sort"
args = { min_turns = 3, max_turns = 5, power_per_turn = false }
[wandb]
project = "alphabet-sort"
name = "qwen3-30b-i-alphabet-sort"
# Hosted Training (managed infrastructure)
prime rl run configs/rl/alphabet-sort.toml
# Or self-hosted with prime-rl (on your own GPUs)
uv run prime-rl configs/prime-rl/wiki-search.toml
# Check run status
prime rl status
# Stream logs
prime rl logs --follow
# View on W&B dashboard (if enabled)
# List completed runs
prime rl list
# Download LoRA adapter
prime rl download <run-id> --output ./lora-adapter
# Run post-training evaluation
prime eval run primeintellect/alphabet-sort \
-m Qwen/Qwen3-30B-A3B-Instruct-2507 \
--adapter ./lora-adapter \
-n 100
Full .toml config fields:
# Top-level fields
model = "Qwen/Qwen3-4B-Instruct-2507" # Model from supported list (required)
max_steps = 200 # Total training steps
batch_size = 16 # Prompts per batch
rollouts_per_example = 8 # Completions per prompt (GRPO group size)
[sampling]
max_tokens = 2048 # Max output tokens per rollout
temperature = 0.7 # Sampling temperature for rollouts
top_p = 0.95 # Nucleus sampling
# Environments — use [[env]] (double bracket) for array of environments
[[env]]
id = "primeintellect/alphabet-sort" # Environment ID (required)
args = { min_turns = 3, max_turns = 5 } # Environment-specific arguments
# For multi-environment training, add more [[env]] blocks:
# [[env]]
# id = "primeintellect/gsm8k"
# weight = 0.3
[wandb]
project = "my-project" # W&B project name
name = "run-name" # W&B run name
enabled = true # Enable W&B logging
[eval]
interval = 50 # Eval every N steps
n_samples = 100 # Samples per eval
Important: Use [[env]] (double brackets) for environment config — this is TOML array-of-tables syntax.
| Model | Type | Recommended Use |
|---|---|---|
Qwen/Qwen3-4B-Instruct-2507 | Instruct | Quick iteration, prototyping |
Qwen/Qwen3-4B-Thinking-2507 | Thinking | Reasoning-focused training |
Qwen/Qwen3-30B-Instruct-2507 | Instruct (MoE) | Strong general purpose |
Qwen/Qwen3-30B-Thinking-2507 | Thinking (MoE) | Reasoning at scale |
Qwen/Qwen3-235B-Instruct-2507 | Instruct (MoE) | Frontier-level, agentic tasks |
Qwen/Qwen3-235B-Thinking-2507 | Thinking (MoE) | Frontier reasoning |
PrimeIntellect/INTELLECT-3 | — | Prime Intellect's own model |
Check the latest supported models:
prime models list
GEPA (Genetic-Pareto prompt optimization) refines your environment's system prompt without gradient-based training:
# Run GEPA optimization
prime gepa run configs/gepa/base.toml
Example GEPA config:
environment = "primeintellect/wordle"
model = "Qwen/Qwen3-30B-Instruct-2507"
teacher_model = "Qwen/Qwen3-235B-Instruct-2507"
generations = 10
population_size = 8
n_eval_samples = 50
How it works:
verifierspip install verifiers
# environments/my_math_env.py
from verifiers import Environment, Rubric
class MyMathEnv(Environment):
name = "my-org/math-problems"
def get_dataset(self):
from datasets import load_dataset
ds = load_dataset("openai/gsm8k", "main", split="train")
return [{"prompt": ex["question"], "reference": ex["answer"]} for ex in ds]
def get_rubric(self):
def score(output: str, reference: str) -> float:
try:
pred = float(output.strip().split("####")[-1].strip())
gold = float(reference.strip().split("####")[-1].strip())
return 1.0 if abs(pred - gold) < 1e-6 else 0.0
except (ValueError, IndexError):
return 0.0
return Rubric(score_fn=score)
# Install custom environment
prime env install ./environments/my_math_env.py
# Use in training config
# [[env]]
# id = "my-org/math-problems"
Train on multiple environments by adding multiple [[env]] blocks:
model = "Qwen/Qwen3-30B-Instruct-2507"
max_steps = 500
batch_size = 256
rollouts_per_example = 8
[[env]]
id = "primeintellect/gsm8k"
weight = 0.5
[[env]]
id = "primeintellect/alphabet-sort"
weight = 0.3
[[env]]
id = "primeintellect/reverse-text"
weight = 0.2
[sampling]
max_tokens = 512
Prime Intellect also provides direct GPU provisioning via the Compute API:
# Check GPU availability
prime compute availability
# Provision a GPU pod
prime compute provision --gpu H100 --count 8
# List running pods
prime compute list
# SSH into a pod
prime compute ssh <pod-id>
# Delete a pod
prime compute delete <pod-id>
API endpoints (Bearer token auth via PRIME_API_KEY):
GET /api/v1/availability/gpus — Check availabilityPOST /api/v1/provision-gpu — Provision instancesGET /api/v1/managing-pods — List podsDELETE /api/v1/managing-pods/{pod_id} — Delete podPOST /api/v1/sandbox/create-sandbox-endpoint — Create sandbox1. ModuleNotFoundError: No module named 'prime'
# Install via uv (recommended)
uv tool install prime
# Or in current environment
pip install prime
2. Authentication failed
# Re-authenticate
prime login
# Or manually set key
prime config set-api-key
3. Reward stuck at 0.0
prime eval run <env> -m <model> -n 10sampling.temperatureargs are correct4. Reward stuck at 1.0
5. pydantic version errors
# Prime uses pydantic v2 — create a clean environment
python3.12 -m venv ~/prime-env && source ~/prime-env/bin/activate
pip install prime verifiers
6. Model not available
# Check supported models
prime models list
7. Training OOM (Out of Memory)
batch_size or rollouts_per_examplesampling.max_tokens8. Run stuck in "pending" state
prime rl status --verbose
prime rl cancel <run-id>
9. Environment args not taking effect
[[env]] (double brackets), not [env]When the openscience agent loads this skill for a user task:
PRIME_API_KEY is setprime lab setup if not already initializedprime env list to find matching environments, install with prime env installprime eval runQwen/Qwen3-4B-Instruct-2507 with max_steps=50 firstprime rl estimate --config <config.toml> before launchingprime rl logs --follow to track progressOpenScience.reportUsage() with service="primeintellect"User: "Train a model to solve math problems using RL"
Agent steps:
1. Load skills: prime-intellect-lab, grpo-rl-training
2. Check PRIME_API_KEY is set
3. Set up workspace: mkdir ~/dev/math-rl && cd ~/dev/math-rl && prime lab setup
4. Install env: prime env install primeintellect/gsm8k
5. Baseline eval: prime eval run primeintellect/gsm8k -m Qwen/Qwen3-4B-Instruct-2507 -n 20 -r 1
6. Create config TOML with [[env]] for gsm8k
7. Estimate cost: prime rl estimate --config configs/rl/gsm8k.toml
8. Present estimate to user, wait for approval
9. Launch: prime rl run configs/rl/gsm8k.toml
10. Monitor: prime rl logs --follow
11. Download adapter and run final eval
12. Report usage to OpenScience
For exploratory tasks, use the brainstorm agent skill:
User: "Help me figure out the best approach for RL training on code tasks"
Agent steps:
1. Load prime-intellect-lab skill
2. Set up workspace with prime lab setup
3. The brainstorm skill in .prime/skills/ provides structured ideation
4. Browse available code environments: prime env list
5. Propose experiment plan with environment selection, model choice, config
6. Run small-scale experiments to validate approach
| Command | Description |
|---|---|
prime login | Authenticate with Prime Intellect |
prime config view | Show current configuration |
prime config set-api-key | Manually set API key |
prime models list | List supported models |
prime env list | List available environments |
prime env install <id> | Install environment to workspace |
prime eval run <env> -m <model> | Run evaluation |
prime rl run <config.toml> | Launch hosted RL training |
prime rl status | Check run status |
prime rl logs --follow | Stream training logs |
prime rl list | List completed runs |
prime rl download <id> | Download LoRA adapter |
prime rl cancel <id> | Cancel a run |
prime gepa run <config.toml> | Run GEPA prompt optimization |
prime lab setup | Initialize Lab workspace |
prime lab setup --prime-rl | Set up self-hosted prime-rl |
prime compute availability | Check GPU availability |
prime compute provision | Provision GPU pods |
Frequently asked questions
Expert-level guidance for running reinforcement learning post-training on Prime Intellect's hosted platform. Prime Intellect Lab handles GPU infrastructure, orchestration, and evaluation — you focus on environments, reward signals, and model selection.
The source record exposes this install command: npx skills add https://github.com/synthetic-sciences/openscience --skill "backend/cli/skills/ml-training/prime-intellect-lab". Inspect the command and pinned source before running it.
Static rules flagged network, write-files, exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
garrytan/gbrain
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre