Skip to content
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

[Feature] Integration SGLang into OpenRLHF #2506

Open
2 tasks done
zhaochenyang20 opened this issue Dec 17, 2024 · 0 comments
Open
2 tasks done

[Feature] Integration SGLang into OpenRLHF #2506

zhaochenyang20 opened this issue Dec 17, 2024 · 0 comments

Comments

@zhaochenyang20
Copy link
Collaborator

zhaochenyang20 commented Dec 17, 2024

Checklist

Motivation

We've implemented the weight update API for RLHF pipeline:

api:

@app.post("/init_weights_update_group")
async def init_weights_update_group(
obj: InitWeightsUpdateGroupReqInput, request: Request
):
"""Initialize the parameter update group."""
success, message = await tokenizer_manager.init_weights_update_group(obj, request)
content = {"success": success, "message": message}
if success:
return ORJSONResponse(content, status_code=200)
else:
return ORJSONResponse(content, status_code=HTTPStatus.BAD_REQUEST)
@app.post("/update_weights_from_distributed")
async def update_weights_from_distributed(
obj: UpdateWeightsFromDistributedReqInput, request: Request
):
"""Update model parameter from distributed online."""
success, message = await tokenizer_manager.update_weights_from_distributed(
obj, request
)
content = {"success": success, "message": message}
if success:
return ORJSONResponse(content, status_code=200)
else:
return ORJSONResponse(content, status_code=HTTPStatus.BAD_REQUEST)

test case / usage:

https://github.com/sgl-project/sglang/blob/main/test/srt/test_update_weights_from_distributed.py

We will integrated SGLang into OpenRLHF this week. Here is the data for our accuracy and speed test.

https://huggingface.co/datasets/OpenRLHF/prompt-collection-v0.1-dev-rand5k

https://huggingface.co/datasets/OpenRLHF/prompt-collection-v0.1-dev-100k

Typically, 50K data requires several hours.

Related resources

See above.

@zhaochenyang20 zhaochenyang20 self-assigned this Dec 17, 2024
@zhaochenyang20 zhaochenyang20 changed the title [Feature] Integration into OpenRLHF [Feature] Integration SGLang into OpenRLHF Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant