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

Fix prefill OOM error in the case of large page size #5081

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

xiezhq-hermann
Copy link
Collaborator

@xiezhq-hermann xiezhq-hermann commented Apr 5, 2025

Motivation

In the case of large page size, current scheduler might underestimate the need for memory, thus causing OOM error, e.g.,:

RuntimeError: Prefill out of memory. Try to lower your batch size.Try to allocate 1444 tokens.Avaliable tokens:5120self.token to kv pool allocator.available size()=5120self.tree cache.evictable size()=0

Modifications

Align the real memory need for page size > 1.

Checklist

@xiezhq-hermann xiezhq-hermann added the bug Something isn't working label Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants