CoolFace
Modelpublic

valhalla/distilbart-mnli-12-1

sourceHugging Faceupdated 5y agoView on Hugging Face
56likes33kdownloads
Model Card

DistilBart-MNLI

distilbart-mnli is the distilled version of bart-large-mnli created using the No Teacher Distillation technique proposed for BART summarisation by Huggingface, here.

We just copy alternating layers from bart-large-mnli and finetune more on the same data.

matched accmismatched acc
bart-large-mnli (baseline, 12-12)89.990.01
distilbart-mnli-12-187.0887.5
distilbart-mnli-12-388.188.19
distilbart-mnli-12-689.1989.01
distilbart-mnli-12-989.5689.52

This is a very simple and effective technique, as we can see the performance drop is very little.

Detailed performace trade-offs will be posted in this sheet.

Fine-tuning

If you want to train these models yourself, clone the distillbart-mnli repo and follow the steps below

Clone and install transformers from source

bash
git clone https://github.com/huggingface/transformers.git
pip install -qqq -U ./transformers

Download MNLI data

bash
python transformers/utils/download_glue_data.py --data_dir glue_data --tasks MNLI

Create student model

bash
python create_student.py \
  --teacher_model_name_or_path facebook/bart-large-mnli \
  --student_encoder_layers 12 \
  --student_decoder_layers 6 \
  --save_path student-bart-mnli-12-6 \

Start fine-tuning

bash
python run_glue.py args.json

You can find the logs of these trained models in this wandb project.