Merge pull request #365 from unslothai/fix/gguf-gemma-with-text

fixing gguf export for gemma with text
This commit is contained in:
Manan Shah 2026-03-10 17:59:22 -07:00 committed by GitHub
commit e2df9a4a38

View file

@ -2564,6 +2564,10 @@ class UnslothTrainer:
if eval_dataset is not None:
trainer_kwargs["eval_dataset"] = eval_dataset
self.trainer = SFTTrainer(**trainer_kwargs)
# Restore the full processor as processing_class so checkpoint
# saves include preprocessor_config.json (needed for GGUF export).
if sft_tokenizer is not self.tokenizer:
self.trainer.processing_class = self.tokenizer
print("Trainer initialized\n")
# ========== TRAIN ON RESPONSES ONLY ==========