Skip to content

[BUG]unexpected behavior on qwen 2.5 series templates #934

@xypan0

Description

@xypan0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions