This code repo contains the preprocess, training, inference and evaluation code for SERM-master on TACRED relation extraction dataset.
- Python 3.6.3
- PyTorch 1.2.0
- Transformers 2.2.1
- CUDA 9.2
First, download and unzip TACRED dataset from LDC.
Please run
python train.py
Evaluate the trained model on TACRED dataset:
python evaluation.py
You will get:
Model | Precision | Recall | micro-F1 |
---|---|---|---|
SERM(ALBERT-large) | 0.828 | 0.811 | 0.819 |