During the keynote, they mentioned the face recognition and other ML processing happens on the phone hardware to protects your privacy.
Interestingly the results of this still end up on iCloud by the looks, and it back fills from iCloud (will that add big battery drain for first install of iOS 10?)