133 lines
3.4 KiB
TOML
133 lines
3.4 KiB
TOML
# v1 RL: GLM-4.5-Air (100B MoE) on the v1 `scaleswe-v1` SWE taskset, rlm harness on a prime sandbox
|
|
# runtime; eval on SWE-Bench Verified. Router replay is enabled (trainer.enable_router_replay replays
|
|
# the routed-expert decisions returned by inference via enable_return_routed_experts) — GLM-4.5-Air is
|
|
# a glm4_moe model, which supports routed_experts.
|
|
#
|
|
# GRPO uses the linear length penalty with the input-token and turns coefficients set to 0.1. Each
|
|
# term is pass_rate-scaled and normalized by the group's own max before the GRPO baseline
|
|
# subtraction.
|
|
#
|
|
# 2 train + 4 infer nodes. Trainer uses cp=4 (ulysses) plus
|
|
# the memory improvements from the GLM-5.1 prod run (research-prod rlm5/prod.toml): LM-head token
|
|
# chunking, activation checkpointing (freq=1) + activation offloading (max_inflight=1), optimizer
|
|
# CPU offload, and skip-gather / skip-optimizer checkpointing.
|
|
|
|
max_steps = 1000
|
|
seq_len = 131072
|
|
|
|
# Redirect compile/JIT caches to node-local /tmp (per user + job) to avoid
|
|
# slow/contended shared-FS caches and FS lock deadlocks.
|
|
[env_vars]
|
|
TRITON_CACHE_DIR = "/tmp/.triton-cache"
|
|
|
|
[slurm]
|
|
job_name = "glm45air-swe"
|
|
partition = "all"
|
|
# Clean up this run's orphaned prime sandboxes before launch (hardcoded label, matches the harness labels below).
|
|
pre_run_command = 'timeout 120 prime sandbox delete --label "glm45air-swe" -y || true'
|
|
|
|
[deployment]
|
|
type = "multi_node"
|
|
num_train_nodes = 2
|
|
num_infer_nodes = 1
|
|
num_infer_replicas = 4
|
|
|
|
[wandb]
|
|
project = "swe-ablations"
|
|
name = "glm45air-scaleswe"
|
|
|
|
[weight_broadcast]
|
|
type = "nccl"
|
|
timeout = 3600
|
|
|
|
[ckpt]
|
|
interval = 50
|
|
keep_last = 1
|
|
resume_step = -1
|
|
|
|
[model]
|
|
name = "zai-org/GLM-4.5-Air"
|
|
|
|
# --- Trainer ---
|
|
|
|
[trainer]
|
|
dist_timeout_seconds = 3600
|
|
enable_router_replay = true
|
|
|
|
[trainer.model]
|
|
impl = "custom"
|
|
attn = "flash_attention_3"
|
|
cp = 4
|
|
cp_style = "ulysses"
|
|
fused_lm_head_token_chunk_size = 1024
|
|
optim_cpu_offload = true
|
|
|
|
[trainer.model.ac]
|
|
|
|
[trainer.model.ac_offloading]
|
|
max_inflight_activations = 1
|
|
|
|
[trainer.model.compile]
|
|
|
|
[trainer.ckpt]
|
|
skip_gather_master_weights = true
|
|
skip_optimizer = true
|
|
|
|
[trainer.optim]
|
|
type = "muon"
|
|
|
|
# --- Orchestrator ---
|
|
|
|
[orchestrator]
|
|
batch_size = 256
|
|
group_size = 16
|
|
max_off_policy_steps = 32
|
|
max_inflight_rollouts = 512
|
|
|
|
[orchestrator.algo]
|
|
type = "grpo"
|
|
|
|
[orchestrator.algo.length_penalty]
|
|
type = "linear"
|
|
num_output_tokens_weight = 0.0
|
|
num_input_tokens_weight = 0.1
|
|
num_turns_weight = 0.1
|
|
|
|
[orchestrator.renderer]
|
|
name = "glm-4.5"
|
|
thinking_retention = "all"
|
|
|
|
[[orchestrator.train.env]]
|
|
name = "scaleswe"
|
|
env.taskset = { id = "scaleswe-v1" }
|
|
env.agent.harness = { id = "rlm", summarize_at_tokens = [65536, 131072], runtime = { type = "prime", vm = true, idle_timeout = "None", labels = ["glm45air-swe"] } }
|
|
|
|
[orchestrator.prime_monitor]
|
|
|
|
# --- Eval: SWE-Bench Verified at step 0 + every 20 steps, rlm harness on prime ---
|
|
|
|
[orchestrator.eval]
|
|
interval = 20
|
|
|
|
[[orchestrator.eval.env]]
|
|
name = "swebench-verified"
|
|
env.taskset = { id = "swebench-verified-v1" }
|
|
env.agent.harness = { id = "rlm", summarize_at_tokens = 98304, runtime = { type = "prime", vm = true, idle_timeout = "None", labels = ["glm45air-swe"] } }
|
|
env.agent.timeout = { rollout = 3600 }
|
|
|
|
# --- Inference ---
|
|
|
|
[inference]
|
|
enable_return_routed_experts = true
|
|
|
|
# vLLM + FlashInfer caches on node-local /tmp (see [env_vars]).
|
|
[inference.env_vars]
|
|
VLLM_CACHE_ROOT = "/tmp/.vllm-cache"
|
|
FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
|
|
|
|
[inference.model]
|
|
max_model_len = 131072
|
|
|
|
[inference.parallel]
|
|
tp = 8
|