Skip to content

Commit

Permalink
Update _utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhanchen committed Nov 21, 2024
1 parent a98fc9c commit 535e899
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions unsloth/models/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ def filter(self, x): return not (self.text in x.getMessage())
except:
pass

# Setting `pad_token_id` to `eos_token_id`
try:
from transformers.generation.utils import logger as transformers_generation_utils_logger
transformers_generation_utils_logger.addFilter(HideLoggingMessage("Setting `pad_token_id` to `eos_token_id`"))
del transformers_generation_utils_logger
except:
pass

# =============================================

# =============================================
Expand Down

0 comments on commit 535e899

Please sign in to comment.