| 14 | |
| 15 | # === Processor & Tokenizer Interface Definitions === |
| 16 | class Tokenizer(Protocol): |
| 17 | padding_side: str |
| 18 | pad_token_id: int |
| 19 | |
| 20 | def __call__(self, text: Union[str, Sequence[str]], return_tensors: str = "pt", **kwargs) -> BatchEncoding: |
| 21 | ... |
| 22 | |
| 23 | def encode(self, inputs: str, add_special_tokens: bool = False) -> List[int]: |
| 24 | ... |
| 25 | |
| 26 | def decode(self, output_ids: Union[torch.Tensor, Sequence[int]], **kwargs) -> str: |
| 27 | ... |
| 28 | |
| 29 | def batch_decode(self, output_ids: Union[torch.Tensor, Sequence[Sequence[int]]], **kwargs) -> List[str]: |
| 30 | ... |
| 31 | |
| 32 | |
| 33 | class ImageProcessor(Protocol): |
nothing calls this directly
no outgoing calls
no test coverage detected