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
1 change: 1 addition & 0 deletions examples/configs/evals/eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ generation:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.9
max_model_len: 2048
enforce_eager: False
colocated:
# true: generation shares training GPUs
# false: uses dedicated generation resources
Expand Down
1 change: 1 addition & 0 deletions examples/configs/grpo-deepscaler-1.5b-8K.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: ${policy.max_total_sequence_length}
enforce_eager: False
# For most cases, use "dummy" to load the initial weights, since they will be overwritten during refit
# For Gemma models, we need to use "auto" due to a vllm bug
load_format: dummy
Expand Down
1 change: 1 addition & 0 deletions examples/configs/grpo_math_1B.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: ${policy.max_total_sequence_length}
enforce_eager: False
colocated:
# true: generation shares training GPUs
# false: uses dedicated generation resources
Expand Down
1 change: 1 addition & 0 deletions examples/configs/grpo_math_8B.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ policy:
tensor_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: ${policy.max_total_sequence_length}
enforce_eager: False

cluster:
gpus_per_node: 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 512
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 16384
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 4096
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 512
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 16384
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 16384
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 4096
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 4096
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ policy:
pipeline_parallel_size: 1
gpu_memory_utilization: 0.6
max_model_len: 512
enforce_eager: False
colocated:
enabled: true
resources:
Expand Down
6 changes: 4 additions & 2 deletions nemo_rl/models/generation/vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def configure_worker(
seed = node_idx * 1024 + bundle_id

init_kwargs["seed"] = seed
# Need to give each DP group its own vllm cache to address:
# https://github.com/vllm-project/vllm/issues/18851
env_vars["VLLM_CACHE_ROOT"] = os.path.expanduser(f"~/.cache/vllm_{seed}")

# Check if this worker is part of a parallel group (TP or TP+PP).
# A worker is part of a parallel group if it's a secondary member (local_bundle_indices is None)
Expand Down Expand Up @@ -334,8 +337,7 @@ def _patch_vllm_init_workers_ray():
enable_prefix_caching=torch.cuda.get_device_capability()[0] >= 8,
dtype=self.cfg["vllm_cfg"]["precision"],
seed=seed,
# Don't use cuda-graph by default as it leads to convergence issues (see https://github.com/NVIDIA-NeMo/RL/issues/186)
enforce_eager=True,
enforce_eager=self.cfg["vllm_cfg"]["enforce_eager"],
max_model_len=self.cfg["vllm_cfg"]["max_model_len"],
trust_remote_code=True,
worker_extension_cls="nemo_rl.models.generation.vllm_backend.VllmInternalWorkerExtension",
Expand Down
1 change: 1 addition & 0 deletions tests/unit/experience/test_rollouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def initial_multi_step_calculator_batch(rollout_tokenizer):
"disable_log_stats": True,
"disable_log_requests": True,
"gpu_memory_utilization": 0.6,
"enforce_eager": "False",
},
"colocated": {
"enabled": True,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/models/generation/test_vllm_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"async_engine": False, # Default to False for synchronous tests
"skip_tokenizer_init": False,
"load_format": "auto",
"enforce_eager": "False",
},
"colocated": {
"enabled": True,
Expand Down
1 change: 1 addition & 0 deletions tests/unit/models/generation/test_vllm_large_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"async_engine": True,
"skip_tokenizer_init": False,
"load_format": "auto",
"enforce_eager": "False",
},
"colocated": {
"enabled": True,
Expand Down
Loading