Repository navigation
Feature/intern s1 parser - #40115
Feature/intern s1 parser#40115i-square wants to merge 5 commits into
Conversation
|
Documentation preview: https://vllm--40115.org.readthedocs.build/en/40115/ |
|
Hi @i-square, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for Intern-S1 and Intern-S1-mini models, adding dedicated reasoning and tool-calling parsers. The implementation includes the InternS1ReasoningParser, which hoists action blocks from reasoning to content, and the InternS1ToolParser for extracting tool calls in both streaming and non-streaming modes. Documentation and tests for these new features are also provided. However, critical bugs were identified in the streaming tool parser implementation: one logic error prematurely blocks the streaming of tool arguments, and another issue involves incorrect list indexing that would lead to IndexError exceptions during execution.
Signed-off-by: i-square <i_square@qq.com>
Signed-off-by: i-square <i_square@qq.com>
Signed-off-by: i-square <i_square@qq.com>
Signed-off-by: i-square <i_square@qq.com>
1fdeec6 to
998fafb
Compare
Signed-off-by: i-square <i_square@qq.com>
|
@aarnphm @chaunceyjiang @sfeng33 gentle ping on this PR. Let me know if you need any additional context or changes to make the review easier. Thanks! |
|
This pull request has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this pull request should remain open. Thank you! |
|
This pull request has been automatically closed due to inactivity. Please feel free to reopen if you intend to continue working on it. Thank you! |
Purpose
Add dedicated
intern-s1reasoning and tool parsers without changing theexisting
internlmparser behavior.This keeps the fix scoped to
Intern-S1and avoids compatibility risk forexisting
internlmusers and models.This PR includes:
intern-s1reasoning parser that hoists action blocks out of<think>...</think>intocontentfor non-streaming responses, so thetool parser can extract standard OpenAI tool calls without changing the
shared serving flow
intern-s1tool parser that is more tolerant of the currentIntern-S1 output shape:
<|action_start|>and<|plugin|>--reasoning-parser intern-s1and--tool-call-parser intern-s1The intent is to fix Intern-S1 tool parsing with the smallest possible impact
surface, rather than changing generic InternLM parsing behavior for all users.
Test Plan
Static checks run locally:
Targeted tests added in this PR:
The new tests cover:
intern-s1parser registrationdeepseek_r1behavior when no action block is presentTest Result
Passed locally:
git diff --checkpython -m compileall ...for the new parser and test filespython -m pytest tests/tool_parsers/test_intern_s1_tool_parser.py tests/reasoning/test_intern_s1_reasoning_parser.py -q9 passedNot run locally:
ruffNotes about the local test environment:
pytestandtblibwere installed into the local test envmistral-commonwas aligned to1.11.0to match the repository's testdependency set
tokenizer downloads or GPU cleanup during teardown
Documentation update:
docs/features/tool_calling.mdto recommend--tool-call-parser intern-s1 --reasoning-parser intern-s1for Intern-S1models instead of reusing the generic
internlmparser guidance.docs/features/reasoning_outputs.mdto list Intern-S1 as asupported reasoning model with tool calling and to show the recommended
server flags.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.