From 625cfacdbf71eabe04ee1c005f3a54da537fd034 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Thu, 28 Sep 2023 11:29:10 -0400 Subject: [PATCH] don't strip the prompt for check since we don't strip to tokenize anymore --- src/axolotl/prompt_tokenizers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/axolotl/prompt_tokenizers.py b/src/axolotl/prompt_tokenizers.py index 31bb73c2f..1b3933664 100644 --- a/src/axolotl/prompt_tokenizers.py +++ b/src/axolotl/prompt_tokenizers.py @@ -81,7 +81,7 @@ def _tokenize( self, prompt: str, add_eos_token: bool = True, strip_bos_token: bool = False ) -> BatchEncoding: result: BatchEncoding - if not prompt.strip(): + if not prompt: LOG.warning("Empty text requested for tokenization.") result = BatchEncoding(data={"input_ids": [], "attention_mask": []}) else: