Views
No views yet
38.626 on dataset sciercpip install git+https://github.com/fleonce/iter1from iter import ITERForRelationExtraction
2
3model = ITERForRelationExtraction.from_pretrained("fleonce/iter-scierc-deberta-large")
4tokenizer = model.tokenizer
5
6encodings = tokenizer(
7 "An art exhibit at the Hakawati Theatre in Arab east Jerusalem was a series of portraits of Palestinians killed in the rebellion .",
8 return_tensors="pt"
9)
10
11generation_output = model.generate(
12 encodings["input_ids"],
13 attention_mask=encodings["attention_mask"],
14)
15
16# entities
17print(generation_output.entities)
18
19# relations between entities
20print(generation_output.links)4scierc/small_lr_symrel2.3.0 with CUDA 11.8 and precision torch.bfloat161 NVIDIA H100 SXM 80 GB GPUpython3 train.py --dataset scierc/small_lr_symrel --transformer microsoft/deberta-v3-large --use_bfloat16 --seed 41@inproceedings{hennen-etal-2024-iter,
2 title = "{ITER}: Iterative Transformer-based Entity Recognition and Relation Extraction",
3 author = "Hennen, Moritz and
4 Babl, Florian and
5 Geierhos, Michaela",
6 editor = "Al-Onaizan, Yaser and
7 Bansal, Mohit and
8 Chen, Yun-Nung",
9 booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
10 month = nov,
11 year = "2024",
12 address = "Miami, Florida, USA",
13 publisher = "Association for Computational Linguistics",
14 url = "https://aclanthology.org/2024.findings-emnlp.655",
15 doi = "10.18653/v1/2024.findings-emnlp.655",
16 pages = "11209--11223",
17 abstract = "When extracting structured information from text, recognizing entities and extracting relationships are essential. Recent advances in both tasks generate a structured representation of the information in an autoregressive manner, a time-consuming and computationally expensive approach. This naturally raises the question of whether autoregressive methods are necessary in order to achieve comparable results. In this work, we propose ITER, an efficient encoder-based relation extraction model, that performs the task in three parallelizable steps, greatly accelerating a recent language modeling approach: ITER achieves an inference throughput of over 600 samples per second for a large model on a single consumer-grade GPU. Furthermore, we achieve state-of-the-art results on the relation extraction datasets ADE and ACE05, and demonstrate competitive performance for both named entity recognition with GENIA and CoNLL03, and for relation extraction with SciERC and CoNLL04.",
18}