-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Attempt for cleverer auto batch_prefill values (some simplifications). #2808
Conversation
// TODO This calculation depends on the actual implementation | ||
let dtype_size = 2; | ||
let mlp_size = self.intermediate_size?; | ||
Some((mlp_size + mlp_size / 2) * self.num_experts * dtype_size * 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment where mlp_size / 2
comes from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
enum Gpu { | ||
RTX4090, | ||
T4, | ||
L4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want L40 as well, since we are using them now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
# switch on equivalent logits based on the position in the batch. | ||
# 1 output being different is not uncommon | ||
if sum(equals) < len(equals) - 1: | ||
assert outputs == expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing something. Can't this only be true when sum(equals) == len(equals)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the error message to be about the content and containing the diff.
Co-authored-by: Daniël de Kok <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
also the qwen2-vl tests should be resolved shortly in this PR #2802
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.