## 4 Fine-Tuning the BERT Model on Multi-Core CPUs
### Parameter Tuning and Optimization of the BERT Model on Downstream Tasks
#### 4.1.1 Introduction to the Test Sets  
1 CoLA (The Corpus of Linguistic Acceptability) Dataset[24]This dataset is used for a single-sentence classification task, where the goal is to determine the grammatical acceptability of a given sentence. It has about 8500 training samples and 1000 test samples. Examples of the training sets are shown in Table 1, where the first column indicates the source of the sentence, the second column represents the grammatical acceptability (0 = unacceptable, 1 = acceptable), and the third column contains the sentences themselves. The MCC (Matthews correlation coefficient) is an evaluation metric used to assess the quality of binary classification in machine learning. It measures the correlation between the observed and predicted classifications, taking into account TPs (true positives), TNs (true negatives), FPs (false positives), and FNs (false negatives). The MCC ranges from \(-1\) to \(1\), where \(1\) indicates perfect predictions, and \(-1\) indicates complete disagreement between the predictions and observations. We can calculate the MCC as follows :  
\[MCC=\frac{TP\times TN-FP\times FN}{\sqrt{(TP+FP)\times(TP+FN)\times(TN+FP) \times(TN+FN))))}}.\] \begin{table}
\begin{tabular}{l l l} \hline \hline
**Source** & **Label** & **Sentence** \\ \hline gj04 & 1 & The weights made the rope stretch over the pulley. \\ gj04 & 1 & The mechanical doll wriggled itself loose. \\ cj99 & 1 & If you had eaten more, you would want less. \\ cj99 & 0 & The more you would want, the less you would eat. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Examples from the CoLA dataset. Figure 14: The training time when using more CPU cores. \(\mathfrak{\char 37}\) SST-2 (The Stanford Sentiment Treebank [25]). SST-2 is a single-sentence classification task used to determine whether a movie review expresses a positive or negative sentiment. The dataset has around 67,000 instances in the training set and 1800 instances in the test set. The examples of SST-2 are shown Table 2. The first column represents movie reviews (sentences), and the second column indicates whether the sentiment of the sentence is positive (1) or negative (0). The prediction accuracy is calculated as the number of correct predictions for both positive and negative examples divided by the total number of samples. \(\mathfrak{\char 37}\) MRPC (Microsoft Research Paraphrase Corpus [26]). The MRPC dataset is a sentence pair classification task where, given a pair of sentences, the goal is to determine whether they are semantically equivalent. The dataset has around 3700 samples in the training set and 1700 samples in the test set. Table 3 shows an example from the MRPC dataset. The first column represents the label, where 0 indicates that the sentence pair is not semantically equivalent, while 1 indicates that the sentence pair is semantically equivalent. The second and third columns denote the IDs of the first and second sentences, respectively, while the fourth and fifth columns contain the text of the first and second sentences. \(\mathfrak{\char 37}\) RTE (Recognizing Textual Entailment [27]). Given two text snippets, the task of RTE is to determine whether the meaning of one text can be inferred from the other. This dataset has around 2500 training samples and 3000 testing samples. This task is applicable to various NLP tasks, such as question answering, information retrieval, information extraction, and text summary. An example of the RTE dataset is shown in Table 4. The first column represents the sentence index, the second and third columns represent the texts of the first and second sentences, and the fourth column indicates the label, where \"entailment\" is for inferable and \"not entailment\" is for not inferable. \(\mathfrak{\char 37}\) WNLI (Winograd NLI) [28]. This task involves determining whether the meanings of two sentences are the same. It consists of 634 training examples and 146 testing examples.