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

Extend Nemo AutoTokenizer & SentencePieceTokenizer API for TensorRT-LLM & AMMO evaluation scripts usage #8818

Closed
wants to merge 8 commits into from

Conversation

janekl
Copy link
Collaborator

@janekl janekl commented Apr 4, 2024

What does this PR do ?

Extending NeMo's AutoTokenizer and SentencePieceTokenizer for consistency with HuggingFace tokenizers API as it is used throughout TensorRT-LLM and AMMO in evaluation tools.

This is necessary to seamlessly enable model validation -- including quantized variants -- with the current scripts and to avoid code duplication.

Example use-cases to support:

Collection: NLP

Changelog

  • adding different variants of encode/decode methods
  • adding pad_token_id (with setter enabled for HF AutoTokenizer wrapper) and eos_token_id property attributes for HF tokenizer

Usage

See examples listed above.

Jenkins CI

To run Jenkins, a NeMo User with write access must comment jenkins on the PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

@janekl
Copy link
Collaborator Author

janekl commented Apr 4, 2024

jenkins

@janekl janekl force-pushed the jlasek/nemo_autotokenizer_extensions branch from 0251e96 to 4abe31d Compare April 12, 2024 12:28
@janekl janekl changed the title Extend Nemo AutoTokenizer API for TensorRT-LLM & AMMO evaluation scripts usage Extend Nemo AutoTokenizer & SentencePieceTokenizer API for TensorRT-LLM & AMMO evaluation scripts usage Apr 12, 2024
@janekl
Copy link
Collaborator Author

janekl commented Apr 12, 2024

jenkins

@janekl janekl force-pushed the jlasek/nemo_autotokenizer_extensions branch from 64350e1 to 708cde7 Compare April 18, 2024 11:19
janekl and others added 8 commits April 18, 2024 13:21
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
…zers

Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
Signed-off-by: Jan Lasek <janek.lasek@gmail.com>
@janekl janekl force-pushed the jlasek/nemo_autotokenizer_extensions branch from 708cde7 to 4c2cc81 Compare April 18, 2024 11:22
@aklife97
Copy link
Collaborator

LGTM, but can we check if autotokenizer and local sentencepiece outputs match for the new methods implemented before we merge?

it is probably fine if they're not identical, but we need to know where the differences arise and also document them if any

Copy link
Contributor

github-actions bot commented May 8, 2024

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label May 8, 2024
@janekl janekl removed the stale label May 8, 2024
Copy link
Contributor

This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days.

@github-actions github-actions bot added the stale label May 23, 2024
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants