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 prompts smaller than iterative_size not being compressed #198

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

Conversation

cornzz
Copy link

@cornzz cornzz commented Nov 14, 2024

What does this PR do?

Fixes #196

Prompts smaller than iterative_size / 3 were not compressed at all and only partially compressed if > iterative_size / 3 and < iterative_size. This PR fixes this. See the issue for more details.

Tests for LLMLingua / LongLLMLingua were still successful after this change.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Was this discussed/approved via a Github issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

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.

@cornzz
Copy link
Author

cornzz commented Nov 14, 2024

@iofu728

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.

[Bug]: Prompts smaller than iterative_size are not compressed
1 participant