Find duplicate images in iCloud Photo Library in Yosemite
I had the same problem as you. Here's what I did to remove the duplicates quickly and easily. 


Export your entire photo library to a folder.
Close photos and create a new photos library. (No deleting until you know it worked) 
Open that new empty library in photos and drag everything (using CMD+a in finder) in that exported folder to the Photos.app window.
During the import you will be prompted to choose what you want to have done for duplicate photos and it will show you the first two identical photos that it has found, select "skip" and "apply to all".
There you have a full library of purely unique photos.


Notes: Since you mentioned you have 5000 photos, the Mac will potentially become a little unresponsive while you're dragging them into the window. Be patient with it and let it do it's thing but it is working. (4,3000 photos was a little stuttery on my 2012 Mac mini i5 but it did work after being patient)

Photos may not be able to detect if it already has those photos in the library yet but doing it during the import has proven to be a reliable solution so just be prepared to do a massive import for now.