I think this was mentioned in the series very vaguely. I don't remember the exact season/episode but when Helo asked Athena how could that be possible, she said something like same models shared same memories and this is how they recognise each other when they see themselves (or each other) in a crowded place (full of cylons).
A similar version of this happened between Dr. Gaius Baltar and another Model 6 who was captured in Battlestar Pegasus. She had memories but she was not in love with Baltar.
To avoid the confusion, every cylon is different in their own lives and memories but they somehow share these knowledge. It's like they can download the related memories when they need them, from a cloud.
EDIT: About Athena-Tyrol scene in Season 2 - Episode 6 - Part 2
The pregnant Sharon Valerii again shows that she has the memories of
the 'original' Boomer, which was previously shown in the season opener
when she started to tell Starbuck of the time they met. She also
displays this in "Home, Part II" where she tells Tyrol she has some of
Boomer's memories of him and in "Scar" where she displays some of
Boomer's memories of Starbuck to the other's obvious discomfort. - Source
About Athena-Helo (CAN'T REMEMBER WHICH EPISODE)
Sharon is able to impersonate Lieutenant Valerii convincingly, since
she has accessed Valerii's memories at least up until the point of
Helo being left behind on Caprica (TRS: "Flesh and Bone", "Scattered",
"Home, Part II", "Flight of the Phoenix", "Scar"). - Source