Skip to content

Commit 5fbcdeb

Browse files
aoshen02claude
andcommitted
fix(ci): resolve 0.8B async OOM on H100 by reducing max-tokens-per-gpu
Root cause: Qwen3.5's 248K vocab produces [T, 248320] fp32 logits tensors. calculate_log_probs_and_entropy holds 5 copies simultaneously (2 clones + 2 intermediates + original). At max-tokens-per-gpu=9216, each copy is ~8.5 GB → 42.6 GB from logits alone, exceeding H100 80 GB with activations and reserved pool fragmentation. Fix: reduce max-tokens-per-gpu from 9216 to 2048. Peak drops from 117.6 GB to 39.6 GB (measured on H200), well within H100's 80 GB. GSM8K's longest sequence is ~1200 tokens, so 2048 still fits all samples. Also removes gsm8k_async_short from SOFT_FAIL_ON_H100 (no longer needed) and the expandable_segments workaround. parallel_check remains soft-fail: ~11% flake rate on TP4+per-token-loss, confirmed same behavior in slime (Megatron FP reduction-order issue). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 20fbb58 commit 5fbcdeb

2 files changed

Lines changed: 9 additions & 17 deletions

File tree

.buildkite/gpu_suites.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,24 @@
3232

3333
# Known hardware-fit failures on the pool's 80 GB H100s — test-level issues,
3434
# not pipeline ones (PR #239, builds #6/#7):
35-
# * gsm8k_async_short: the actor GPU needs >80 GB as tuned
36-
# (--max-tokens-per-gpu 9216 with the 248k vocab; 67 GiB live allocations
37-
# after expandable_segments removed fragmentation). The sync twin passes.
38-
# * parallel_check: cross-layout grad-norm invariance (CP=2) diverges ~4%
39-
# from the same-node baseline recording (likely NVLS reduction ordering).
35+
# * gsm8k_async_short: FIXED — max-tokens-per-gpu reduced 9216→2048 (peak
36+
# 39.6 GB on H200, well within H100 80 GB). Root cause was Qwen3.5 248k
37+
# vocab × 5 logits copies in calculate_log_probs_and_entropy.
38+
# * parallel_check: cross-layout grad-norm invariance (TP4+per-token-loss)
39+
# diverges ~12% on ~11% of rollout data (bimodal: most <1.5%, outliers
40+
# 10-20%). Confirmed same behavior in slime — Megatron FP reduction-order
41+
# non-invariance, not a vime bug.
4042
# soft_fail keeps them running and visible (orange) without failing the
4143
# build; the GHA label jobs on the self-hosted boxes remain their
4244
# authoritative gate.
4345
SOFT_FAIL_ON_H100 = {
44-
"test_qwen3.5_0.8B_gsm8k_async_short.py",
4546
"test_qwen3_0.6B_parallel_check.py",
4647
}
4748

4849
# (test_file, num_gpus, extra_args, env overrides)
4950
SUITES = {
5051
"short": [
51-
# expandable_segments: borderline fit on the pool's 80 GB H100s — OOMed
52-
# in compute_log_probs with 7 GiB reserved-but-unallocated (build #6).
53-
# Scoped to this test only: vLLM's sleep-mode CuMemAllocator can
54-
# conflict with expandable segments, so don't set it pod-wide.
55-
(
56-
"test_qwen3.5_0.8B_gsm8k_async_short.py",
57-
4,
58-
"",
59-
{"PYTORCH_CUDA_ALLOC_CONF": "expandable_segments:True"},
60-
),
52+
("test_qwen3.5_0.8B_gsm8k_async_short.py", 4, "", {}),
6153
("test_qwen3.5_0.8B_gsm8k_short.py", 4, "", {}),
6254
("test_qwen2.5_0.5B_ppo_critic_only_short.py", 4, "", {}),
6355
("test_qwen2.5_0.5B_fully_async_short.py", 4, "", {}),

tests/test_qwen3.5_0.8B_gsm8k_async_short.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def execute():
5757
"--expert-model-parallel-size 1 "
5858
"--expert-tensor-parallel-size 1 "
5959
"--use-dynamic-batch-size "
60-
"--max-tokens-per-gpu 9216 "
60+
"--max-tokens-per-gpu 2048 "
6161
)
6262

6363
grpo_args = (

0 commit comments

Comments
 (0)