一键导入
inference-server
Start and test the prime-rl inference server. Use when asked to run inference, start vLLM, test a model, or launch the inference server.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Start and test the prime-rl inference server. Use when asked to run inference, start vLLM, test a model, or launch the inference server.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
How to write and use TOML configs in prime-rl. Use when creating config files, running commands with configs, or overriding config values via CLI.
How to install prime-rl and its optional dependencies. Use when setting up the project, installing extras like deep-gemm for FP8 models, or troubleshooting dependency issues.
| name | inference-server |
| description | Start and test the prime-rl inference server. Use when asked to run inference, start vLLM, test a model, or launch the inference server. |
Always use the inference entry point — never vllm serve or python -m vllm.entrypoints.openai.api_server directly. The entry point runs setup_vllm_env() which configures environment variables (LoRA, multiprocessing) before vLLM is imported.
# With a TOML config
uv run inference @ path/to/config.toml
# With CLI overrides
uv run inference --model.name Qwen/Qwen3-0.6B --model.max_model_len 2048 --model.enforce_eager
# Combined
uv run inference @ path/to/config.toml --server.port 8001 --gpu-memory-utilization 0.5
The inference entrypoint supports optional SLURM scheduling, following the same patterns as SFT and RL.
# inference_slurm.toml
output_dir = "/shared/outputs/my-inference"
[model]
name = "Qwen/Qwen3-8B"
[parallel]
tp = 8
[slurm]
job_name = "my-inference"
partition = "cluster"
uv run inference @ inference_slurm.toml
Each node runs an independent vLLM instance. No cross-node parallelism — TP and DP must fit within a single node's GPUs.
# inference_multinode.toml
output_dir = "/shared/outputs/my-inference"
[model]
name = "PrimeIntellect/INTELLECT-3-RL-600"
[parallel]
tp = 8
dp = 1
[deployment]
type = "multi_node"
num_nodes = 4
gpus_per_node = 8
[slurm]
job_name = "my-inference"
partition = "cluster"
Add dry_run = true to generate the sbatch script without submitting:
uv run inference @ config.toml --dry-run true
The server extends vLLM with:
/v1/chat/completions/tokens — accepts token IDs as prompt input (used by multi-turn RL rollouts)/update_weights — hot-reload model weights from the trainer/load_lora_adapter — load LoRA adapters at runtime/init_broadcaster — initialize weight broadcast for distributed trainingcurl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-0.6B",
"messages": [{"role": "user", "content": "Hi"}],
"max_tokens": 50
}'
src/prime_rl/entrypoints/inference.py — entrypoint with local/SLURM routingsrc/prime_rl/inference/server.py — vLLM env setupsrc/prime_rl/configs/inference.py — InferenceConfig and all sub-configssrc/prime_rl/inference/vllm/server.py — FastAPI routes and vLLM monkey-patchessrc/prime_rl/templates/inference.sbatch.j2 — SLURM template (handles both single and multi-node)configs/debug/infer.toml — minimal debug config