Skip to content

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 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

@XuehaoSun XuehaoSun merged commit 1158d32 into master Apr 25, 2025
11 checks passed
@XuehaoSun XuehaoSun deleted the kaihui/llama3_eval branch April 25, 2025 02:31
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.

4 participants