Skip to content

Commit

Permalink
Add number of tokens to offline (#1623)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgmpablo157321 authored Feb 12, 2024
1 parent f06b920 commit f9a643c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion language/llama2-70b/SUT.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,10 @@ def process_queries(self):
query_id_list=query_ids)

for i in range(len(qitem)):
n_tokens = processed_output[i].shape[0]
response_array = array.array("B", processed_output[i].tobytes())
bi = response_array.buffer_info()
response = [lg.QuerySampleResponse(qitem[i].id, bi[0], bi[1])]
response = [lg.QuerySampleResponse(qitem[i].id, bi[0], bi[1], n_tokens)]
lg.QuerySamplesComplete(response)

tok = time.time()
Expand Down

0 comments on commit f9a643c

Please sign in to comment.