Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
l-bat committed Nov 15, 2024
1 parent 45ec25a commit a4f86ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/python_tests/test_cache_optimizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_unoptimized_generation_longbench(phi3_converted_model, subset):
)
for i, output in enumerate(ans_batch, start=p_idx-len(batch)+1):
context_len = answers[i]["context_len"]
pred = post_process_pred(output.m_generation_ids, subset, model_name)
pred = post_process_pred(output.m_generation_ids[0], subset, model_name)
answers[i]["pred"] = pred

batch.clear()
Expand Down
2 changes: 1 addition & 1 deletion tests/python_tests/utils_longbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def preprocess_prompt(tokenizer, data_sample, subset, model_name):
return prompt, context_len


def post_process_pred(subset, model_name):
def post_process_pred(pred, subset, model_name):
if subset in ["samsum", "qsum", "hotpotqa", "qasper"] and "Llama-3-8B" in model_name:
pred = pred[:pred.find("assistant")]
elif subset == "samsum":
Expand Down

0 comments on commit a4f86ac

Please sign in to comment.