According to Wikipedia:
"Most grass-eating mammals are quite large and have a long digestive tract; while guinea pigs have much longer colons than most rodents, they must also supplement their diet by coprophagy, the eating of their own feces. However, they do not consume all their feces indiscriminately, but produce special soft pellets, called cecotropes, which recycle B vitamins, fiber, and bacteria required for proper digestion. The cecotropes (or caecal pellets) are eaten directly from the anus, unless the guinea pig is pregnant or obese."
en.wikipedia.org
"Most grass-eating mammals are quite large and have a long digestive tract; while guinea pigs have much longer colons than most rodents, they must also supplement their diet by coprophagy, the eating of their own feces. However, they do not consume all their feces indiscriminately, but produce special soft pellets, called cecotropes, which recycle B vitamins, fiber, and bacteria required for proper digestion. The cecotropes (or caecal pellets) are eaten directly from the anus, unless the guinea pig is pregnant or obese."
en.wikipedia.org