Olmo 3 tool parser and tests#26143
Conversation
Signed-off-by: Pradeep Dasigi <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces a tool parser for the Olmo 3 model, along with a comprehensive set of tests. The implementation correctly handles the specific format of Olmo 3's function calls, including XML tags, newline delimiters, and non-Pythonic literals like null, true, and false. The tests are well-structured and cover a wide range of scenarios for both streaming and non-streaming modes. My main feedback is regarding significant code duplication between the new Olmo3PythonicToolParser and the existing PythonicToolParser. Refactoring this into a shared base class would greatly improve maintainability.
Signed-off-by: Pradeep Dasigi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
|
Documentation preview: https://vllm--26143.org.readthedocs.build/en/26143/ |
Signed-off-by: Pradeep Dasigi <[email protected]>
|
@chaunceyjiang I addressed the comments you made. Can you please take a look again. Thanks! |
Signed-off-by: Pradeep Dasigi <[email protected]> Signed-off-by: Alberto Perdomo <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]> Signed-off-by: 0xrushi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
Signed-off-by: Pradeep Dasigi <[email protected]>
Purpose
This PR adds a tool parser for parsing the function calls made by the Olmo 3 model. Support for the model has already been merged (#24534). Olmo 3 outputs function calls in the following format
This format is similar to the one that the existing Pythonic parser expects except for the presence of xml tags and function calls being delimited by newline characters instead of being represented as a list within brackets.
Test Plan
This PR also includes tests. Existing tests have not been modified or will be impacted.
Test Result
Output:
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.