Fix slow gpu tests lysandre (#4487)

* There is one missing key in BERT

* Correct device for CamemBERT model

* RoBERTa tokenization adding prefix space

* Style
This commit is contained in:
Lysandre Debut
2020-05-20 11:59:45 -04:00
committed by GitHub
parent 6dc52c78d8
commit 14cb5b35fa
3 changed files with 8 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ class CamembertModelIntegrationTest(unittest.TestCase):
@slow
def test_output_embeds_base_model(self):
model = CamembertModel.from_pretrained("camembert-base")
model.to(torch_device)
input_ids = torch.tensor(
[[5, 121, 11, 660, 16, 730, 25543, 110, 83, 6]], device=torch_device, dtype=torch.long,