Skip to content

Commit

Permalink
Also adopt changes from openvinotoolkit#672
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-savelyevv committed Aug 20, 2024
1 parent fe9789a commit fa051e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llm_bench/python/llm_bench_utils/conversion_utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def save_tokenizer(tokenizer, out_dir):

def transform_fn(item, item_name, input_shapes, tokenizer, config, max_tokens=127):
tokenized_text = tokenizer(item[item_name], return_tensors="np")
input_ids = tokenized_text["input_ids"][:max_tokens]
attention_mask = tokenized_text["attention_mask"][:max_tokens]
input_ids = tokenized_text["input_ids"][:, :max_tokens]
attention_mask = tokenized_text["attention_mask"][:, :max_tokens]

inputs = {}
inputs["input_ids"] = input_ids
Expand Down

0 comments on commit fa051e4

Please sign in to comment.