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
13 changes: 4 additions & 9 deletions tests/test_qwen3_0.6B_parallel_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,12 @@ def execute():
num_gpus_per_node=NUM_GPUS,
megatron_model_type=MODEL_TYPE,
)
# 8 GPU CPU 1
parallel_sizes = [1, 2, 4]
for num_gpus in [8, 4, 2]:
remaining_gpus = num_gpus
for tp_size in [1, 2, 4, 8]:
remaining_gpus /= tp_size
for tp_size in parallel_sizes:
for pp_size in [1, 2, 4]:
if remaining_gpus < pp_size:
continue
remaining_gpus /= pp_size
for cp_size in [1, 2, 4, 8]:
if remaining_gpus < cp_size:
for cp_size in parallel_sizes:
if tp_size * pp_size * cp_size > num_gpus:
continue
args = train_args + (
f"--load-debug-rollout-data data-{i}.pt "
Expand Down
4 changes: 2 additions & 2 deletions vime/backends/megatron_utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ def log_rollout_data(
# assert reduced_log_dict["rollout/log_probs"] == reduced_log_dict["rollout/ref_log_probs"]
assert abs(reduced_log_dict["rollout/log_probs"] - reduced_log_dict["rollout/ref_log_probs"]) < 1e-8
if "rollout/log_probs" in reduced_log_dict:
assert -0.5 < reduced_log_dict["rollout/log_probs"] < 0
assert -1 < reduced_log_dict["rollout/log_probs"] < 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The assertion threshold for rollout/log_probs is still very tight at -1 (which corresponds to an average token probability of ~36.8%). For many generation tasks, the average token probability can naturally be lower, which will cause flaky CI failures. Consider relaxing this bound significantly (e.g., to -15) to prevent fragile test failures while still catching extreme anomalies or NaNs.

Suggested change
assert -1 < reduced_log_dict["rollout/log_probs"] < 0
assert -15 < reduced_log_dict["rollout/log_probs"] < 0

if "rollout/entropy" in reduced_log_dict:
assert 0 < reduced_log_dict["rollout/entropy"] < 0.5
assert 0 < reduced_log_dict["rollout/entropy"] < 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The assertion threshold for rollout/entropy is still very tight at 1. For a model with a large vocabulary like Qwen (V ≈ 150k, max entropy ≈ 11.9), an average entropy of 1 is extremely low. If the model's generations become slightly more diverse, the entropy can easily exceed 1, leading to flaky CI failures. Consider relaxing this upper bound significantly (e.g., to 12) to avoid fragile test failures.

Suggested change
assert 0 < reduced_log_dict["rollout/entropy"] < 1
assert 0 < reduced_log_dict["rollout/entropy"] < 12


if args.log_multi_turn:
log_multi_turn_data(rollout_id, args, rollout_data)
Expand Down
Loading