Update: This is a minimal example using code based on the released notebook. You can find an example of how to run inference on an entire dataset using our reimplementation here: ianporada/coref-reeval/.
This repo contains code for running Bohnet et al.'s MT5 seq2seq coreference resolution model using HuggingFace Transformers. The main processing code comes from the original model's jupyter notebook.
I've converted the released t5x checkpoint to HuggingFace using convert_t5x_checkpoint_to_flax.py. The HuggingFace model is available as 'mt5-coref-pytorch/link-append-xxl'.
python main.py --input_fname input.jsonl
where each line in input.jsonl
is of the form
{
'document_id': 'example_doc',
'sentences': [
{
'speaker': 'example_speaker',
'words': ['The', 'thing', 'is', ...]
},
...
]
}
Tested with:
- python=3.10
- pytorch=2.1
- transformers=4.32
- click