Tutorials on Stance Detection using Pre-trained Language Models: Fine-tuning BERT and Prompting Large Language Models

07/28/2023
by   Yun-Shiuan Chuang, et al.
0

This paper presents two self-contained tutorials on stance detection in Twitter data using BERT fine-tuning and prompting large language models (LLMs). The first tutorial explains BERT architecture and tokenization, guiding users through training, tuning, and evaluating standard and domain-specific BERT models with HuggingFace transformers. The second focuses on constructing prompts and few-shot examples to elicit stances from ChatGPT and open-source FLAN-T5 without fine-tuning. Various prompting strategies are implemented and evaluated using confusion matrices and macro F1 scores. The tutorials provide code, visualizations, and insights revealing the strengths of few-shot ChatGPT and FLAN-T5 which outperform fine-tuned BERTs. By covering both model fine-tuning and prompting-based techniques in an accessible, hands-on manner, these tutorials enable learners to gain applied experience with cutting-edge methods for stance detection.

READ FULL TEXT

page 14

page 17

page 23

page 34

page 42

research
05/26/2023

Few-shot Fine-tuning vs. In-context Learning: A Fair Comparison and Evaluation

Few-shot fine-tuning and in-context learning are two alternative strateg...
research
09/06/2023

Offensive Hebrew Corpus and Detection using BERT

Offensive language detection has been well studied in many languages, bu...
research
11/18/2020

Predicting metrical patterns in Spanish poetry with language models

In this paper, we compare automated metrical pattern identification syst...
research
06/06/2023

Büyük dil modellerinin Türkçe verisetleri ile eğitilmesi ve ince ayarlanması

Large language models have advanced enormously, gained vast attraction a...
research
06/09/2021

URLTran: Improving Phishing URL Detection Using Transformers

Browsers often include security features to detect phishing web pages. I...
research
08/03/2022

Efficient Fine-Tuning of Compressed Language Models with Learners

Fine-tuning BERT-based models is resource-intensive in memory, computati...
research
08/03/2023

Local Large Language Models for Complex Structured Medical Tasks

This paper introduces an approach that combines the language reasoning c...

Please sign up or login with your details

Forgot password? Click here to reset