Complex sentence: The majority were former members of the Slovak army, some of them had served in the Hungarian army, who deserted in order to join either Soviet partisans or the Red Army.
Split into simpler sentences: The majority were former members of the Slovak army. Some of these had served in the Hungarian army and then deserted in order to join either Soviet partisans or the Red Army.