Would you like to resample the dataset manually to create the imbalance?
The CIFAR10 dataset should be balanced initially as seen here:
dataset = datasets.CIFAR10(root='PATH')
targets = torch.tensor(dataset.targets)
print(targets.unique(return_counts=True))
> (tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), tensor([5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000]))

If you want to manually resample it, you could have a look at my old tutorial 9.