Since you are using nn.DataParallel, your model will be replicated onto each specified GPU and the data will be split among the batch dimension so that each replica on each device can calculate the forward and backward pass independently. The 4*12GB=48GB are thus not usable together as one device for your model.
Could you try to lower the batch size, remove nn.DataParallel, and check which batch size would work for a single GPU workflow?