    for step, batch in enumerate(dataloader):
        with accelerator.accumulate(model):
            # Forward pass
            outputs = model(**batch)
            loss = outputs.loss

            total_loss += last_loss
            acc_loss += last_loss
            accelerator.backward(loss)
            del batch, loss, outputs
            torch.cuda.empty_cache()
