Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

slime-user史莱姆使用者

Agent Skill

slime-user 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

188

周安装

8

GitHub Stars

121

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:slime-user(史莱姆使用者)
来源仓库:https://github.com/yzlnew/infra-skills
仓库路径:skills/slime-user
安装命令:
npx skills add https://github.com/yzlnew/infra-skills --skill slime-user
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yzlnew/infra-skills --skill slime-user

简介

slime-user 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于与 SLIME 用户或相关基础设施管理相关的信息整理场景。
  • 通过 npx skills add 命令从 GitHub 安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。
  • 注意该技能当前无详细功能说明,建议进一步查阅源码以了解实际能力边界。

SKILL.md

SLIME User Guide

SLIME is an LLM post-training framework for RL Scaling developed by THUDM. It supports various RL algorithms (GRPO, GSPO, PPO, Reinforce++), multiple training backends (Megatron, FSDP), and advanced features like multi-turn interactions, tool calling, and dynamic sampling.

Quick Start Workflow

For First-Time Users

  1. Environment Setup

- Use Docker: docker pull slimerl/slime:latest - Or build from source: See docs/en/get_started/quick_start.md - Hardware: Supports H100/H200, B200 series

  1. Download Model and Data hf download Qwen/Qwen3-4B --local-dir /root/Qwen3-4B hf download --repo-type dataset zhuzilin/dapo-math-17k --local-dir /root/dapo-math-17k
  2. Convert Weights (Megatron backend only) source scripts/models/qwen3-4B.sh PYTHONPATH=/root/Megatron-LM python tools/convert_hf_to_torch_dist.py \ ${MODEL_ARGS[@]} \ --hf-checkpoint /root/Qwen3-4B \ --save /root/Qwen3-4B_torch_dist
  3. Run Training bash scripts/run-qwen3-4B.sh

For Experienced Users

When user needs specific functionality:

  • Multi-turn/tool calling: Read references/examples_reference.md Search-R1 section
  • Custom reward models: See custom RM pattern in examples reference
  • FSDP instead of Megatron: Use --train-backend fsdp, skip weight conversion
  • Large-scale training: See multi-node examples (GLM-4.5, DeepSeek-R1)
  • Source code exploration: Check references/source_code_reference.md

Documentation Navigation

SLIME has extensive documentation. Use this guide to find what you need quickly.

Essential Documentation (Read These First)

  1. Quick Start Guide: docs/en/get_started/quick_start.md - Setup and first training run
  2. Usage Guide: docs/en/get_started/usage.md - Comprehensive parameter reference
  3. Example Docs: docs/en/examples/qwen3-4B.md or docs/en/examples/glm4-9B.md

For detailed navigation of all documentation, see references/doc_navigation.md.

Common Tasks → Documentation Mapping

TaskDocumentation
First-time setupdocs/en/get_started/quick_start.md
Understanding parametersdocs/en/get_started/usage.md
Basic training (8 GPUs)docs/en/examples/qwen3-4B.md
Multi-turn tool useexamples/search-r1/
Custom generation logicdocs/en/get_started/customization.md
Multi-node trainingdocs/en/examples/glm4.5-355B-A32B.md
FSDP backenddocs/en/get_started/usage.md (FSDP section)
VLM trainingexamples/geo3k_vlm/
Troubleshootingdocs/en/get_started/qa.md

Core Concepts

Training Loop

SLIME uses a "Rollout → Train" loop:

  1. Rollout: Generate responses using SGLang inference
  2. Reward: Compute rewards using reward model
  3. Train: Update model weights using Megatron/FSDP
  4. Repeat for --num-rollout iterations

Key Constraint

rollout-batch-size × n-samples-per-prompt = global-batch-size × num-steps-per-rollout

Resource Allocation Modes

Colocated (training and inference share GPUs):

--actor-num-nodes 1 \
--actor-num-gpus-per-node 8 \
--colocate \
--sglang-mem-fraction-static 0.7

Disaggregated (separate GPUs for training/inference):

--actor-num-nodes 1 \
--actor-num-gpus-per-node 4 \
--rollout-num-gpus 4

Parameter Quick Reference

Essential Parameters

