Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions configs/advanced/minimax-m2.5/swe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ level = "debug"
[model]
name = "PrimeIntellect/MiniMax-M2.5-bf16"

[weight_broadcast]
type = "nccl"

[deployment]
type = "multi_node"
num_train_nodes = 4
Expand All @@ -35,7 +32,6 @@ fused_lm_head_token_chunk_size = 1024
max_inflight_activations = 5

[trainer.model.ac]
freq = 1

[trainer.optim]
type = "adamw"
Expand Down
5 changes: 0 additions & 5 deletions configs/advanced/nemotron-3-super/swe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ keep_last = 1
name = "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16"

[trainer]
dist_timeout_seconds = 3600
enable_router_replay = true

[trainer.model]
Expand All @@ -54,9 +53,6 @@ max_inflight_activations = 1

[trainer.model.compile]

[trainer.ckpt]
skip_optimizer = true

[trainer.optim]
type = "adamw"

Expand Down Expand Up @@ -110,4 +106,3 @@ max_model_len = 131072
tensor_parallel_size = 8
enable_prefix_caching = true
enable_expert_parallel = true
enable_return_routed_experts = true
6 changes: 3 additions & 3 deletions docs/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ State-only optimizer offload remains enabled by default with `model.optim_cpu_of

### LM Head Chunking

The vanilla LM head materializes a `[batch * seq, vocab]` logits tensor on every step — a major memory tax when the vocabulary is large (often >100K). `fused_lm_head_token_chunk_size` swaps in a custom fused linear + logprob/entropy kernel that streams through `chunk_size` tokens at a time, avoiding the materialization. It defaults to `1024` for RL training:
The vanilla LM head materializes a `[batch * seq, vocab]` logits tensor on every step — a major memory tax when the vocabulary is large (often >100K). `fused_lm_head_token_chunk_size` swaps in a custom fused linear + logprob/entropy kernel that streams through `chunk_size` tokens at a time, avoiding the materialization. It defaults to `8192` for RL training:

```toml
[trainer.model]
fused_lm_head_token_chunk_size = 1024 # default
fused_lm_head_token_chunk_size = 8192 # default
# fused_lm_head_token_chunk_size = "disabled" # vanilla LM head
```

Expand All @@ -173,7 +173,7 @@ freq = 1
max_inflight_activations = 1
```

The defaults already cover: fused LM head chunking (`1024`), `torch.compile` (fullgraph=False), AC (full mode), AC offloading (`max_inflight_activations=5`), and optimizer CPU offload. Walks through every memory lever in order: FSDP+EP shard the weights, CP shards the activations along the token dim, AC + AC offloading shrink the activation footprint, fused LM head chunks the loss, `torch.compile` reduces fragmentation, optim offload moves Adam state off GPU. Apply selectively — each knob has a throughput cost.
The defaults already cover: fused LM head chunking (`8192`), `torch.compile` (fullgraph=False), AC (full mode), AC offloading (`max_inflight_activations=5`), and optimizer CPU offload. Walks through every memory lever in order: FSDP+EP shard the weights, CP shards the activations along the token dim, AC + AC offloading shrink the activation footprint, fused LM head chunks the loss, `torch.compile` reduces fragmentation, optim offload moves Adam state off GPU. Apply selectively — each knob has a throughput cost.

## SLURM

Expand Down
5 changes: 0 additions & 5 deletions examples/advanced/glm-4.5-air/search.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ name = "zai-org/GLM-4.5-Air"
# --- Trainer ---

[trainer]
dist_timeout_seconds = 3600
enable_router_replay = true

[trainer.model]
Expand All @@ -53,9 +52,6 @@ max_inflight_activations = 1

[trainer.model.compile]

[trainer.ckpt]
skip_optimizer = true

[trainer.optim]
type = "muon"

Expand Down Expand Up @@ -175,4 +171,3 @@ FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
[inference.vllm]
max_model_len = 131072
tensor_parallel_size = 8
enable_return_routed_experts = true
5 changes: 0 additions & 5 deletions examples/advanced/glm-4.5-air/swe-budget.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ keep_last = 1
# --- Trainer ---

[trainer]
dist_timeout_seconds = 3600
enable_router_replay = true

[model]
Expand All @@ -68,9 +67,6 @@ max_inflight_activations = 1

