Any dog, given the opportunity will attack a guinea pig. Guinea pigs are prey animals and dogs naturally go after prey. However a dog can be taught, with patience, not to bother or to attack the guinea pig. Your dog should be trained in obedience, so that if a problem occurs, you can give your dog a command to stop. There's a good chance that if they grow up together, they will be friends. But it's never a good idea to leave them alone together - supervise whenever the guinea pig is out of the cage.