Skip to content

Add add_bos_token for Llama3 evaluation #2179

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kaihui-intel
Copy link
Contributor

Type of Change

bug fix

Description

model: meta-llama/Llama-3.1-8B-Instruct
add_bos_token default is False.
If the model was trained or fine-tuned with a BOS token, this may lead to incorrect results.

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

Signed-off-by: Kaihui-intel <[email protected]>
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a fix by adding an "--add_bos_token" argument to support proper evaluation when the model is fine-tuned with a beginning-of-sequence token.

  • Added an argument for "add_bos_token" in the CLI parser
  • Modified the function call to include the "add_bos_token" parameter for evaluation

Co-authored-by: Copilot <[email protected]>
Copy link
Contributor

@xin3he xin3he left a comment

Choose a reason for hiding this comment

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

good catch!

@XuehaoSun
Copy link
Contributor

image

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.

3 participants