[trainer.model.compile]

[trainer.ckpt]
skip_optimizer = true

[trainer.optim]
type = "sign_sgd"

Expand Down Expand Up @@ -107,4 +103,3 @@ FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
[inference.vllm]
max_model_len = 131072
tensor_parallel_size = 8
enable_return_routed_experts = true
2 changes: 0 additions & 2 deletions examples/advanced/glm-4.5-air/swe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ keep_last = 1
# --- Trainer ---

[trainer]
dist_timeout_seconds = 3600
enable_router_replay = true

[model]
Expand Down Expand Up @@ -123,4 +122,3 @@ gpu_memory_utilization = 0.85
max_model_len = 131072
tensor_parallel_size = 8
enable_expert_parallel = true
enable_return_routed_experts = true
5 changes: 0 additions & 5 deletions examples/advanced/glm-4.5-air/terminal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ name = "zai-org/GLM-4.5-Air"
# --- Trainer ---

[trainer]
dist_timeout_seconds = 3600
enable_router_replay = true

[trainer.model]
Expand All @@ -54,9 +53,6 @@ max_inflight_activations = 1

[trainer.model.compile]

[trainer.ckpt]
skip_optimizer = true

[trainer.optim]
type = "muon"

Expand Down Expand Up @@ -170,4 +166,3 @@ FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
[inference.vllm]
max_model_len = 131072
tensor_parallel_size = 8
enable_return_routed_experts = true
1 change: 0 additions & 1 deletion examples/advanced/glm-5.3/swe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ type = "fp8"
type = "deepgemm_fp8"

[trainer.model.ac]
freq = 1

[trainer.model.compile]

Expand Down
4 changes: 0 additions & 4 deletions examples/advanced/intellect-3.1/rl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ level = "debug"
[model]
name = "PrimeIntellect/INTELLECT-3-Base"

[weight_broadcast]
type = "nccl"

[deployment]
type = "multi_node"
num_train_nodes = 4
Expand All @@ -35,7 +32,6 @@ fused_lm_head_token_chunk_size = 1024
max_inflight_activations = 5

[trainer.model.ac]
freq = 1

[trainer.optim]
type = "muon"
Expand Down
4 changes: 0 additions & 4 deletions examples/advanced/qwen3-30b-a3b/math.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ level = "debug"
[model]
name = "Qwen/Qwen3-30B-A3B-Thinking-2507"

[weight_broadcast]
type = "nccl"

[deployment]
type = "multi_node"
num_train_nodes = 2
Expand All @@ -33,7 +30,6 @@ ep = 8
max_inflight_activations = 5

[trainer.model.ac]
freq = 1

[trainer.optim]
type = "adamw"
Expand Down
4 changes: 0 additions & 4 deletions examples/advanced/qwen3-30b-a3b/swe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ level = "debug"
[model]
name = "Qwen/Qwen3-30B-A3B-Thinking-2507"

[weight_broadcast]
type = "nccl"

[deployment]
type = "multi_node"
num_train_nodes = 2
Expand All @@ -34,7 +31,6 @@ cp = 2
max_inflight_activations = 5

[trainer.model.ac]
freq = 1

[trainer.optim]
type = "adamw"
Expand Down
1 change: 0 additions & 1 deletion examples/advanced/qwen3-30b-a3b/tool.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ name = "Qwen/Qwen3-30B-A3B-Instruct-2507"
cp = 2

[trainer.model.ac]
freq = 1

[trainer.model.compile]

Expand Down
1 change: 0 additions & 1 deletion examples/basic/alphabet-sort/rl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ project = "alphabet-sort"
name = "alphabet-sort"

[trainer.model.ac]
freq = 1

[trainer.model.lora]
rank = 32
Expand Down
1 change: 0 additions & 1 deletion examples/extra/vlm/sft-moe.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Multimodal (VLM) SFT on a Mixture-of-Experts model — single 8xH200 node.
max_steps = 1000
dist_timeout_seconds = 3600

[model]
name = "Qwen/Qwen3.6-35B-A3B"
Expand Down
1 change: 0 additions & 1 deletion examples/extra/vlm/sft.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ freeze_vision_encoder = true
rank = 16

[model.ac]
freq = 1

[data]
type = "sft"
Expand Down
Loading