These photos hopefully show the difference between a newly born male guinea pig (boar) and a newly born female guinea pig (sow). The ages are the same for both, 3 days each.
This is a baby boar. Note the large space between the rectum and the urigenital opening. The sheath also is more puckered than the female equivalent. This photograph comes from Crystal Cavies in the UK.
This is a baby sow. Note the smooth swelling directly over the urogenital opening. Most people say a sow is shaped like a Y and boars look like an 'i' however I have seen a lot of sows that look like an 'i' so I don't go by that. This photo was also taken by Crystal Cavies in the UK.