Scaling Local Learning for Supervised and Self-supervised Learning