(self, input_ids)
| 159 | return input_ids |
| 160 | |
| 161 | def decode_code(self, input_ids): |
| 162 | if self.mode == '6b': |
| 163 | texts = self.tokenizer.batch_decode(input_ids) |
| 164 | output_code = [decode_whitespaces(text, self.start_extra_id, self.max_len) for text in texts] |
| 165 | |
| 166 | elif self.mode == '13b': |
| 167 | input_ids = [self.code_dict.decode_tokens(input_ids.tolist()[0])] |
| 168 | texts = self.tokenizer.batch_decode(input_ids) |
| 169 | output_code = [decode_whitespaces(text, self.start_extra_id, self.max_len) for text in texts] |
| 170 | |
| 171 | return output_code |
no test coverage detected