Have not tried this out but my current thinking is treating it as a single creature with a level:
AT 5, DB 20, 10 hits/level, initiative +5, immune to Puncture and Slash criticals as well as Bleeding, base move of 25 (flying), Perception +2/level. Can only carry out actions other than movement when massed, but can disperse, in which case it can take no more than 2 hits per attack unless the attack covers the entire area. When dispersed, the swarm has Stalk/Hide skill of +80 and maintains its normal movement rate (pace modifiers still apply to Stalk/Hide). Dispersing or massing takes one round.
This is RMU but aside from the AT should work out about the same. I would think non-flying swarms would disperse and mass more slowly. Swarms of larger creatures (e.g. rats) could take more damage per attack when dispersed.