Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nb/Gemma4_(E2B)_GRPO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5364,7 +5364,7 @@
"from safetensors import safe_open\n",
"\n",
"tensors = {}\n",
"with safe_open(\"grpo_saved_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
"with safe_open(\"gemma_4_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
" # Verify both A and B are non zero\n",
" for key in f.keys():\n",
" tensor = f.get_tensor(key)\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/Gemma4_(E2B)_Reinforcement_Learning_2048_Game.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11731,7 +11731,7 @@
"from safetensors import safe_open\n",
"\n",
"tensors = {}\n",
"with safe_open(\"grpo_saved_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
"with safe_open(\"gemma_4_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
" # Verify both A and B are non zero\n",
" for key in f.keys():\n",
" tensor = f.get_tensor(key)\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/Gemma4_(E2B)_Reinforcement_Learning_Sudoku_Game.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8163,7 +8163,7 @@
"from safetensors import safe_open\n",
"\n",
"tensors = {}\n",
"with safe_open(\"grpo_saved_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
"with safe_open(\"gemma_4_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
" # Verify both A and B are non zero\n",
" for key in f.keys():\n",
" tensor = f.get_tensor(key)\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/Kaggle-Whisper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since tokenizer is actually a WhisperProcessor (as indicated by its usage in DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer)), you can pass the processor itself directly to processing_class instead 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 if predict_with_generate is enabled).

Suggested change
" processing_class = tokenizer.feature_extractor,\n",
" processing_class = tokenizer,\n",

" compute_metrics = compute_metrics,\n",
" args = Seq2SeqTrainingArguments(\n",
" # predict_with_generate = True,\n",
Expand Down
4 changes: 2 additions & 2 deletions nb/Qwen3_5_(4B)_Vision_GRPO.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8435,7 +8435,7 @@
"output_type": "execute_result",
"data": {
"text/plain": [
"['grpo_lora/processor_config.json']"
"['qwen_lora/processor_config.json']"
]
},
"metadata": {},
Expand Down Expand Up @@ -8469,7 +8469,7 @@
"from safetensors import safe_open\n",
"\n",
"tensors = {}\n",
"with safe_open(\"grpo_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
"with safe_open(\"qwen_lora/adapter_model.safetensors\", framework = \"pt\") as f:\n",
" # Verify both A and B are non zero\n",
" for key in f.keys():\n",
" tensor = f.get_tensor(key)\n",
Expand Down
2 changes: 1 addition & 1 deletion nb/Whisper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since tokenizer is actually a WhisperProcessor (as indicated by its usage in DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer)), you can pass the processor itself directly to processing_class instead 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 if predict_with_generate is enabled).

Suggested change
" processing_class = tokenizer.feature_extractor,\n",
" processing_class = tokenizer,\n",

" compute_metrics = compute_metrics,\n",
" args = Seq2SeqTrainingArguments(\n",
" # predict_with_generate = True,\n",
Expand Down
2 changes: 1 addition & 1 deletion original_template/Whisper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since tokenizer is actually a WhisperProcessor (as indicated by its usage in DataCollatorSpeechSeq2SeqWithPadding(processor=tokenizer)), you can pass the processor itself directly to processing_class instead 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 if predict_with_generate is enabled).

Suggested change
" processing_class = tokenizer.feature_extractor,\n",
" processing_class = tokenizer,\n",

" compute_metrics=compute_metrics,\n",
" args = Seq2SeqTrainingArguments(\n",
" # predict_with_generate=True,\n",
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/Kaggle-Whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since tokenizer is actually a WhisperProcessor (as indicated by its usage in DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer)), you can pass the processor itself directly to processing_class instead 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 if predict_with_generate is enabled).

Suggested change
processing_class = tokenizer.feature_extractor,
processing_class = tokenizer,

compute_metrics = compute_metrics,
args = Seq2SeqTrainingArguments(
# predict_with_generate = True,
Expand Down
2 changes: 1 addition & 1 deletion python_scripts/Whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since tokenizer is actually a WhisperProcessor (as indicated by its usage in DataCollatorSpeechSeq2SeqWithPadding(processor = tokenizer)), you can pass the processor itself directly to processing_class instead 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 if predict_with_generate is enabled).

Suggested change
processing_class = tokenizer.feature_extractor,
processing_class = tokenizer,

compute_metrics = compute_metrics,
args = Seq2SeqTrainingArguments(
# predict_with_generate = True,
Expand Down
Loading