Preheat the oven to 180°C (160°C fan) / gas mark 4 / 350°F. Lightly butter a small baking dish, about 20cm.
Tip the ground almonds into a dry frying pan and toast over a medium-low heat, stirring constantly, for 4–6 minutes until golden and nutty. Tip onto a plate and leave to cool.
Add the raspberries, erythritol, lemon juice, xanthan gum and vanilla (if using) to the baking dish and toss gently to coat. Spread into an even layer.
In a bowl, combine the cooled toasted ground almonds, chopped pecans, erythritol, cinnamon and salt.
Rub the cold cubed butter into the dry mixture with your fingertips until it clumps together into a rough, gravelly crumble.
Scatter the crumble evenly over the raspberries.
Bake for 20–25 minutes until the topping is deep golden and the fruit is bubbling at the edges.
Leave to stand for 10 minutes before serving, so the filling can thicken. Serve warm with double cream (heavy whipping cream).