fix vllm benchmark multi processing problem#127
Merged
Conversation
yghstill
approved these changes
Nov 4, 2025
liusong1222
approved these changes
Nov 4, 2025
dawnranger
pushed a commit
to dawnranger/AngelSlim
that referenced
this pull request
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request removes Ray-based distributed processing from the vLLM benchmarking code and replaces it with Python's built-in multiprocessing module. The update affects both the Eagle and baseline answer generation workflows, improving compatibility and simplifying the codebase. The multiprocessing approach now handles parallel execution across multiple GPUs, and file-writing is made safe for concurrent processes. Additional minor improvements include better error handling and device assignment.
Key changes by theme:
Migration from Ray to Multiprocessing:
benchmark_engine.py,generate_baseline_answer.py, andgenerate_eagle_answer.py. Instead, Python'smultiprocessingis used for multi-GPU parallelism, including process spawning, locking, and shared result lists. [1] [2] [3]CUDA_VISIBLE_DEVICES, and synchronizes output file writes with a multiprocessing lock. [1] [2] [3] [4] [5] [6] [7]File Handling and Concurrency:
Error Handling and Logging:
_reorg_answer_fileto catch and log invalid JSON lines instead of crashing.API and Function Signature Updates:
lock,results_list, anddevice_listparameters to answer generation functions to support multiprocessing and GPU assignment. [1] [2]Code Simplification:
These changes collectively modernize the benchmarking workflow to use standard Python multiprocessing, making the codebase easier to maintain and run in diverse environments.