The KLEJ benchmark (Kompleksowa Lista Ewaluacji Językowych) is a set of nine evaluation tasks for the Polish language understanding.
This repository contains example scripts to easily fine-tune models from the transformers library on the KLEJ benchmark.
Install the Python package using the following commands:
$ git clone https://github.com/allegro/klejbenchmark-baselines
$ pip install klejbenchmark-baselines/
To fine-tune your model on KLEJ tasks using the default settings, you can use the provided example scripts.
First, download the KLEJ benchmark datasets:
$ bash scripts/download_klej.sh
After downloading KLEJ, customize training parameters inside the scripts/run_training.sh
script and train the models using:
$ bash scripts/run_training.sh
It will create:
- Tensorboard logs with training and validation metrics,
- checkpoints of the best models,
- a zip file with predictions for the test sets, which is a valid submission for the KLEJ benchmark.
The zip file can be submitted at the klejbenchmark.com website for the evaluation on the test sets.
It's also possible to train each model separately and customize the training parameters using the klejbenchmark_baselines/main.py
script.
Apache 2 License
If you use this code, please cite the following paper:
@inproceedings{rybak-etal-2020-klej,
title = "{KLEJ}: Comprehensive Benchmark for Polish Language Understanding",
author = "Rybak, Piotr and Mroczkowski, Robert and Tracz, Janusz and Gawlik, Ireneusz",
booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
month = jul,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.acl-main.111",
pages = "1191--1201",
}
This code was created by the Allegro Machine Learning Research team.
You can contact us at: klejbenchmark@allegro.pl