Most mosques pray the full 20 rakaats.
But as far as I know, most mosques have a short intermission
after 8 rakaats. Those who want to leave after 8 rakaats can do so
then.
If you want to do so, I suggest praying in one of the last few
safs to reduce inconvenience to others when you leave.