Catastrophic Forgetting in LLMs: A Comparative Analysis Across Language Tasks