Skip to content

[BugFix] unify max_tokens#4968

Merged
LiqinruiG merged 6 commits intoPaddlePaddle:developfrom
kxz2002:bugfix/unify_max_tokens
Nov 18, 2025
Merged

[BugFix] unify max_tokens#4968
LiqinruiG merged 6 commits intoPaddlePaddle:developfrom
kxz2002:bugfix/unify_max_tokens

Conversation

@kxz2002
Copy link
Contributor

@kxz2002 kxz2002 commented Nov 11, 2025

Motivation

When determining the finish reason, using max_tokens is inaccurate and requires modification.

Modifications

Create new fields max_tokens and max_tokens_list to retrieve the preprocessed max_tokens values.

Usage or Command

No manual command is changed

Accuracy Tests

No need

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[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]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Nov 11, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Nov 11, 2025
Copy link
Collaborator

@LiqinruiG LiqinruiG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LiqinruiG LiqinruiG merged commit 9718907 into PaddlePaddle:develop Nov 18, 2025
15 of 16 checks passed
kxz2002 added a commit to kxz2002/FastDeploy that referenced this pull request Nov 19, 2025
* unify max tokens

* modify and add unit test

* modify and add unit test

* modify and add unit tests

---------

Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com>
Jiang-Jia-Jun added a commit that referenced this pull request Nov 19, 2025
* unify max tokens

* modify and add unit test

* modify and add unit test

* modify and add unit tests

---------

Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com>
Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants