I have this problem and it keeps coming back.
Spray neat bleach onto the grout. (cover the carpet and your face)
Takes a couple of hours to work but it will clean even black mold. Don't rub it away untill its changed colour or it will mark the grout even more.
Derek
August 2004