The biggest problem I see is that you are no longer facing 1, 2, or 3 opponents, you are facing what may as well be a stone age army, that may have a couple guns themselves. I say stone age, because their tactics will be as such. It's the same as handing a kid a knife and watching him flail wildly, or a gun and he just empties a magazine in the general direction. May seem "untrained" and unruly but it's no less deadly as a group of trained men with the same weapons.
That being said, you treat them as what they are, a mob. You do what you can top put yourself into a position to "funnel" them, whether or not you even plan to fight. Do this, call 911, and be ready to engage them however you can. I'd suggest finding a melee weapon just in case, and be prepared to drop your magazine and empty the chamber. They can still pick it up and load it, but it buys you time if they are swarming you and grabbing it.
My two cents...
"Today is victory over yourself of yesterday; tomorrow is your victory over lesser men." - Miyamoto Musashi
[Insert random irrelevant religious quote here]