From 9a89af412f10045559b09c1d4d1911c61a5bb9f6 Mon Sep 17 00:00:00 2001 From: Carlo Marcoli Date: Wed, 7 May 2025 12:17:03 +0100 Subject: [PATCH] Update section3.ipynb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - evaluation_strategy is no longer a valid keyword for the latest trl/transformers API. The parameter was renamed a few releases ago (along with save_strategy, log_strategy, etc.). The parameter name has changed to eval_strategy - tokenizer was taken out of the SFTTrainer constructor in TRL ≥ 0.16. The callable you pass is now called processing_class --- course/en/chapter11/section3.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/en/chapter11/section3.ipynb b/course/en/chapter11/section3.ipynb index 7dd5cdd8..932269d7 100644 --- a/course/en/chapter11/section3.ipynb +++ b/course/en/chapter11/section3.ipynb @@ -153,7 +153,7 @@ " learning_rate=5e-5, # Common starting point for fine-tuning\n", " logging_steps=10, # Frequency of logging training metrics\n", " save_steps=100, # Frequency of saving model checkpoints\n", - " evaluation_strategy=\"steps\", # Evaluate the model at regular intervals\n", + " eval_strategy=\"steps\", # Evaluate the model at regular intervals\n", " eval_steps=50, # Frequency of evaluation\n", " use_mps_device=(\n", " True if device == \"mps\" else False\n", @@ -166,7 +166,7 @@ " model=model,\n", " args=sft_config,\n", " train_dataset=ds[\"train\"],\n", - " tokenizer=tokenizer,\n", + " processing_class=tokenizer,\n", " eval_dataset=ds[\"test\"],\n", ")\n", "\n",