Skip to content

Commit

Permalink
Add detailed log for llm service
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyfly committed Dec 14, 2023
1 parent 73b5af2 commit 345f788
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llm/fastdeploy_llm/serving/triton_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def stream_call_back(call_back_task, token_tuple, index, is_last_token,
"OUT", np.array(
[json.dumps(out)], dtype=np.object_))
if is_last_token:
all_token_ids = [t[0] for t in call_back_task.result.completion_tokens]
all_strs = "".join[t[1] for t in call_back_task.result.completion_tokens]
all_token_ids = [t[0] for t in call_back_task.result.completion_tokens] + [token_tuple[0]]
all_strs = "".join[t[1] for t in call_back_task.result.completion_tokens] + [token_tuple[1]]
logger.info("Model output for req_id: {} results_all: {} tokens_all: {}".format(call_back_task.task_id, all_strs, all_token_ids))
sender[call_back_task.task_id].send(
pb_utils.InferenceResponse([out_tensor]),
Expand Down

0 comments on commit 345f788

Please sign in to comment.