mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
next
This commit is contained in:
parent
4f33ab8bf4
commit
bb2736db4e
2 changed files with 44 additions and 0 deletions
|
|
@ -447,14 +447,31 @@ class ManagedServer:
|
|||
if not self.track_tree and self.tokenizer is not None:
|
||||
input_ids = self._compute_input_ids(prompt, extending_node)
|
||||
completion_kwargs["input_ids"] = input_ids
|
||||
logger.info(
|
||||
"managed_server chat_completion prepared input_ids=%s extending=%s",
|
||||
len(input_ids),
|
||||
extending_node is not None,
|
||||
)
|
||||
else:
|
||||
logger.info(
|
||||
"managed_server chat_completion using prompt passthrough track_tree=%s tokenizer=%s",
|
||||
self.track_tree,
|
||||
self.tokenizer is not None,
|
||||
)
|
||||
|
||||
# Call the tokens and logprobs wrapper directly
|
||||
logger.info("managed_server chat_completion calling backend completion wrapper")
|
||||
(
|
||||
prompt_tokens,
|
||||
output_tokens_list,
|
||||
output_logprobs_list,
|
||||
finish_reasons,
|
||||
) = await self.server.tokens_and_logprobs_completion(**completion_kwargs)
|
||||
logger.info(
|
||||
"managed_server chat_completion backend returned prompt_tokens=%s outputs=%s",
|
||||
len(prompt_tokens),
|
||||
len(output_tokens_list),
|
||||
)
|
||||
|
||||
# Track each completion and build choices
|
||||
n = len(output_tokens_list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue