Skip to content

Commit a41d5f2

Browse files
author
zhuyuhua-v
authored
fix LLM fp16 json parse on windows (#4750) (#4761)
Signed-off-by: zhuyuhua-v <yuhua.zhu@intel.com>
1 parent d84677e commit a41d5f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/gpu/llm/inference/run_generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def run_accuracy():
243243

244244
######################## run generation benchmark ########################
245245
current_path = pathlib.Path(__file__).parent.resolve()
246-
with open(str(current_path) + "/prompt.json") as f:
246+
with open(str(current_path) + "/prompt.json", encoding="utf8") as f:
247247
prompt_pool = json.load(f)
248248

249249
def run_generate(num_tokens, num_input_tokens, num_beams):
@@ -269,7 +269,7 @@ def run_generate(num_tokens, num_input_tokens, num_beams):
269269
generate_kwargs["token_latency"] = True
270270

271271
# Accuracy check, take the ref_prompt as reference for check
272-
f1 = open(os.path.join(os.path.dirname(__file__), "ref_prompt.json"))
272+
f1 = open(os.path.join(os.path.dirname(__file__), "ref_prompt.json"), encoding="utf8")
273273
prompt_json = json.load(f1)
274274
f1.close()
275275
ref_prompt=None

0 commit comments

Comments
 (0)