Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Prefilling Assistant Response w/ Chat Templates #2248

Open
haileyschoelkopf opened this issue Aug 23, 2024 · 1 comment · May be fixed by #2274
Open

Allow Prefilling Assistant Response w/ Chat Templates #2248

haileyschoelkopf opened this issue Aug 23, 2024 · 1 comment · May be fixed by #2274
Labels
feature request A feature that isn't implemented yet.

Comments

@haileyschoelkopf
Copy link
Collaborator

Models that are open-source and/or used via local-completions, as well as Claude, allow one to "prefill" the start of the assistant's response to a given input: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prefill-claudes-response

We don't currently support this with the current chat templating. We should consider supporting this via a new doc_to_text_response_prefill (name TBD...) field in the config file, for portions of input that are post-pended after applying a chat template.

One downside is that we would have to make models that can't accept such prefilled responses error out or ignore the prefill when evaluating on a task that uses this, and also this would further complicate the construction of contexts. So somewhat a tough decision. But Llama-3 uses this for tasks such as evaluation on MBPP so it's worth considering

@haileyschoelkopf haileyschoelkopf added the feature request A feature that isn't implemented yet. label Aug 23, 2024
@baberabb
Copy link
Contributor

They also use it for MMLU:
'gen_prefix': 'The best answer is '

@baberabb baberabb linked a pull request Sep 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature that isn't implemented yet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants