In a small heavy stockpot over medium-high heat, combine the sugar, cocoa powder, cornstarch, and salt.
Whisk in the milk, bring to a boil, reduce the heat, and simmer, stirring and scraping the bottom and edges of the pot frequently, until the mixture is thick and bubbly, about 10 minutes.
Remove it from the heat and stir in the vanilla extract. Pour the mixture into 4 small bowls or ramekins, put a raspberry in the center, cover, and refrigerate until cool, at least 30 minutes and up to 3 days. Serve topped with additional raspberries or peanut butter chips, if desired.