(self, s: str)
| 29 | return self._decoder_start_id |
| 30 | |
| 31 | def encode(self, s: str) -> mx.array: |
| 32 | return mx.array( |
| 33 | self._tokenizer( |
| 34 | s, |
| 35 | return_tensors="np", |
| 36 | return_attention_mask=False, |
| 37 | )["input_ids"] |
| 38 | ) |
| 39 | |
| 40 | def decode(self, t: List[int], with_sep: bool = True) -> str: |
| 41 | tokens = self._tokenizer.convert_ids_to_tokens(t) |
nothing calls this directly
no outgoing calls
no test coverage detected