OptimalScale / OptimalScale/LMFlow
[BUG]unexpected behavior on qwen 2.5 series templates
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 822
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When using qwen 2.5 series templates, tokenizer.apply_chat_template throw Jinja error
To Reproduce
Steps to reproduce the behavior:
- Create a conversation dataset without a system prompt
- use qwen 2.5 series template
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/lmflow/tokenization/hf_decoder_model.py around line 160 and reproduce the failure with a conversation dataset that has no system prompt and a Qwen 2.5 template. Check the tokenizer.apply_chat_template path and confirm the reproduction completes without the reported Jinja error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100