[Feature]add reasoning effort#6656
Merged
LiqinruiG merged 12 commits intoPaddlePaddle:developfrom Mar 6, 2026
Merged
Conversation
|
Thanks for your contribution! |
LiqinruiG
reviewed
Mar 4, 2026
| try: | ||
| chat_template_kwargs = task.get("chat_template_kwargs") or {} | ||
| chat_template_kwargs.update({"chat_template": task.get("chat_template")}) | ||
| chat_template_kwargs.update({"reasoning_effort": task.get("reasoning_effort")}) |
Collaborator
There was a problem hiding this comment.
需要判断个 None, 非None 的时候再加进去吧。
| chat_template: Optional[str] = None | ||
| reasoning_max_tokens: Optional[int] = None | ||
| response_max_tokens: Optional[int] = None | ||
| reasoning_effort: Literal["low", "medium", "high"] | None = None |
| f"req_id: {data['request_id']}, reasoning_max_tokens exceeds max_tokens, the value of reasoning_max_tokens will be adjusted to {data['max_tokens']}" | ||
| ) | ||
|
|
||
| if data.get("response_max_tokens") is not None: |
Collaborator
There was a problem hiding this comment.
这个是 response_max_tokens, 不是reasoning_max_tokens
|
|
||
| if data.get("reasoning_max_tokens") is not None: | ||
| if data["reasoning_max_tokens"] < 0: | ||
| if data["reasoning_max_tokens"] <= 0: |
| if data["response_max_tokens"] <= 0: | ||
| raise ParameterError("response_max_tokens", "response_max_tokens must be greater than 0") | ||
| if data.get("reasoning_effort") is not None: | ||
| data["enable_thinking"] = False |
Collaborator
There was a problem hiding this comment.
可以去掉 reasoning_max_tokens
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6656 +/- ##
==========================================
Coverage ? 72.04%
==========================================
Files ? 392
Lines ? 53710
Branches ? 8437
==========================================
Hits ? 38698
Misses ? 12222
Partials ? 2790
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
luukunn
added a commit
to luukunn/FastDeploy
that referenced
this pull request
Mar 6, 2026
* add reasoning_effort * fix log * fix reasoning_effort * add reasoning_effort level * fix valid_parameters * fix valid_parameters * fix * fix unit test * add unit test * add unit test
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Modifications
Usage or Command
Accuracy Tests
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.