Ya you keep your gun levels and attachments that you've unlocked. Although, the unlocks you used will not be kept (like the actual guns and equipment and scorestreaks). You'll have to unlock them again. Also, you get a permanent unlock to use on any gun, perk, equipment, etc. and you get to keep that throughout the game.
Unlocked the M8 permanently, it's such a beast of a gun. I love how the weapon levels stay, I'm actually gonna prestige a lot in this. My MP7 and 50 cal will forever be maxed out.