This repository contains code and data for the EE‑559 Deep Learning group project at EPFL. The objective is to compare several language‑model architectures (BERT, DistilBERT, RoBERTa, Gemma, Qwen) on the task of hate‑speech detection.
Authors · Ariadna Mon Gomis · Saúl Fenollosa Arguedas · Jon Lecumberri Arteta
| Path/File | Purpose |
|---|---|
data/ | Link to the raw dataset (hosted on Google Drive due to size constraints). |
.gitignore | Excludes generated artefacts (data/, models/, results/) from version control. |
requirements.txt | Only the dependencies needed to run the Python scripts in this repo (everything ending in .py). |
data_exploration.py | Creates the processed & balanced dataset used by all downstream experiments. |
run_distilbert_seeds.pyrun_qwen_seeds.pyrun_qwen_ft_seeds.pyrun_roberta_seeds.py | Command‑line entry points for the core experiments. Each script can be executed with multiple random seeds for reproducibility. |
run_gemma.ipynb | Standalone Colab notebook for Gemma experiments (see below). |
The steps below are only required if you plan to execute the
.pyexperiment scripts locally. The Gemma notebook does not use this environment.
Clone the repository
git clone https://github.com/jonlecumberri/deep_learning_project.git
cd deep_learning_project
Create & activate an environment (conda, venv, etc.)
Install dependencies for the .py scripts
pip install -r requirements.txt
Prepare data — ensure the data/ symlink points to the dataset folder on Drive.
Run an experiment
python run_distilbert_seeds.py
# or
python run_roberta_seeds.py --seed 42
We encountered dependency conflicts when trying to run Gemma locally. To keep the repository lightweight and reproducible, Gemma experiments are shipped as a Google Colab notebook that relies on:
run_gemma.ipynb in Colab (via the Open in Colab badge or by uploading it directly).Tip: The notebook is self‑contained; you only need a Google account and a GPU‑enabled Colab runtime.
The project benchmarks how architectural choices influence hate‑speech detection performance. Each model family is trained & evaluated under identical conditions (same splits, preprocessing pipeline, and random seeds). Metrics such as F1‑score, precision, and recall are logged to the results/ folder for easy comparison.
22 commits
2 commits
Python
52.6%
Jupyter Notebook
47.4%
This repository contains code and data for the EE‑559 Deep Learning group project at EPFL. The objective is to compare several language‑model architectures (BERT, DistilBERT, RoBERTa, Gemma, Qwen) on the task of hate‑speech detection.
Authors · Ariadna Mon Gomis · Saúl Fenollosa Arguedas · Jon Lecumberri Arteta
| Path/File | Purpose |
|---|---|
data/ | Link to the raw dataset (hosted on Google Drive due to size constraints). |
.gitignore | Excludes generated artefacts (data/, models/, results/) from version control. |
requirements.txt | Only the dependencies needed to run the Python scripts in this repo (everything ending in .py). |
data_exploration.py | Creates the processed & balanced dataset used by all downstream experiments. |
run_distilbert_seeds.pyrun_qwen_seeds.pyrun_qwen_ft_seeds.pyrun_roberta_seeds.py | Command‑line entry points for the core experiments. Each script can be executed with multiple random seeds for reproducibility. |
run_gemma.ipynb | Standalone Colab notebook for Gemma experiments (see below). |
The steps below are only required if you plan to execute the
.pyexperiment scripts locally. The Gemma notebook does not use this environment.
Clone the repository
git clone https://github.com/jonlecumberri/deep_learning_project.git
cd deep_learning_project
Create & activate an environment (conda, venv, etc.)
Install dependencies for the .py scripts
pip install -r requirements.txt
Prepare data — ensure the data/ symlink points to the dataset folder on Drive.
Run an experiment
python run_distilbert_seeds.py
# or
python run_roberta_seeds.py --seed 42
We encountered dependency conflicts when trying to run Gemma locally. To keep the repository lightweight and reproducible, Gemma experiments are shipped as a Google Colab notebook that relies on:
run_gemma.ipynb in Colab (via the Open in Colab badge or by uploading it directly).Tip: The notebook is self‑contained; you only need a Google account and a GPU‑enabled Colab runtime.
The project benchmarks how architectural choices influence hate‑speech detection performance. Each model family is trained & evaluated under identical conditions (same splits, preprocessing pipeline, and random seeds). Metrics such as F1‑score, precision, and recall are logged to the results/ folder for easy comparison.
22 commits
2 commits
Python
52.6%
Jupyter Notebook
47.4%