Skip to content

Commit

Permalink
Merge pull request #232 from instructlab/fix-generic-tmpl
Browse files Browse the repository at this point in the history
Fix generic chat template saved to tokenizer for generation
  • Loading branch information
mergify[bot] authored Sep 30, 2024
2 parents d7f85b8 + 3c5ba04 commit 386c6c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/instructlab/training/chat_templates/ibm_generic_tmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"{% elif message['role'] == 'assistant' %}"
"{{'<|assistant|>' + '\n' + message['content'] + '<|endoftext|>' + ('' if loop.last else '\n')}}"
"{% endif %}"
"{% if loop.last and add_generation_prompt %}"
"{{ '<|assistant|>' + '\n' }}"
"{% endif %}"
"{% endfor %}"
)

0 comments on commit 386c6c0

Please sign in to comment.