From 9b7edc034399f2c6d463eb5d5794f651ddbf6405 Mon Sep 17 00:00:00 2001 From: Sage Moore Date: Thu, 3 Jul 2025 13:02:12 +0000 Subject: [PATCH] cleanup data_parallel.py Signed-off-by: Sage Moore --- examples/offline_inference/data_parallel.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/offline_inference/data_parallel.py b/examples/offline_inference/data_parallel.py index bef336edc21ac..a4b1d518bc994 100644 --- a/examples/offline_inference/data_parallel.py +++ b/examples/offline_inference/data_parallel.py @@ -113,11 +113,7 @@ def main( "The president of the United States is", "The capital of France is", "The future of AI is", - ] * 10 - # import random - # import string - # prompts = [''.join(random.choices(string.ascii_letters, k=128)) for _ in range(2048)] - + ] * 100 # with DP, each rank should process different prompts. # usually all the DP ranks process a full dataset, @@ -141,7 +137,7 @@ def main( # sampling params. here we set different max_tokens for different # ranks for demonstration. sampling_params = SamplingParams( - temperature=0.8, top_p=0.95, max_tokens=[40, 64][global_dp_rank % 2] + temperature=0.8, top_p=0.95, max_tokens=[16, 20][global_dp_rank % 2] ) # Create an LLM.