Fine-Tuning Llama 3 for Sentiment Analysis: Leveraging AWS Cloud for Enhanced Performance
摘要
Sentiment analysis is a crucial task in natural language processing (NLP) that involves the computational understanding and classification of emotions expressed in textual data. This paper presents a novel approach by fine-tuning the Llama 3 transformer model for sentiment analysis and leveraging AWS cloud infrastructure for enhanced performance and scalability. Our methodology employs advanced fine-tuning techniques, including parameter-efficient fine-tuning (PEFT) and hyperparameter optimization, to maximize the model’s efficacy in sentiment classification tasks. Our experimental results demonstrate substantial improvements across all evaluation metrics after fine-tuning. Specifically, the model’s accuracy increased from 0.333 to 0.923, precision from 0.33 to 0.92, recall from 0.98 to 0.89, and F1 score from 0.50 to 0.91. Comparative analysis with state-of-the-art models, such as BERT, RoBERTa, XLNet, and DistilBERT, highlights the superior performance of the proposed Llama 3 model. The integration of AWS infrastructure addresses the scalability and computational challenges inherent in sentiment analysis by ensuring efficient processing of large-scale datasets and reducing computational overhead. Additionally, our research systematically identifies existing gaps in the sentiment analysis literature, demonstrating how our innovative approach effectively bridges these gaps through the combination of cutting-edge fine-tuning techniques and cloud-based infrastructure. This work not only highlights the potential of Llama 3 for handling complex sentiment analysis tasks but also sets a new benchmark for future research in this domain. Our results have important implications for using advanced transformer models in NLP, making it possible to do a wide range of sentiment analysis tasks in a reliable and scalable way.