diff --git a/tests/test_qwen3_0.6B_parallel_check.py b/tests/test_qwen3_0.6B_parallel_check.py index 3b8b5d6f7..f02e9499c 100644 --- a/tests/test_qwen3_0.6B_parallel_check.py +++ b/tests/test_qwen3_0.6B_parallel_check.py @@ -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 " diff --git a/vime/backends/megatron_utils/data.py b/vime/backends/megatron_utils/data.py index de6c62d55..dee37edf8 100644 --- a/vime/backends/megatron_utils/data.py +++ b/vime/backends/megatron_utils/data.py @@ -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 if "rollout/entropy" in reduced_log_dict: - assert 0 < reduced_log_dict["rollout/entropy"] < 0.5 + assert 0 < reduced_log_dict["rollout/entropy"] < 1 if args.log_multi_turn: log_multi_turn_data(rollout_id, args, rollout_data)