Skip to content

Commit 1158d32

Browse files
Add add_bos_token for Llama3 evaluation (#2179)
* add_bos_token for llama3 Signed-off-by: Kaihui-intel <[email protected]> * Update code Co-authored-by: Copilot <[email protected]> --------- Signed-off-by: Kaihui-intel <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent fc93c0e commit 1158d32

File tree

1 file changed

+3
-1
lines changed
  • examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/transformers/weight_only/text-generation

1 file changed

+3
-1
lines changed

examples/3.x_api/pytorch/nlp/huggingface_models/language-modeling/quantization/transformers/weight_only/text-generation/run_generation_cpu_woq.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
type=str,
4141
help="tasks list for accuracy validation",
4242
)
43+
parser.add_argument("--add_bos_token", action="store_true", help="whether to add bos token for accuracy validation.")
4344
# ============WeightOnlyQuant configs===============
4445
parser.add_argument("--woq", action="store_true")
4546
parser.add_argument(
@@ -387,7 +388,8 @@
387388
model_args=model_args,
388389
tasks = args.tasks,
389390
device = "cpu",
390-
batch_size = args.eval_batch_size)
391+
batch_size = args.eval_batch_size,
392+
add_bos_token = args.add_bos_token,)
391393
results = evaluate(args)
392394
for task_name in args.tasks.split(","):
393395
if task_name == "wikitext":

0 commit comments

Comments
 (0)