For the sweet potatoes: Heat the oven to 350 degrees F. Place the potatoes on a rimmed baking sheet and bake until tender when pierced with the point of a paring knife, about 1 hour.
Cool the potatoes slightly. Peel the potatoes, discard the skins, and place them in a medium bowl. Mash with a potato masher or large fork until smooth. Stir in the eggs, milk, brown sugar, melted butter and vanilla until combined; season with salt and pepper.
Meanwhile, for the topping: Combine the pecans, brown sugar, flour and butter in the bowl of a food processor fitted with the blade attachment. Pulse until combined. Set aside.
Transfer the sweet potato mixture to a medium casserole dish and sprinkle with the topping. Place the casserole in the oven and bake until bubbly and browned on top, about 30 minutes. Serve immediately.