Are you sure? This is the test I’m performing:

from torch.utils.data import WeightedRandomSampler

n = 100000
w = [0.5, 0.1, 0.1, 0.1, 0.1, 0.1]
l = list(WeightedRandomSampler(w, n))

for i in range(6):
    print(f'{i} - {100.0 * l.count(i) / n}%')

This is my output:
0 - 50.038%
1 - 9.967%
2 - 9.922%
3 - 10.028%
4 - 9.9%
5 - 10.145%

It might be the way you’re computing the weights from that dictionary you have.