Decodes a list of tokens into bytes. ``` >>> enc.decode_bytes([31373, 995]) b'hello world' ```
(self, tokens: Sequence[int])
| 263 | # ==================== |
| 264 | |
| 265 | def decode_bytes(self, tokens: Sequence[int]) -> bytes: |
| 266 | """Decodes a list of tokens into bytes. |
| 267 | |
| 268 | ``` |
| 269 | >>> enc.decode_bytes([31373, 995]) |
| 270 | b'hello world' |
| 271 | ``` |
| 272 | """ |
| 273 | return self._core_bpe.decode_bytes(tokens) |
| 274 | |
| 275 | def decode(self, tokens: Sequence[int], errors: str = "replace") -> str: |
| 276 | """Decodes a list of tokens into a string. |
no outgoing calls