mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
clean example trainer
This commit is contained in:
parent
fae87dcaaa
commit
e1542ee731
1 changed files with 0 additions and 20 deletions
|
|
@ -348,26 +348,6 @@ async def _generate(request_dict: dict, raw_request: Request) -> Response:
|
|||
ret["prompt_token_ids"] = final_output.prompt_token_ids
|
||||
ret["token_ids"] = [x.token_ids for x in final_output.outputs]
|
||||
|
||||
if (
|
||||
sampling_params.prompt_logprobs is not None
|
||||
and final_output.prompt_logprobs is not None
|
||||
):
|
||||
ret["prompt_logprobs"] = [
|
||||
(
|
||||
{int(tok_id): lp.logprob for tok_id, lp in pos.items()}
|
||||
if pos is not None
|
||||
else None
|
||||
)
|
||||
for pos in final_output.prompt_logprobs
|
||||
]
|
||||
|
||||
logger.info(
|
||||
"POST /generate completed request_id=%s outputs=%s finish_reasons=%s",
|
||||
request_id,
|
||||
len(text_outputs),
|
||||
finish_reasons,
|
||||
)
|
||||
|
||||
return JSONResponse(ret)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue