You need to get him to a vet now. It is impossible for guinea pigs to throw up. He has something very wrong with him, most likely teeth problems and or esophagus problems and by the sound of it it has become very serious.
Find a good, exotic vet that knows about guinea pigs and make an appointment now.
I also recommend you ask about the problem on
Guinea Lynx :: * * * * * It's a GP medical forum and they may be able to help you more there but not as much as a vet will.