Transformers in AI: How They Revolutionized NLP and Machine Learning