I’m so sorry that happened to you. Does the mother have a dark place to hide? Is she in a calm and quiet room? The best thing you can do is to leave the mother with lots of tissue paper, water, and food and make sure she is in a stress-free environment. Disturb her as little as possible.
It is possible that she killed some of her pups because she’s worried that there isn’t enough food, or that she can’t take care of them all. However, you said they died, so it might just be that they didn’t survive. Dispose of the bodies of you haven’t already.
As you’ll find in the article, try to keep the hamsters in a quiet room, and don’t disturb them. The mother will generally know what to do. If the mother is very young, she may not be able to take care of them, unfortunately.