Efficient Fine-Tuning Methods for Portuguese Question Answering: A Comparative Study of PEFT on BERTimbau and Exploratory Evaluation of Generative LLMs
Organizations: Institute of Science and Technology, Federal University of São Paulo (UNIFESP), São José dos Campos, SP, Brazil
Abstract
Although large language models have transformed natural language processing, their computational costs create accessibility barriers for low-resource languages such as Brazilian Portuguese. This work presents a systematic evaluation of Parameter-Efficient Fine-Tuning (PEFT) and quantization techniques applied to BERTimbau for Question Answering on SQuAD-BR, the Brazilian Portuguese translation of SQuAD v1. We evaluate 40 configurations combining four PEFT methods (LoRA, DoRA, QLoRA, QDoRA) across two model sizes (Base: 110M, Large: 335M parameters). Our findings reveal three critical insights: (1) LoRA achieves 95.8% of baseline performance on BERTimbau-Large while reducing training time by 73.5% (F1=81.32 vs 84.86); (2) higher learning rates (2e-4) substantially improve PEFT performance, with F1 gains of up to +19.71 points over standard rates; and (3) larger models show twice the quantization resilience (loss of 4.83 vs 9.56 F1 points). These results demonstrate that encoder-based models can be efficiently fine-tuned for extractive Brazilian Portuguese QA with substantially lower computational cost than large generative LLMs, promoting more sustainable approaches aligned with Green AI principles. An exploratory evaluation of Tucano and Sabiá on the same extractive QA benchmark shows that while generative models can reach competitive F1 scores with LoRA fine-tuning, they require up to 4.2 more GPU memory and 3 more training time than BERTimbau-Base, reinforcing the efficiency advantage of smaller encoder-based architectures for this task.
Figures & tables
| Method | Ep. | F1 | EM | Time |
|---|---|---|---|---|
| Full FT | 2 | 79.74 | 67.15 | 01:40:02 |
| LoRA | 2 | 78.01 | 64.85 | 00:31:37 |
| QLoRA | 2 | 73.23 | 60.26 | 00:30:03 |
| DoRA | 2 | 78.01 | 64.89 | 00:40:23 |
| QDoRA | 2 | 74.41 | 61.26 | 00:42:03 |
| Full FT | 3 | 78.33 | 65.54 | 02:29:04 |
| Method | Ep. | F1 | EM | Time |
|---|---|---|---|---|
| Full FT | 2 | 82.79 | 70.91 | 01:40:04 |
| LoRA | 2 | 71.81 | 58.07 | 00:31:49 |
| QLoRA | 2 | 53.52 | 40.54 | 00:30:02 |
| DoRA | 2 | 71.36 | 57.68 | 00:40:13 |
| QDoRA | 2 | 54.10 | 41.15 | 00:42:10 |
| Full FT | 3 | 82.18 | 70.40 | 02:28:52 |
| Method | Ep. | F1 | EM | Time |
|---|---|---|---|---|
| Full FT | 2 | 3.02 | 0.03 | 05:15:30 |
| LoRA | 2 | 81.32 | 68.67 | 01:23:41 |
| QLoRA | 2 | 80.03 | 67.17 | 01:19:15 |
| DoRA | 2 | 80.61 | 68.09 | 01:47:37 |
| QDoRA | 2 | 77.96 | 65.05 | 01:57:30 |
| Full FT | 3 | 5.14 | 0.11 | 07:50:02 |
| Method | Ep. | F1 | EM | Time |
|---|---|---|---|---|
| Full FT | 2 | 84.86 | 73.00 | 05:15:39 |
| LoRA | 2 | 75.65 | 62.21 | 01:23:28 |
| QLoRA | 2 | 68.23 | 54.92 | 01:19:12 |
| DoRA | 2 | 74.93 | 62.02 | 01:47:46 |
| QDoRA | 2 | 70.32 | 56.88 | 01:57:30 |
| Full FT | 3 | 83.74 | 72.04 | 07:50:46 |
| Method / Setting | Peak Memory (MB) |
|---|---|
| BERTimbau (Extractive QA, Training) | |
| Full Fine-tuning (Base) | 14,493 |
| LoRA (Base) | 3,687 |
| DoRA (Base) | 4,295 |
| QLoRA (4-bit, Base) | 1,897 |
| QDoRA (4-bit, Base) | 2,163 |
| Model | Config. | EM (%) | F1 (%) | Time |
| Tucano | Zero-shot | 4.02 | 14.68 | 00:16:59 |
| Sabiá | Zero-shot | 25.37 | 39.82 | 00:55:26 |
| Tucano | LoRA | 49.30 | 63.86 | 00:25:28 |
| Sabiá | LoRA | 64.11 | 78.10 | 01:31:15 |
| For reference (same evaluation set): | ||||
| B-Base | LoRA | 64.85 | 78.01 | 00:31:37 |
Parameter-Efficient Fine-Tuning
Parameter-efficient fine-tuning adapts pretrained models by updating small parameter subsets or lightweight modules instead of all weights.
See all 605 papers