Skip to content

Conversation

@cornzz
Copy link

@cornzz cornzz commented Jan 16, 2025

@iofu728

For longllmlingua this is not a 100% correct fix, especially for short prompts with longllmlingua errors occur.
I hope one of the maintainers can give some feedback whether this is semi-correct

Related: #195, #61

See this comment for details: #61 (comment)

Before the change (top: Llama 2, bottom: GPT-2):
Screenshot 2025-01-16 at 20 26 21

After the change:
Screenshot 2025-01-16 at 19 48 54
Note that the undercompression for 250 and 500 tokens is caused by the second bug / design flaw described in this issue #196 under "Semi-related bug", Also, this was measured including the bugfix in #198 otherwise 50 and 100 tokens would not be compressed.

I did not run the tests as compression outputs will change and tests will fail

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?

@cornzz cornzz changed the title Fix perplexity calculation and resulting overcompress… Fix perplexity calculation and resulting overcompression Jan 20, 2025
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.

1 participant