Optimizing LLMs: Harnessing Core Sub-Models in Transformers for Efficient Training on New Tasks