Oh, that's rotten! It is like that "new car smell" thing. Time will help. Have you tried airing out your home by opening windows and running fans? Sometimes vacuuming several times can help.
If ventilating and vacuuming don't help you can have it professionally cleaned by hot water extraction. A quick Google search of "carpet cleaners near me" can help you find a professional company close by.