Unverified Commit cbadb524 authored by Joe Davison's avatar Joe Davison Committed by GitHub
Browse files

Zero shot distillation script cuda patch (#10284)

parent f1299f50
......@@ -174,7 +174,7 @@ def get_teacher_predictions(
model = AutoModelForSequenceClassification.from_pretrained(model_path)
model_config = model.config
if not no_cuda and torch.cuda.is_available():
model = nn.DataParallel(model)
model = nn.DataParallel(model.cuda())
batch_size *= len(model.device_ids)
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=use_fast_tokenizer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment