Add a response template and generation tags

#4
by Rocketknight1 HF Staff - opened

Adds a response template, so Transformers' parse_response turns the model's output back into a message (reasoning, content and tool calls). The chat template also marks the assistant's output with {% generation %} tags, so return_assistant_tokens_mask (TRL's assistant_only_loss) trains on just that; the tags don't change the rendered text.

Rocketknight1 changed pull request title from Add a response template to Add a response template and generation tags
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment