Accelerating Large Language Model Training with 4D Parallelism and Memory Consumption Estimator