Skip to content

Commit 78a9a84

Browse files
authored
Add add_bos_token for Llama3(Instruct) xpu evaluation (#2209)
Signed-off-by: Kaihui-intel <[email protected]>
1 parent 177a9c2 commit 78a9a84

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_gpu_woq.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
help="Save accuracy results path.")
5151
parser.add_argument("--tasks", default="lambada_openai", type=str, \
5252
help="tasks list for accuracy validation")
53+
parser.add_argument("--add_bos_token", action="store_true", help="whether to add bos token for accuracy validation.")
5354
# ============WeightOnlyQuant configs===============
5455
parser.add_argument("--bits", type=int, default=4, choices=[4])
5556
parser.add_argument("--woq", action="store_true")
@@ -339,7 +340,8 @@
339340
user_model = user_model,
340341
tasks = args.tasks,
341342
device = args.device,
342-
batch_size = args.eval_batch_size)
343+
batch_size = args.eval_batch_size,
344+
add_bos_token = args.add_bos_token,)
343345
results = evaluate(args)
344346
for task_name in args.tasks.split(","):
345347
if task_name == "wikitext":

0 commit comments

Comments
 (0)