Skip to content

Commit

Permalink
update MII benchmark to reflect changes in output type (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwyattii authored Nov 21, 2023
1 parent 8c551d2 commit b116838
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmarks/inference/mii/run_benchmark_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def call_mii(client, input_tokens, max_new_tokens, stream):

def callback(response):
nonlocal time_last_token
# print(f"Received: {response.response} time_last_token={time_last_token}")
output_tokens.append(response.response[0])
# print(f"Received: {response[0].generated_text} time_last_token={time_last_token}")
output_tokens.append(response[0].generated_text)
time_now = time.time()
token_gen_time.append(time_now - time_last_token)
time_last_token = time_now
Expand All @@ -90,7 +90,7 @@ def callback(response):
else:
result = client.generate(
input_tokens, max_new_tokens=max_new_tokens)
output_tokens = result.response[0]
output_tokens = result[0].generated_text

return ResponseDetails(
generated_tokens=output_tokens,
Expand Down

0 comments on commit b116838

Please sign in to comment.