Skip to main content
QUICK REVIEW

[Paper Review] Introducing Bode: A Fine-Tuned Large Language Model for Portuguese Prompt-Based Task

Gabriel Lino Garcia, Pedro Henrique Paiola|arXiv (Cornell University)|Jan 5, 2024
Topic ModelingComputer Science7 citations
TL;DR

This paper presents Bode, a fine-tuned LLaMA 2-based Portuguese LLM (7B and 13B) for prompt-based tasks, evaluated on sentiment, news classification, and fake news detection using zero-shot and in-context learning.

ABSTRACT

Large Language Models (LLMs) are increasingly bringing advances to Natural Language Processing. However, low-resource languages, those lacking extensive prominence in datasets for various NLP tasks, or where existing datasets are not as substantial, such as Portuguese, already obtain several benefits from LLMs, but not to the same extent. LLMs trained on multilingual datasets normally struggle to respond to prompts in Portuguese satisfactorily, presenting, for example, code switching in their responses. This work proposes a fine-tuned LLaMA 2-based model for Portuguese prompts named Bode in two versions: 7B and 13B. We evaluate the performance of this model in classification tasks using the zero-shot approach with in-context learning, and compare it with other LLMs. Our main contribution is to bring an LLM with satisfactory results in the Portuguese language, as well as to provide a model that is free for research or commercial purposes.

Motivation & Objective

  • Address the gap in high-quality Portuguese NLP models by developing a publicly available LLM tuned for Portuguese instruction-following tasks.
  • Adapt the LLaMA 2 architecture to Portuguese via fine-tuning on a Portuguese instruction-following dataset.
  • Evaluate Bode on Portuguese classification tasks under zero-shot and in-context learning settings.
  • Compare Bode to other open LLMs to assess its relative strengths in Portuguese prompts.

Proposed method

  • Fine-tune LLaMA 2 using a Portuguese dataset derived from Portuguese instruction-following data.
  • Apply Low-Rank Adaptation (LoRA) with alpha=32 and dropout=0.05 during fine-tuning.
  • Adopt zero-shot and in-context learning for evaluation without additional task-specific training.
  • Use prompt engineering to guide model responses for sentiment and news classification tasks.
  • Evaluate on three Portuguese datasets (TweetSentBr multiclass, TweetSentBr binary, AGNews multiclass, FakeRecogna binary).
  • Compare against Cabrita/openCabrita, Falcon-7B, LLaMA-2 7B/13B, and Mistral-7B baseline models.
Figure 1: Overview of the proposed method. 2 2 2 The image was created by the authors, and the Bode logo was generated using Bing Chat. “Meta-Logo” by doravand is licensed under CC BY 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by/2.0/?ref=openverse. .
Figure 1: Overview of the proposed method. 2 2 2 The image was created by the authors, and the Bode logo was generated using Bing Chat. “Meta-Logo” by doravand is licensed under CC BY 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by/2.0/?ref=openverse. .

Experimental results

Research questions

  • RQ1Can a Portuguese-specific fine-tuned LLM based on LLaMA 2 achieve competitive accuracy in sentiment analysis, news classification, and fake news detection under zero-shot and in-context learning?
  • RQ2Does 13B parameter Bode outperform 7B counterparts and other open Portuguese LLMs across these tasks?
  • RQ3How does prompt engineering and LoRA-based fine-tuning impact Portuguese instruction-following performance?

Key findings

  • Bode 13B achieved an accuracy of over 90% on sentiment analysis tasks, outperforming the LLaMA 2 13B baseline which reached 56.9%.
  • For multiclass news classification, Bode 7B achieved the highest performance among 7B models, with a small margin in favor of LLaMA 2 13B among 13B models.
  • In fake news detection, both Bode models outperformed their base counterparts, showing strong consistency across tasks.
  • Overall, Bode 7B and 13B generally matched or exceeded baseline open Portuguese LLMs, with task-dependent variations.
  • The authors note potential catastrophic forgetting as a possible reason for some dips in Bode performance relative to LLaMA 2 7B/13B.
Figure 2: Accuracy values for each dataset and LLM adopted in the experiments.
Figure 2: Accuracy values for each dataset and LLM adopted in the experiments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.