CoolFace
Datasetpublic

stefan-it/autotrain-flair-hipe2022-fr-hmbert

NER Fine-Tuning We use Flair for fine-tuning NER models on HIPE-2022 datasets from HIPE-2022 Shared Task. All models are fine-tuned on A10 (24GB) and A100 (40GB) instances from Lambda Cloud using Flair: $ git clone https://github.com/flairNLP/flair.git $ cd flair && git checkout 419f13a05d6b36b2a42dd73a551dc3ba679f820c $ pip3 install -e . $ cd .. Clone this repo for fine-tuning NER models: $ git clone https://github.com/stefan-it/hmTEAMS.git $ cd hmTEAMS/bench Authorize via… See the full description on the dataset page: https://huggingface.co/datasets/stefan-it/autotrain-flair-hipe2022-fr-hmbert.

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes60downloads
Dataset Card

NER Fine-Tuning

We use Flair for fine-tuning NER models on HIPE-2022 datasets from HIPE-2022 Shared Task.

All models are fine-tuned on A10 (24GB) and A100 (40GB) instances from Lambda Cloud using Flair:

bash
$ git clone https://github.com/flairNLP/flair.git
$ cd flair && git checkout 419f13a05d6b36b2a42dd73a551dc3ba679f820c
$ pip3 install -e .
$ cd ..

Clone this repo for fine-tuning NER models:

bash
$ git clone https://github.com/stefan-it/hmTEAMS.git
$ cd hmTEAMS/bench

Authorize via Hugging Face CLI (needed because hmTEAMS is currently only available after approval):

bash
# Use access token from https://huggingface.co/settings/tokens
$ huggingface-cli login

We use a config-driven hyper-parameter search. The script `flair-fine-tuner.py` can be used to fine-tune NER models from our Model Zoo.

Additionally, we provide a script that uses Hugging Face AutoTrain Advanced (Space Runner) to fine-tung models. The following snippet shows an example:

bash
$ pip3 install autotrain-advanced
$ export HF_TOKEN="" # Get token from: https://huggingface.co/settings/tokens
$ autotrain spacerunner --project-name "flair-hipe2022-de-hmteams" \
  --script-path /home/stefan/Repositories/hmTEAMS/bench \
  --username stefan-it \
  --token $HF_TOKEN \
  --backend spaces-t4s \
  --env "CONFIG=configs/hipe2020/de/hmteams.json;HF_TOKEN=$HF_TOKEN;REPO_NAME=stefan-it/autotrain-flair-hipe2022-de-hmteams"

The concrete implementation can be found in `script.py`.

Benchmark

We test our pretrained language models on various datasets from HIPE-2020, HIPE-2022 and Europeana. The following table shows an overview of used datasets.

LanguageDatasets
English[AjMC] - [TopRes19th]
German[AjMC] - [NewsEye]
French[AjMC] - [ICDAR-Europeana] - [LeTemps] - [NewsEye]
Finnish[NewsEye]
Swedish[NewsEye]
Dutch[ICDAR-Europeana]

[AjMC]: https://github.com/hipe-eval/HIPE-2022-data/blob/main/documentation/README-ajmc.md [NewsEye]: https://github.com/hipe-eval/HIPE-2022-data/blob/main/documentation/README-newseye.md [TopRes19th]: https://github.com/hipe-eval/HIPE-2022-data/blob/main/documentation/README-topres19th.md [ICDAR-Europeana]: https://github.com/stefan-it/historic-domain-adaptation-icdar [LeTemps]: https://github.com/hipe-eval/HIPE-2022-data/blob/main/documentation/README-letemps.md

Results

We report averaged F1-score over 5 runs with different seeds on development set:

ModelEnglish AjMCGerman AjMCFrench AjMCGerman NewsEyeFrench NewsEyeFinnish NewsEyeSwedish NewsEyeDutch ICDARFrench ICDARFrench LeTempsEnglish TopRes19thAvg.
hmBERT (32k) Schweter et al.85.36 ± 0.9489.08 ± 0.0985.10 ± 0.6039.65 ± 1.0181.47 ± 0.3677.28 ± 0.3782.85 ± 0.8382.11 ± 0.6177.21 ± 0.1665.73 ± 0.5680.94 ± 0.8676.98
hmTEAMS (Ours)86.41 ± 0.3688.64 ± 0.4285.41 ± 0.6741.51 ± 2.8283.20 ± 0.7979.27 ± 1.8882.78 ± 0.6088.21 ± 0.3978.03 ± 0.3966.71 ± 0.4681.36 ± 0.5978.32