KEMBAR78
[finetune] Add dataset_kwargs to prepare packed sequence data by jiajunly · Pull Request #14169 · NVIDIA-NeMo/NeMo · GitHub
Skip to content

Conversation

@jiajunly
Copy link
Contributor

@jiajunly jiajunly commented Jul 9, 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 ?

Fix #14168

Collection: [Note which collection this PR will affect]

Changelog

  • Add specific line by line info of high level changes in this PR.

Usage

For data with chat_template

    data = FineTuningDataModule(
        dataset_root=DATA_ROOT,
        seq_length=max_sequence_length,
        global_batch_size=8,
        micro_batch_size=1,
        tokenizer=tokenizer,
        num_workers=4,
        packed_sequence_specs = PackedSequenceSpecs(packed_sequence_size=2048),
        dataset_kwargs=dict(
            chat=True,
            use_hf_tokenizer_chat_template=True,
        ),
    )

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

Signed-off-by: Liu Jiajun <939282975@qq.com>
@cuichenx cuichenx requested review from cuichenx and jenchen13 July 15, 2025 18:13
Copy link
Collaborator

@jenchen13 jenchen13 left a comment

Choose a reason for hiding this comment

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

LGTM

@jenchen13
Copy link
Collaborator

I have a similar PR to enable packed sequence in ChatDataModule #14116 . will rebase after you merge

@jenchen13 jenchen13 merged commit ada066c into NVIDIA-NeMo:main Jul 16, 2025
221 checks passed
@jiajunly jiajunly deleted the patch-1 branch July 17, 2025 02:20
AmirHussein96 pushed a commit to AmirHussein96/NeMo that referenced this pull request Jul 23, 2025
Signed-off-by: Liu Jiajun <939282975@qq.com>
Signed-off-by: Amir Hussein <amhussein@nvidia.com>
monica-sekoyan pushed a commit that referenced this pull request Aug 4, 2025
Signed-off-by: Liu Jiajun <939282975@qq.com>
nasretdinovr pushed a commit to nasretdinovr/NeMo that referenced this pull request Aug 8, 2025
Signed-off-by: Liu Jiajun <939282975@qq.com>
guyueh1 pushed a commit to guyueh1/NeMo that referenced this pull request Aug 25, 2025
Signed-off-by: Liu Jiajun <939282975@qq.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dataset_kwargs in FineTuningDataModule

3 participants