Skip to content

use null tokenizer #13480

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

Merged
merged 8 commits into from
May 12, 2025
Merged

use null tokenizer #13480

merged 8 commits into from
May 12, 2025

Conversation

malay-nagda
Copy link
Collaborator

@malay-nagda malay-nagda commented May 7, 2025

Important

The Update branch button must only be pressed in very rare occassions.
An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.

What does this PR do ?

Tokenizer defaults to NullTokenizer. Provides option to use HuggingFace Tokenizer.

Collection: [llm]

Changelog

if args.use_hf_tokenizer:
        recipe.data.tokenizer = hf_tokenizer(HF_MODEL_URI)
else:
        recipe.data.tokenizer = run.Config(
            get_nmt_tokenizer, library="null", model_name="NullTokenizer", vocab_size=128256
       )

Usage

Use --use_hf_tokenizer CLI argument to use HuggingFace tokenizer instead of default NullTokenizer.

NOTE: HuggingFace Tokenizer will be downloaded if used and the following will be required-

  • HuggingFace Access Token
  • "TRANSFORMERS_OFFLINE": "0" env var in Executor.env_vars

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

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.

Additional Information

  • Related to # (issue)

malay-nagda and others added 2 commits May 7, 2025 17:59
Signed-off-by: Malay Nagda <[email protected]>
@malay-nagda malay-nagda requested a review from erhoo82 May 7, 2025 12:38
Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>
@malay-nagda malay-nagda marked this pull request as ready for review May 7, 2025 16:54
@malay-nagda malay-nagda requested review from yaoyu-33 and guyueh1 May 7, 2025 16:56
guyueh1
guyueh1 previously approved these changes May 7, 2025
Copy link
Collaborator

@guyueh1 guyueh1 left a comment

Choose a reason for hiding this comment

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

LGTM

@ko3n1g ko3n1g added Run CICD and removed Run CICD labels May 7, 2025
@github-actions github-actions bot removed the Run CICD label May 7, 2025
Copy link
Contributor

github-actions bot commented May 7, 2025

[🤖]: Hi @malay-nagda 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

Due to a major CI change, merges are currently handled by the automation team.
We will reach out to you quickly to merge this PR, but you can always reach us with the following handles:

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

@ko3n1g
Copy link
Collaborator

ko3n1g commented May 7, 2025

CI is ready, let us know when to merge

Signed-off-by: Malay Nagda <[email protected]>
Signed-off-by: Malay Nagda <[email protected]>
erhoo82
erhoo82 previously approved these changes May 12, 2025
Copy link
Contributor

[🤖]: Hi @malay-nagda 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

@github-actions github-actions bot removed the Run CICD label May 12, 2025
@erhoo82 erhoo82 merged commit 457a949 into main May 12, 2025
58 checks passed
@erhoo82 erhoo82 deleted the malay/null_tokenizer branch May 12, 2025 17:01
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.

4 participants