Model Loading:

  • --hf-checkpoint: HuggingFace model path (for SGLang and FSDP)
  • --ref-load: Megatron reference model checkpoint
  • --load: Megatron actor checkpoint (resume training)
  • --save: Save path for checkpoints

Data:

  • --prompt-data: JSONL dataset path
  • --input-key: Field name for prompts (default: "prompt")
  • --label-key: Field name for labels (default: "label")
  • --metadata-key: Field name for metadata (default: "metadata")
  • --apply-chat-template: Apply tokenizer chat template

Rollout:

  • --rollout-batch-size: Prompts per rollout
  • --n-samples-per-prompt: Responses per prompt
  • --rollout-max-response-len: Max response length
  • --rollout-temperature: Sampling temperature

Training:

  • --num-rollout: Total training iterations
  • --num-steps-per-rollout: Optimizer steps per rollout (default: 1)
  • --global-batch-size: Samples per optimizer step
  • --advantage-estimator: RL algorithm (grpo, gspo, ppo, reinforce_plus_plus)

Reward Model:

  • --rm-type: Built-in RM type (e.g., "deepscaler")
  • --custom-rm-path: Custom RM function path

Backends:

  • --train-backend: Training backend (megatron or fsdp)
  • --rollout-num-gpus-per-engine: GPUs per SGLang engine (like tp_size)

For complete parameter reference, see docs/en/get_started/usage.md.

Common Workflows

1. Standard Single-Turn Training

Use example scripts as templates:

  • scripts/run-qwen3-4B.sh: Basic 8xH100 setup
  • scripts/run-glm4-9B.sh: With dynamic sampling

Key sections in script:

# Load model config
source scripts/models/qwen3-4B.sh

# Configure checkpoints
CKPT_ARGS=(--hf-checkpoint /root/Qwen3-4B ...)

# Configure rollout
ROLLOUT_ARGS=(
  --rollout-batch-size 32
  --n-samples-per-prompt 8
  --rm-type deepscaler
)

# Configure algorithm
GRPO_ARGS=(--advantage-estimator grpo ...)

# Run training
ray job submit ... -- python3 train.py \
  ${MODEL_ARGS[@]} ${CKPT_ARGS[@]} ${ROLLOUT_ARGS[@]} ...

2. Multi-Turn Tool Calling

For multi-turn scenarios (like Search-R1):

  1. Prepare Data with metadata: {"question": "User query", "final_answer": "Expected answer", "metadata": "{\"session_id\": \"123\", \"tool_code\": \"...\"}"}
  2. Implement Custom Generation Function: async def generate(args, sample: Sample, sampling_params) -> Sample: for turn in range(max_turns): # Generate action model_output = await call_sglang(...) sample.loss_mask += [1] * len(model_tokens) # Train on actions # Execute tool tool_output = await execute_tool(...) sample.loss_mask += [0] * len(tool_tokens) # Mask tool outputs if action == "answer": break sample.tokens = prompt_tokens + response_tokens sample.response_length = len(response_tokens) return sample
  3. Configure Custom Functions: --custom-generate-function-path my_module.generate \ --custom-rm-path my_module.reward_func \ --metadata-key metadata

See examples/search-r1/ for complete example.

3. Dynamic Sampling (DAPO-style)

Filter low-quality samples during generation:

ROLLOUT_ARGS+=(
  --over-sampling-batch-size 64 \
  --rollout-batch-size 32 \
  --dynamic-sampling-filter-path \
    slime.rollout.filter_hub.dynamic_sampling_filters.check_reward_nonzero_std
)

How it works:

  • Samples 64 prompts (over-sampling)
  • Filters groups based on reward diversity
  • Keeps only 32 prompts × 8 samples that pass filter
  • Automatically resamples if too many filtered out

4. FSDP Backend (No Weight Conversion)

--train-backend fsdp \
--hf-checkpoint /root/Qwen3-4B \
--gradient-checkpointing \
--context-parallel-size 2

Benefits:

  • No HF → Megatron weight conversion needed
  • Directly load HuggingFace checkpoints
  • Simpler setup for supported models

See examples/geo3k_vlm/ and docs/en/get_started/usage.md FSDP section.

5. Multi-Node Training

  1. Start Ray cluster: # Head node ray start --head --node-ip-address ${MASTER_ADDR} --num-gpus 8 # Worker nodes ray start --address=${MASTER_ADDR}:6379 --num-gpus 8
  2. Submit job: ray job submit --address="http://127.0.0.1:8265" \ --runtime-env-json='{"env_vars": {"PYTHONPATH": "/root/Megatron-LM/"}}' \ -- python3 train.py \ --actor-num-nodes 8 \ --actor-num-gpus-per-node 8 \...

See docs/en/examples/glm4.5-355B-A32B.md for large-scale example.

Customization Guide

Custom Reward Model

Implement async function:

async def my_reward_func(args, sample: Sample, **kwargs) -> float:
    # Access sample fields
    prompt = sample.prompt
    response = sample.response
    label = sample.label

    # Compute reward
    reward = compute_score(response, label)
    return float(reward)

Use with: --custom-rm-path module.path:my_reward_func

Custom Generation Function

Implement async function:

async def my_generate(args, sample: Sample, sampling_params) -> Sample:
    # Load tokenizer
    from slime.utils.processing_utils import load_tokenizer
    tokenizer = load_tokenizer(args.hf_checkpoint, trust_remote_code=True)

    # Generate response (call SGLang API or custom logic)
    from slime.utils.http_utils import post
    output = await post(
        f"http://{args.sglang_router_ip}:{args.sglang_router_port}/generate",
        {"text": sample.prompt, "sampling_params": sampling_params}
    )

    # Set sample fields
    prompt_tokens = tokenizer(sample.prompt, add_special_tokens=False)["input_ids"]
    response_tokens = tokenizer(output["text"], add_special_tokens=False)["input_ids"]

    sample.tokens = prompt_tokens + response_tokens
    sample.response_length = len(response_tokens)
    sample.response = output["text"]
    sample.truncated = output["meta_info"]["finish_reason"]["type"] == "length"

    return sample

Use with: --custom-generate-function-path module.path:my_generate

Custom Dynamic Filter

Implement filter function:

def my_filter(args, samples: list[Sample], **kwargs) -> bool:
    # Return True to keep samples, False to discard
    return all(sample.reward > 0.5 for sample in samples)

Use with: --dynamic-sampling-filter-path module.path:my_filter

Examples Reference

For detailed examples and patterns, see references/examples_reference.md.

Quick finder:

  • Basic math training: scripts/run-qwen3-4B.sh
  • Multi-turn tool use: examples/search-r1/
  • Vision-language RL: examples/geo3k_vlm/
  • Large-scale MOE: docs/en/examples/glm4.5-355B-A32B.md
  • Custom generation: examples/search-r1/search_r1_logic.py
  • FSDP backend: examples/geo3k_vlm/

Source Code Reference

For source code exploration, see references/source_code_reference.md.

Key files:

  • Arguments: slime/utils/arguments.py
  • Rollout: slime/rollout/sglang_rollout.py
  • Sample type: slime/utils/types.py
  • Reward models: slime/rollout/rm_hub/
  • Conversion tools: tools/convert_hf_to_torch_dist.py

Troubleshooting

Common Issues

OOM during colocated training:

  • Reduce --sglang-mem-fraction-static (try 0.7 or 0.6)
  • Reduce --max-tokens-per-gpu
  • Enable gradient checkpointing: --recompute-granularity full

Mismatched batch sizes:

  • Ensure: rollout-batch-size × n-samples-per-prompt = global-batch-size × num-steps-per-rollout

Weight conversion errors:

  • Check model config matches exactly (e.g., --rotary-base)
  • Use FSDP backend to skip conversion: --train-backend fsdp

Multi-node communication issues:

  • Set environment variables: GLOO_SOCKET_IFNAME, NCCL_SOCKET_IFNAME
  • See docs/en/get_started/quick_start.md multi-node section

SGLang concurrency issues:

  • Limit concurrency: --sglang-server-concurrency 160
  • Increase CUDA graphs: --sglang-cuda-graph-bs 1 2 4 8 $(seq 16 8 256)

For more troubleshooting, see docs/en/get_started/qa.md.

Additional Resources

Reference Files

External Links

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

28.57%
按下载量换算19

trae

23.81%
按下载量换算16

OpenCode

15.78%
按下载量换算10

Codex

11.17%
按下载量换算7

Claude Code

7.81%
按下载量换算5

Antigravity

3.5%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills