Scientific Coordination
Verena Kunz
Administrative Coordination
Janina Götsche
Please wait...
Adapters: Lightweight Machine Learning for Social Science Research
About
Location:
hybrid (online via Zoom / Unter Sachsenhausen 6-8)
hybrid (online via Zoom / Unter Sachsenhausen 6-8)
General Topics:
Course Level:
Format:
Software used:
Duration:
Language:
Fees:
Students: 330 €
Academics: 495 €
Commercial: 990 €
Keywords
Additional links
Lecturer(s): Julia Romberg, Vigneshwaran Shankaran, Maximilian Maurer
Course description
The significant progress in computational models for text analysis offers immense potential for social science research (e.g., for large-scale analysis of opinions or harmful language). The rich statistical language representations captured in pre-trained modern language models (e.g., BERT, Llama-2/3, and GPT-3/4) provide an excellent starting point for use-case specific models. Most commonly, the pre-trained models are adapted to the task at hand through fine-tuning, a technique which involves further training of the models on labeled (also referred to as annotated or coded) data.
However, fine-tuning is costly given the enormous number of parameters that modern language models consist of (e.g., up to 340 million for BERT, up to 65 billion for Llama-2, up to trillions for GPT-4). Optimizing the full set of parameters for a new application task requires substantial computing resources, significant time, and enough training data. The energy-intensive process also raises environmental concerns. All these reasons can pose severe restrictions to social science scholars in leveraging the enormous potential of modern language models.
A more parameter-efficient solution for addressing these challenges is the use of adapter modules. Instead of fine-tuning the entire model, only a small number of newly introduced parameters are adapted for the specific application task. This approach not only significantly reduces complexity but also demonstrates performance that is typically on par with that of their fully-tuned counterparts.
In this course, we provide an introduction to adapters. After a brief recap of modern language model architectures, we go into detail about how adapters function, explore different types of adapters, and discuss their use cases. Alongside the theoretical foundations, participants will engage with practical Python-based implementation examples through hands-on tutorials using real digital behavior datasets. Participants will also have the possibility to discuss their own applications with the instructors.
Organizational Structure of the Course
The course will take place in a hybrid setting with participants on-site and online. In the morning sessions, we will cover the theoretical foundations and showcase the practical implementation using Python notebooks. In the afternoon sessions, participants will have the opportunity to apply the learned content autonomously during lab sessions with hands-on exercises. Participants can reach out for support to the lecturers at any time during the practical sessions. While we provide tasks and data for the lab sessions on day 1 and day 2, on day 3, participants have the option to transfer the gained knowledge onto their own research questions. This will be accompanied by individual consultation slots with the lecturers.
Target group
You will find the course useful if:
Learning objectives
By the end of the course you will:
Prerequisites
Software Requirements
We are planning to use Google Colab (free version) for the practical parts of the course for GPU access and to avoid system-specific troubleshooting. For this, the participants need a Google account. If participants choose not to use Google Colab (not recommended), they need to install the Transformers library on Python 3.8+ as described in https://huggingface.co/docs/transformers/installation (CPU-support only option if no GPU is locally available) and the Adapters library as described in https://github.com/adapter-hub/adapters.