I will get out the cake/pie/cookies/whatever, preslice it or arrange it on a serving dish, and set it out in front of my guest(s) and me, with plates/forks/napkins/whatever. *Then* I'll ask if they'd like a piece. Once I've done all the work of getting everything out and ready to serve, I can convince myself that the refusal is genuine rather than stemming from a reluctance to make me do "extra" work. It also means that I can say, "If you change your mind, please feel free to help yourself."
I'd rather not serve a piece unasked - I wouldn't want anyone to feel forced to eat anything they don't want.