Skip to content

Commit

Permalink
Merge pull request caikit#228 from opendatahub-io/fix-input-token-count
Browse files Browse the repository at this point in the history
model_run_utils: return correct input_token_count
  • Loading branch information
gkumbhat authored Oct 10, 2023
2 parents f6d04f0 + 0955ffc commit a1b5674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caikit_nlp/toolkit/text_generation/model_run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def generate_text_func(
)
inputs = {k: v.to(model.device) for k, v in tok_tensors.items()}

input_token_count = len(tok_tensors)
input_token_count = tok_tensors["input_ids"].size(1)

gen_optional_params = __process_gen_args(
tokenizer,
Expand Down

0 comments on commit a1b5674

Please sign in to comment.