On the efficiency and privacy of foundation models