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

Phi3 support compresskv #11733

Merged
merged 19 commits into from
Aug 9, 2024
Merged

Phi3 support compresskv #11733

merged 19 commits into from
Aug 9, 2024

Conversation

cyita
Copy link
Contributor

@cyita cyita commented Aug 7, 2024

Description

Phi3 support compresskv.

  • Test on arc
  • Test on MTL

1. Why the change?

2. User API changes

3. Summary of the change

4. How to test?

  • N/A
  • Unit test: Please manually trigger the PR Validation here by inputting the PR number (e.g., 1234). And paste your action link here once it has been successfully finished.
  • Application test
  • Document test
  • ...

5. New dependencies

  • New Python dependencies
    - Dependency1
    - Dependency2
    - ...
  • New Java/Scala dependencies and their license
    - Dependency1 and license1
    - Dependency2 and license2
    - ...

@cyita cyita requested review from rnwang04 and jason-dai August 9, 2024 03:18
@@ -485,7 +485,7 @@ def update_past_key_value(past_key_value, key_states, value_states,
return key_states, value_states


def should_use_compresskv(x: torch.Tensor, prompt_len: int):
def should_use_compresskv(x: torch.Tensor, prompt_len: int, sliding_window: int=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is sliding_window used?

@jason-dai
Copy link
Contributor

See comments above; otherwise LGTM

@cyita
Copy link
Contributor Author

cyita commented Aug 9, 2024

@cyita cyita merged commit dd46c14 into intel-analytics:main Aug 9, 2024
1 check passed
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.

3 participants