From fc25b4e525cf858b060392a98cfadde9953f754b Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 16 Feb 2024 01:59:40 +1100 Subject: [PATCH] Updated Home (markdown) --- Home.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Home.md b/Home.md index 75670fd..2a8b38b 100644 --- a/Home.md +++ b/Home.md @@ -55,16 +55,19 @@ model.save_pretrained_merged("model", tokenizer, save_method = "lora",) model.push_to_hub_merged("hf/model", tokenizer, save_method = "lora", token = "") ``` -### Evaluation Loop OOM or crashing. +### Evaluation Loop - also OOM or crashing. Set the trainer settings for evaluation to: ```python -TrainingArguments( - fp16_full_eval = True, - per_device_eval_batch_size = 2, - eval_accumulation_steps = 4, - evaluation_strategy = "steps", - eval_steps = 1, -) +SFTTrainer( + args = TrainingArguments( + fp16_full_eval = True, + per_device_eval_batch_size = 2, + eval_accumulation_steps = 4, + evaluation_strategy = "steps", + eval_steps = 1, + ), + train_dataset = train_dataset, + eval_dataset = eval_dataset, ``` This will cause no OOMs and make it somewhat faster with no upcasting to float32.