-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[rollout] feat: follow OpenAI tool calling schema in chat scheduler #1831
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
Conversation
|
All in all, I think it's a great PR to abstract a bit of the chat scheduler away - however, I would recommend keeping extensiblity for the chat scheduler instead of removing it. Here is why:
Btw, tools in training are also kind of hard to debug. Is there anything that can make this easier? |
|
@casper-hansen Thanks for your advise, I add a configurable option User should inherit CompletionCallback and implement two functions: class CustomCompletionCallback(CompletionCallback):
async def __call__(self, messages: List[Dict[str, str]], completions: ChatCompletion, info: Dict[str, Any]):
...
def postprocess(self, batch: DataProto, batch_conversations: List[List[Dict[str, str]]], n: int) -> DataProto:
...For reference, I add a unit test in |
|
@wuxibin89 thanks for addressing the usage needs. I just looked through the code and confirmed I have access to the tokenizer, sampling paremeters, and postprocessing. So this looks good to me! |
325e26b to
ba5fead
Compare
ba5fead to
fd2c093
Compare
Checklist Before Starting
What does this PR do?
ChatCompletionScheduler interacts with async rollout server with OpenAI client, and follow OpenAI's tool calling schema. So any inference frameworks implementing OpenAI compatible server (e.g vllm, sglang) should works with ChatCompletionScheduler.
High-Level Design
Specific Changes
API
Usage Example
# Add code snippet or script demonstrating how to use thisTest
Additional Info.
Checklist Before Submitting
[BREAKING]to the PR title if it breaks any API.