-
Notifications
You must be signed in to change notification settings - Fork 264
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
Added unittest for structured_compress_prompt and fixed bugs #95
Merged
+225
−32
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SiyunZhao
added
bug
Something isn't working
feature
feature
style
some problem of code style
labels
Feb 26, 2024
SiyunZhao
force-pushed
the
siyun-unittest/LLMLingua
branch
from
February 26, 2024 06:21
ffa8928
to
7f033b9
Compare
iofu728
approved these changes
Feb 28, 2024
@@ -953,26 +973,12 @@ def sync_sentence(segments, text): | |||
new_segments_info = [] | |||
for s in sentences: | |||
tmp = [jj for ii, jj in enumerate(s) if sentence_flags[idx + ii]] | |||
res.append("\n".join(tmp)) | |||
res.append("".join(tmp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to a customizable parameter.
Todo:
|
iofu728
added a commit
that referenced
this pull request
Feb 28, 2024
* update the definition of compression ratio, structured prompt compress * merge part of structured_compress_prompt into compress_prompt * add no-compression retention to sentence and context level filter * update global ratio and global target token * fix segments_info error * change input paramete from ratio to rate * change parameter name * Feature(LLMLingua): add template & test scripts * Feature(LLMLingua): add pre commit check & unittest * Feature(LLMLingua): update the release script * Feature(LLMLingua): add HF_TOKEN * Added unittest for structured_compress_prompt and fixed bugs (#95) - fix bugs and add unittests - make style - add nltk init - fix nltk file exist error - add unittest for different models --------- Co-authored-by: siyunzhao <siyunzhao@microsoft.com> Co-authored-by: Qianhui Wu <wuqh_thu@foxmail.com> Co-authored-by: Xufang Luo <34053802+XufangLuo@users.noreply.github.com> Co-authored-by: Yuqing Yang <justin.yqyang@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.