Comparative Analysis of Small Language Models (SLMs) Pre-trained with Phi-2: Adaptation to Portuguese and Performance in Question-Answering Tasks with Data from SQuAD and Wikipedia
摘要
This paper conducts a detailed evaluation of Microsoft’s Phi-2 pre-trained language model specifically for question-answering tasks. The evaluation focuses on the model’s performance after adapting it to the Portuguese language and fine-tuning it using the SQUAD and Wikipedia datasets. To tailor the model to Portuguese, we applied specialized adapters designed to adjust the model’s language processing capabilities to better handle Portuguese linguistic nuances. Additionally, we fine-tuned the model for the specific task of question answering, which involved refining the model’s ability to accurately understand and respond to questions based on the given datasets. Results indicate significant improvements in several key performance metrics compared to the base Phi-2 model. These metrics include F1 score, which measures the model’s overall accuracy by balancing precision and recall; precision, which evaluates the proportion of correctly identified responses out of all responses given; exact match, which assesses the percentage of responses that are exactly correct; BLEU, a metric commonly used to evaluate the quality of text translations; and ROUGE-1, which measures the overlap of unigrams between the generated and reference responses.