Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change scheduler & input tensor shape #1381

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Change scheduler & input tensor shape #1381

merged 2 commits into from
Oct 17, 2023

Conversation

WoosukKwon
Copy link
Collaborator

This PR updates the scheduler and model code to use 2D tensors instead of 1D tensors. The change will enable using a wider range of libraries and hardware, and facilitate future optimizations like CUDA graph.

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! A small change may be needed in the comment.

vllm/model_executor/input_metadata.py Outdated Show resolved Hide resolved
@WoosukKwon WoosukKwon merged commit c1376e0 into main Oct 17, 2023
2 checks passed
@WoosukKwon WoosukKwon deleted the fix-scheduler branch October 17, 2023 00:48
@yunfeng-scale
Copy link
Contributor

yunfeng-scale commented Oct 19, 2023

i'm worried about performance degradation of these paddings, can you try benchmarking? sorry it seems the number of elements don't change so shouldn't affect performance

hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
@frankxyy
Copy link

Hi, does the changing from 2D tensor to 1D tensor have some bad effects on the prefilling throughput? As some sequences with different lengths will be padded to the max length before calculation. Thus the total FLOPs needed is enhanced.

sjchoi1 pushed a commit to casys-kaist-internal/vllm that referenced this pull request May 7, 2024
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.

4 participants