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

Class Logprob

fastdeploy/worker/output.py:25–32  ·  view source on GitHub ↗

A named tuple containing information about a token's log probability.

Source from the content-addressed store, hash-verified

23
24@dataclass
25class Logprob:
26 """
27 A named tuple containing information about a token's log probability.
28 """
29
30 logprob: float
31 rank: Optional[int] = None
32 decoded_token: Optional[str] = None
33
34
35# [{token_id, logprob}] for tokens sampled from the top-k

Calls

no outgoing calls