Preheat oven to 350°F. Mash the sweet potatoes and add the melted butter, milk, sugar, vanilla, beaten eggs, and a pinch of salt. Stir until well mixed. Pour into a shallow 2 1/2-quart baking dish.
For the topping, combine the butter, brown sugar, flour, and pecan pieces in a small bowl, using your fingers to create moist crumbs. Sprinkle generously over the casserole. Bake for 25-35 minutes, until the edges pull away from the sides of the pan and the top is golden brown. Let stand to cool and solidify for a few minutes before serving.