Skip to content

Fix prompts smaller than iterative_size not being compressed#198

Open
cornzz wants to merge 2 commits intomicrosoft:mainfrom
cornzz:fix_small_prompts
Open

Fix prompts smaller than iterative_size not being compressed#198
cornzz wants to merge 2 commits intomicrosoft:mainfrom
cornzz:fix_small_prompts

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