ProsocialDialog is a dialogue dataset for adapting compact language models toward empathetic, respectful, safe, and prosocial conversational behavior. Its examples provide contexts and responses, with optional safety labels, rules of thumb, and dialogue metadata. section 7.4
A practical workflow loads the dataset, normalizes or creates train and evaluation splits, converts rows into chat messages, and applies supervised fine-tuning. Single-turn examples are the default; dialogue IDs can optionally produce cumulative multiturn samples. section 7.4
Listing 7.11 Configuration and dataset loading
base_model = "google/gemma-3-270m-it" #1
checkpoint_dir = "MyGemmaProsocial"
learning_rate = 5e-5
USE_MULTITURN = False #2
MAX_SAMPLES = None #3
from datasets import load\_dataset #4
ds = load\_dataset("allenai/prosocial-dialog")
print(ds) #5
Inspect the loading configuration, split handling, and optional sample cap used to prepare ProsocialDialog for fine-tuning. section 7.4
