KEMBAR78
Automatically set `max_num_batched_tokens` by WoosukKwon · Pull Request #1198 · vllm-project/vllm · GitHub
Skip to content

Conversation

@WoosukKwon
Copy link
Collaborator

This PR removes the default value (2560) of max_num_batched_tokens and sets it based on the model's maximum length.

@WoosukKwon
Copy link
Collaborator Author

@zhuohan123 Sorry for the commits after requesting your review. Now the PR is ready for review!

@WoosukKwon WoosukKwon mentioned this pull request Sep 27, 2023
5 tasks
Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fix!

@WoosukKwon WoosukKwon merged commit a19bc5c into main Sep 27, 2023
@WoosukKwon WoosukKwon deleted the auto-max-batch branch September 27, 2023 23:34
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request May 12, 2025
This PR choose the HPU device according to the local rank instead of the
first available one. Choosing the first available HPU will results in:
- random mapping between the `local_rank` and the `module_id` as the
process of each rank starts in random order.
- failure to select specified devices with `HABANA_VISIBLE_MODULES`.

The random mapping may cause cross-NUMA access in inter-node
pipeline-parallel and cross-group HCCL call for PCIe SKU.
pi314ever pushed a commit to pi314ever/vllm that referenced this pull request Jun 23, 2025
- [x] [vllm-project#1135](HabanaAI#1135)
- [x] [vllm-project#1149](HabanaAI#1149)
- [x] [vllm-project#1198](HabanaAI#1198)
- [x] demo_proxy.py

---------

Signed-off-by: zhenwei <zhenweiliu@habana.ai>
Co-authored-by: Youlei Yang <youlei.yang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically configure max_num_batched_tokens based on model length

2 participants