-
Notifications
You must be signed in to change notification settings - Fork 941
Fix LoRA reload path in Gemma4 and Qwen3.5 GRPO notebooks #291
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -675,7 +675,7 @@ | |||||
| " train_dataset = train_dataset,\n", | ||||||
| " data_collator = DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer),\n", | ||||||
| " eval_dataset = test_dataset,\n", | ||||||
| " tokenizer = tokenizer.feature_extractor,\n", | ||||||
| " processing_class = tokenizer.feature_extractor,\n", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since
Suggested change
|
||||||
| " compute_metrics = compute_metrics,\n", | ||||||
| " args = Seq2SeqTrainingArguments(\n", | ||||||
| " # predict_with_generate = True,\n", | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -682,7 +682,7 @@ | |||||
| " train_dataset = train_dataset,\n", | ||||||
| " data_collator = DataCollatorSpeechSeq2SeqWithPadding(processor=tokenizer),\n", | ||||||
| " eval_dataset = test_dataset,\n", | ||||||
| " tokenizer = tokenizer.feature_extractor,\n", | ||||||
| " processing_class = tokenizer.feature_extractor,\n", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since
Suggested change
|
||||||
| " compute_metrics=compute_metrics,\n", | ||||||
| " args = Seq2SeqTrainingArguments(\n", | ||||||
| " # predict_with_generate=True,\n", | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -195,7 +195,7 @@ def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> | |||||
| train_dataset = train_dataset, | ||||||
| data_collator = DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer), | ||||||
| eval_dataset = test_dataset, | ||||||
| tokenizer = tokenizer.feature_extractor, | ||||||
| processing_class = tokenizer.feature_extractor, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since
Suggested change
|
||||||
| compute_metrics = compute_metrics, | ||||||
| args = Seq2SeqTrainingArguments( | ||||||
| # predict_with_generate = True, | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -195,7 +195,7 @@ def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> | |||||
| train_dataset = train_dataset, | ||||||
| data_collator = DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer), | ||||||
| eval_dataset = test_dataset, | ||||||
| tokenizer = tokenizer.feature_extractor, | ||||||
| processing_class = tokenizer.feature_extractor, | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since
Suggested change
|
||||||
| compute_metrics = compute_metrics, | ||||||
| args = Seq2SeqTrainingArguments( | ||||||
| # predict_with_generate = True, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
tokenizeris actually aWhisperProcessor(as indicated by its usage inDataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer)), you can pass the processor itself directly toprocessing_classinstead of just its feature extractor. This is the recommended approach in modern Transformers, and it ensures that both the feature extractor and the tokenizer are available to the trainer (e.g., for saving the processor or ifpredict_with_generateis enabled).