diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index 66f6f651..c3b94bc6 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -276,7 +276,7 @@ def _add_or_replace_eos_token(tokenizer: "PreTrainedTokenizer", eos_token: str) def _jinja_escape(content: str) -> str: - return content.replace("\n", r"\n").replace("'", r"\'") + return content.replace("'", r"\'") def _convert_slots_to_jinja(slots: "SLOTS", tokenizer: "PreTrainedTokenizer", placeholder: str = "content") -> str: