Decodes a sequence of tokens into a string.
(tokens)
| 50 | |
| 51 | @staticmethod |
| 52 | def decode_tokens(tokens): |
| 53 | """Decodes a sequence of tokens into a string.""" |
| 54 | return "".join(list(map(BitNetInference.decode_token, tokens))) |
| 55 | |
| 56 | def generate(self, input_str, length): |
| 57 | """Generates a sequence of tokens based on the input string.""" |