-
Notifications
You must be signed in to change notification settings - Fork 66
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
Enabled and optimized GLM-4v-9b on Gaudi #691
base: habana_main
Are you sure you want to change the base?
Conversation
output, _ = self.dense(out) | ||
|
||
if is_hpu: | ||
q = q.reshape(B, L, self.num_heads_per_rank, |
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.
define a HPUMultiHeadAttention
to process this
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. Thank you for your comments.
@@ -1,10 +1,10 @@ | |||
# Adapted 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.
Please revert file mode to 100644, same for other files.
@@ -963,7 +961,18 @@ def _prepare_prompt( | |||
pad=0, | |||
dtype=torch.long, | |||
device='cpu') | |||
|
|||
if len(multi_modal_kwargs_list |
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.
@yma11 Please take a look
Example:
python examples/offline_inference_vision_language.py -m glm4v