MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _decode_token

Method _decode_token

fastdeploy/entrypoints/llm.py:392–394  ·  view source on GitHub ↗

Decodes a single token ID into its string representation.

(self, token_id: int)

Source from the content-addressed store, hash-verified

390 return req_ids
391
392 def _decode_token(self, token_id: int) -> str:
393 """Decodes a single token ID into its string representation."""
394 return self.llm_engine.data_processor.process_logprob_response([token_id], clean_up_tokenization_spaces=False)
395
396 def _build_sample_logprobs(self, logprobs_lists: LogprobsLists, topk_logprobs: int) -> list[dict[int, Logprob]]:
397 """

Callers 3

test_decode_tokenMethod · 0.45

Calls 1

Tested by 1

test_decode_tokenMethod · 0.36