Preheat oven to 325°F (163°C). Line and grease an 8½ x 4½-inch loaf pan.
Sift together almond flour, cocoa powder, coconut flour, baking powder, and salt. Set aside.
In a large bowl, beat butter and powdered erythritol until pale and fluffy (3–5 minutes).
Add eggs one at a time, mixing briefly after each until incorporated. Beat in cream cheese and vanilla until smooth.
Fold dry ingredients into the wet in three additions, mixing gently until combined. Fold in chocolate chips if using.
Pour batter into prepared pan, smooth the top, and bake 50–65 minutes, checking at 50 minutes. Cake is done when a skewer comes out with a few moist crumbs and internal temp ~200–205°F for moist crumb.
Cool in pan 15 minutes, then remove to a rack and cool completely (1 hour) before slicing.