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

fix: get_prompt goes wrong for Llama-2 #3444

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yangjunx21
Copy link

@yangjunx21 yangjunx21 commented Jul 13, 2024

Why are these changes needed?

When adding the first user flag (with a message of "None"), and then check the conversation prompt like this:

conv_template.append_message(conv_template.roles[0], None)
conv_template.get_prompt()

The output is "[INST] [INST]". I think this must be a tiny hidden bug for function get_prompt (Llama-2), and I figure out how to fix it.

Related issue number (if applicable)

Some other open-source repositories will use this function to mark the specific slices in the conversation. So this bug may trigger some subtle bug or hard code.

Checks

  • I've run format.sh to lint the changes in this PR.
  • I've included any doc changes needed.
  • I've made sure the relevant tests are passing (if applicable).

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.

1 participant