def METHOD_NAME(dataloader: DataLoader):
    accum_loss = torch.zeros(1, device=get_current_device())
    for batch in dataloader:
        batch = move_to_cuda(batch)
        outputs = model(**batch)
        val_loss, logits = outputs[:2]
        accum_loss.add_(val_loss)
        if num_labels > 1:
            preds = torch.argmax(logits, axis=1)
        elif num_labels == 1:
            preds = logits.squeeze()
        labels = batch["labels"]
        metric.add_batch(predictions=preds, references=labels)
    results = metric.compute()
    dist.all_reduce(accum_loss.div_(len(dataloader)))
    if coordinator.is_master():
        results['loss'] = accum_loss.item() / coordinator.world_size
    return results