Code Monkey home page Code Monkey logo

ruco-bert's Introduction

RuCo-BERT

This repository contains code and data for training and inference of a new Russian-language coreference resolution model trained on the RuCoCo corpus (see https://github.com/vdobrovolskii/rucoco).

First, to install dependcies run pip install -r requirements.txt. Although the recommended pytorch version for AllenNLP 2.2.0 is 1.8.1, before training it is better to additionally run pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html. This will ensure support of 48 and 80 GB GPUs that is necessary for training with the command below. Coreference resolution is notorious for its extreme computational complexity.

To inference the model, download weights from: https://dl.dropbox.com/s/2m0c4o220pr1rfn/RucocoAncor_rubertb_a150_s20_sw04.tar.gz?dl=0

Then run:
allennlp evaluate --include-package rucoref RucocoAncor_rubertb_a150_s20_sw04.tar.gz data\test.conll --output-file metrics_on_test.json --predictions-output-file predictions.json

In order to train the model from scratch, use the command:
allennlp train --include-package rucoref coref_bertbase_lstm.jsonnet -s output_models.

Results

Results are calculated by default allennlp functions and tend to be slightly lower than the AVG scores computed with reference coreference scorers (https://github.com/conll/reference-coreference-scorers).

Set PRECISION RECALL F1-SCORE
train 96.1 89.3 92.5
development 77.8 72.8 75.2
test 81.1 78.2 79.6

Training process

Development F1 never exceeds the threshold of around 75%, even though training F1 increases steadily.

alt text

ruco-bert's People

Contributors

gleb-skobinsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

azzruge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.