It is relatively easy to sex guinea pigs, particularly if you have one of each sex to compare -

These are photos of adults, as if you try and take pictures of babies you get out of focus before you're close enough to see anything properly!
One thing to note is that both sexes have nipples, so they are no help in deciding which sex you have.
In the adult you can clearly see the testicles (the bulge on each side) but these will not show up in baby guinea pigs.
The male 'arrangement' is rather like an i, with the penis as the dot of the i.
The picture is at a slight angle, but you can still see that females looked 'tucked in'.
The shape is very much like a Y.
![]()