Complex sentence: These sometimes exotically equipped units served as infantry and cavalry (or, more rarely, as artillery), sometimes in just company strength, sometimes in formations up to several thousand strong; there were also various mixed formations or legions.
Split into simpler sentences: These sometimes exotically equipped units served as infantry and cavalry or, more rarely, as artillery. Sometimes in just company strength, sometimes in formations up to several thousand strong, there were also various mixed formations or legions.