-
Notifications
You must be signed in to change notification settings - Fork 146
[OpenVINO] Support Zamba2 by OpenVINO #1354
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kazantsev, Roman <[email protected]>
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Thanks for the addition @rkazants
examples/neural_compressor/text-classification/intent-classification/run_clinc.py
Outdated
Show resolved
Hide resolved
examples/neural_compressor/text-classification/run_glue_post_training.py
Outdated
Show resolved
Hide resolved
examples/neural_compressor/text-to-image/run_diffusion_post_training.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[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.
Thanks a lot for iterating @rkazants, looks like the tests are not passing would you mind taking a look ?
past_key_values = [] | ||
# generate tuples of (key, value, conv_state, ssm_state) | ||
for i in range(self.num_hidden_layers): | ||
kv_shape = (self.batch_size, self.num_attention_heads, 1, self.head_dim) |
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.
here why not
kv_shape = (self.batch_size, self.num_attention_heads, 1, self.head_dim) | |
kv_shape = (self.batch_size, self.num_attention_heads, self.sequence_length, self.head_dim) |
value_cache = [] | ||
# inputs passed in an order of (key, value, conv_state, ssm_state) | ||
for idx in range(num_hidden_layers): | ||
batch_size = past_key_values[4 * idx].size(0) |
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.
not very important but could be moved outside from loop
attention_mask=attention_mask, | ||
position_ids=position_ids, | ||
past_key_values=wrapped_cache_params, | ||
# cache_position=cache_position, |
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.
why ?
ssm_states = [] | ||
key_cache = [] | ||
value_cache = [] | ||
# inputs passed in an order of (key, value, conv_state, ssm_state) |
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.
ok so length of past_key_values is always 4 * num_hidden_layers is this correct ? if yes would you mind adding ?
Signed-off-by: Kazantsev, Roman <[email protected]>
Co-authored-by: Ella Charlaix <[email protected]>
Co-authored-by: Ella Charlaix <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
@rkazants can you please rebase your branch, run styling and make sure the tests are passing 🙏 |
What does this PR do?
Support
Zyphra/Zamba2-1.2B-Instruct-v2
Before submitting