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 wrong special tokens being used for llmlingua-2 #182

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

Conversation

cornzz
Copy link

@cornzz cornzz commented Sep 13, 2024

What does this PR do?

Fixes #181

The model_name parameter was not set when initializing TokenClfDataset which lead to the special tokens (bos/eos/pad) of the llmlingua-2-small model being used always, even when using the xlm-roberta-large based compression model.

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 Sep 13, 2024

@iofu728, @XufangLuo

I had to adjust the llmlingua2 tests slightly as the generated compressed text now differs a bit from before.

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]: LLMLingua-2 uses wrong special tokens by default
1 participant