A named tuple containing information about a token's log probability.
| 23 | |
| 24 | @dataclass |
| 25 | class 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 |
no outgoing calls