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

added tokenization tasks to serve tokenization requests #325

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

swith004
Copy link
Contributor

Added tokenization tasks in order to serve tokenization request and return the token count

Signed-off-by: Shonda-Adena-Witherspoon <shonda.adena.witherspoon@ibm.com>
Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! A couple asks:

@evaline-ju evaline-ju linked an issue Feb 21, 2024 that may be closed by this pull request
…task in decorator

Signed-off-by: Shonda-Adena-Witherspoon <shonda.adena.witherspoon@ibm.com>
Copy link
Contributor

@tharapalanivel tharapalanivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Shonda, I did an initial review and added a few comments. Can you please add unit tests around tokenization for the PeftPromptTuningTGIS module too?

caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/modules/text_generation/text_generation_tgis.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
caikit_nlp/toolkit/text_generation/tgis_utils.py Outdated Show resolved Hide resolved
…e.py

Signed-off-by: Shonda-Adena-Witherspoon <shonda.adena.witherspoon@ibm.com>
Copy link
Contributor

@tharapalanivel tharapalanivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one tiny nit but otherwise lgtm! You'll need a duplicate PR to release-0.3 as well for now

caikit_nlp/modules/text_generation/peft_tgis_remote.py Outdated Show resolved Hide resolved
Signed-off-by: Shonda-Adena-Witherspoon <shonda.adena.witherspoon@ibm.com>
@swith004
Copy link
Contributor Author

one tiny nit but otherwise lgtm! You'll need a duplicate PR to release-0.3 as well for now

@tharapalanivel should I make the duplicate PR for the release-0.3 before or after these changes get merged?

@swith004
Copy link
Contributor Author

swith004 commented Feb 27, 2024

Thanks for the contribution! A couple asks:

* A few small unit tests would be helpful for the new module function. We should strive for tests on any new functionality. A section like for the streaming tests https://github.com/caikit/caikit-nlp/blob/main/tests/modules/text_generation/test_text_generation_tgis.py#L135-L161 on each module might be useful to reference.

* We will likely want to allow for the tokenization to also run on prompt tuned models so it'd be good to have the same update here: https://github.com/caikit/caikit-nlp/blob/main/caikit_nlp/modules/text_generation/peft_tgis_remote.py

* [After all updates] For releasing we will want this duplicated to the `release-0.3` branch in order to also release this functionality without embeddings.

@evaline-ju - merging is still block despite Thara's approval for the changes you requested. Not sure how to proceed

@evaline-ju evaline-ju merged commit 2ab8abd into caikit:main Feb 27, 2024
5 checks passed
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.

Expose token count through TGIS
3 participants