Efficient Scaling of Large Models: Principles in Optimization and Data Aspects