build: Upgrade TRL version from 0.14 to 0.16#527
Merged
dushyantbehl merged 16 commits intofoundation-model-stack:mainfrom Apr 14, 2025
Merged
build: Upgrade TRL version from 0.14 to 0.16#527dushyantbehl merged 16 commits intofoundation-model-stack:mainfrom
dushyantbehl merged 16 commits intofoundation-model-stack:mainfrom
Conversation
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
|
Thanks for making a pull request! 😃 |
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Abhishek-TAMU
commented
Apr 11, 2025
Collaborator
dushyantbehl
left a comment
There was a problem hiding this comment.
Need to clear out the PT support with TRL if its not working.
Else LGTM.
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
| _validate_training_output(checkpoint, "ft") | ||
|
|
||
|
|
||
| @pytest.mark.skipif(True, reason="This test is always skipped") |
Collaborator
There was a problem hiding this comment.
Suggested change
| @pytest.mark.skipif(True, reason="This test is always skipped") | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| ############################# Prompt Tuning Tests ############################# | ||
|
|
||
|
|
||
| @pytest.mark.skipif(True, reason="This test is always skipped") |
Collaborator
There was a problem hiding this comment.
Suggested change
| @pytest.mark.skipif(True, reason="This test is always skipped") | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| assert "### Text: @NortonSupport Thanks much.\n\n### Label:" in output_inference | ||
|
|
||
|
|
||
| @pytest.mark.skipif(True, reason="This test is always skipped") |
Collaborator
There was a problem hiding this comment.
Suggested change
| @pytest.mark.skipif(True, reason="This test is always skipped") | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| assert "### Text: @NortonSupport Thanks much.\n\n### Label:" in output_inference | ||
|
|
||
|
|
||
| @pytest.mark.skipif(True, reason="This test is always skipped") |
Collaborator
There was a problem hiding this comment.
Suggested change
| @pytest.mark.skipif(True, reason="This test is always skipped") | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| tuning_config = peft_config.PromptTuningConfig( | ||
| prompt_tuning_init="TEXT", | ||
| prompt_tuning_init_text="hello", | ||
| num_virtual_tokens=0, |
Collaborator
There was a problem hiding this comment.
To the above as well
Suggested change
| num_virtual_tokens=0, | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| _validate_training(tempdir, check_eval=True) | ||
|
|
||
|
|
||
| @pytest.mark.skipif(True, reason="This test is always skipped") |
Collaborator
There was a problem hiding this comment.
Suggested change
| @pytest.mark.skipif(True, reason="This test is always skipped") | |
| @pytest.mark.skipif(True, reason="This test is deprecated so always skipped") |
| ) | ||
|
|
||
| # packing for non tokenized dataset doesn't require a collator with SFTrainer. | ||
| # With SFTTrainer, packing for a tokenized dataset uses default Collator, |
Collaborator
There was a problem hiding this comment.
With SFTTrainer, packing for both tokenized and non tokenized dataset use default collator, DataCollatorForLanguageModeling, and we do not need to pass any explicit collator in that case.
Collaborator
dushyantbehl
left a comment
There was a problem hiding this comment.
Minor nits requested but looks okay.
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Collaborator
Author
|
@dushyantbehl Fixed the PR changes. |
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
kmehant
pushed a commit
that referenced
this pull request
Apr 28, 2025
* Upgrade TRL version Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Add attention mask in dataset Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Version increase to 0.16.1 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Prompt tuning arg assign num_virtual_tokens=0 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Prompt tuning arg assign num_virtual_tokens=0 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * undocumented Prompt tuning and commented its unit tests Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove DataCollatorForSeq2Seq for tokenized dataset with packing Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove DataCollatorForSeq2Seq for tokenized dataset with packing Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Skipped PT tests Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * PR Changes Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * PR Changes Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Fix lint Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove enable_reduce_loss_sum and _is_peft_model check Signed-off-by: Abhishek <maurya.abhishek@ibm.com> --------- Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
dushyantbehl
pushed a commit
to dushyantbehl/fms-hf-tuning
that referenced
this pull request
Jun 23, 2025
) * Upgrade TRL version Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Add attention mask in dataset Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Version increase to 0.16.1 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Prompt tuning arg assign num_virtual_tokens=0 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Prompt tuning arg assign num_virtual_tokens=0 Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * undocumented Prompt tuning and commented its unit tests Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove DataCollatorForSeq2Seq for tokenized dataset with packing Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove DataCollatorForSeq2Seq for tokenized dataset with packing Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Skipped PT tests Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * PR Changes Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * PR Changes Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Fix lint Signed-off-by: Abhishek <maurya.abhishek@ibm.com> * Remove enable_reduce_loss_sum and _is_peft_model check Signed-off-by: Abhishek <maurya.abhishek@ibm.com> --------- Signed-off-by: Abhishek <maurya.abhishek@ibm.com>
This file contains hidden or 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
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.
Description of the change
Upgrade TRL version from 0.14.0 to 0.15.2 for supporting Vision Model Support PR.
Undocumented Prompt tuning.
Replace Prompt Tuning with LoRA tuning in unit test case where features other than Prompt Tuning is tested and Prompt tuning gives error.
Commented out test cases specifically testing Prompt tuning where Prompt tuning gives error.
Related issue number
Issue: https://github.ibm.com/ai-foundation/watson-fm-stack-tracker/issues/1718
How to verify the PR
Was the PR tested