#934·LMFlow

[BUG]unexpected behavior on qwen 2.5 series templates

Author: xypan0Created Feb 26, 2025Updated Feb 27, 2025

Describe the bug When using qwen 2.5 series templates, tokenizer.apply_chat_template throw Jinja error

To Reproduce Steps to reproduce the behavior:

  1. Create a conversation dataset without a system prompt
  2. use qwen 2.5 series template
  3. The error occurs.

Additional context https://github.com/OptimalScale/LMFlow/blob/main/src/lmflow/tokenization/hf_decoder_model.py#L160 Here the code does not handle None system prompt properly.