| 291 | return {"input_ids": torch.tensor(DUMMY_INPUTS)} |
| 292 | |
| 293 | def __init__(self, config, *inputs, **kwargs): |
| 294 | super().__init__() |
| 295 | if not isinstance(config, PretrainedConfig): |
| 296 | raise ValueError( |
| 297 | "Parameter config in `{}(config)` should be an instance of class `PretrainedConfig`. " |
| 298 | "To create a model from a pretrained model use " |
| 299 | "`model = {}.from_pretrained(PRETRAINED_MODEL_NAME)`".format( |
| 300 | self.__class__.__name__, self.__class__.__name__ |
| 301 | ) |
| 302 | ) |
| 303 | # Save config in model |
| 304 | self.config = config |
| 305 | |
| 306 | @property |
| 307 | def base_model(self): |