(self)
| 194 | pass |
| 195 | |
| 196 | def test_tiny_model(self): |
| 197 | model_name = "sshleifer/bart-tiny-random" |
| 198 | tiny = AutoModel.from_pretrained(model_name) # same vocab size |
| 199 | tok = AutoTokenizer.from_pretrained(model_name) # same tokenizer |
| 200 | inputs_dict = tok.batch_encode_plus(["Hello my friends"], return_tensors="pt") |
| 201 | |
| 202 | with torch.no_grad(): |
| 203 | tiny(**inputs_dict) |
| 204 | |
| 205 | |
| 206 | EN_CODE = 250004 |
nothing calls this directly
no test coverage detected