Preheat the oven to 350 degrees F and grease a 2-quart round or oblong baking dish.
Heat the milk in a saucepan. Add the chocolate and stir until melted. Add the cocoa, butter, vanilla extract, and a pinch of salt. Bring to a boil, then whisk in the flour. Whisk vigorously until the mixture forms a thick paste that detaches from the bottom of the pan. Remove from the heat.
Beat the egg yolks with the sugar with an electric mixer until pale and creamy. Gradually add the chocolate mixture and mix well.
In a separate bowl, beat the egg whites with a pinch of salt until they stand in stiff peaks. Fold them into the pudding.
Pour the pudding into the prepared dish. Place the dish in a roasting pan or a large ovenproof dish and fill the larger dish with water to about two-thirds up the sides of the dish with the pudding. Put in the oven and bake for 90 minutes, or until set. Serve warm with chilled vanilla sauce.