Skip to content

Decouple vLLM engine and GRPOTrainer. #3911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Apr 22, 2025
Merged

Decouple vLLM engine and GRPOTrainer. #3911

merged 28 commits into from
Apr 22, 2025

Conversation

hjh0119
Copy link
Collaborator

@hjh0119 hjh0119 commented Apr 17, 2025

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Decouple vLLM engine and GRPOTrainer to support external vLLM server.

related issue/pr:
huggingface/trl#3094
#3817
#3712

32B Full GRPO training script

related issue/pr:
#3871
#3887

Experiment results

Paste your experiment result here(if needed).

Comment on lines +1208 to +1218
def _process_infer_requests_images(self, infer_requests: List[InferRequest]):
import base64
if not any('images' in request for request in infer_requests):
return
for request in infer_requests:
if 'images' not in request:
continue
for i, img in enumerate(request['images']):
if 'bytes' in img and img['bytes']:
request['images'][i] = base64.b64encode(img['bytes']).decode('utf-8')
return
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are there any other cases where images is not a string?

@hjh0119 hjh0119 marked this pull request as ready for review April 22, 2025 09:14
@hjh0119
Copy link
Collaborator Author

hjh0119 commented Apr 22, 2025

32B Full training curve

image

@hjh0119 hjh0119 merged commit 526f8a4 into modelscope:main Apr 22, 2025
1 of 2 checks passed
@hjh0119 hjh0119 deleted the vllm branch April 22, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants