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

Gen Prefix #2274

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Gen Prefix #2274

wants to merge 5 commits into from

Conversation

baberabb
Copy link
Contributor

@baberabb baberabb commented Sep 2, 2024

closes #2248. Adds a gen_prefix to the assistant message or appends it in case of completion.

Added a couple of TODO comments where I wasn't sure how to proceed.

Also not sure how to deal with unsupported APIs as yet. The gen_prefix is set in the task yaml. We could add a warning and remove it in the models chat template.

labeled_examples,
example,
fewshot_as_multiturn,
gen_prefix,
)
# for loglikelihood create a list of questions with appended choices
elif isinstance(example, list):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't been able to identify when non-chat_template example is a list

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to split fewshot_context func into two: one to make a list of samples, another to make it a valid string
right now i am working on smart truncation that allows users to choose what to truncate and I encountered the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Prefilling Assistant Response w/ Chat Templates
2 participants