flair / ner-german-large

huggingface.co
Total runs: 193.2K
24-hour runs: 0
7-day runs: 1.9K
30-day runs: -22.5K
Model's Last Updated: 2022年8月28日
token-classification

Introduction of ner-german-large

Model Details of ner-german-large

German NER in Flair (large model)

This is the large 4-class NER model for German that ships with Flair .

F1-Score: 92,31 (CoNLL-03 German revised)

Predicts 4 tags:

tag meaning
PER person name
LOC location name
ORG organization name
MISC other name

Based on document-level XLM-R embeddings and FLERT .


Demo: How to use in Flair

Requires: Flair ( pip install flair )

from flair.data import Sentence
from flair.models import SequenceTagger

# load tagger
tagger = SequenceTagger.load("flair/ner-german-large")

# make example sentence
sentence = Sentence("George Washington ging nach Washington")

# predict NER tags
tagger.predict(sentence)

# print sentence
print(sentence)

# print predicted NER spans
print('The following NER tags are found:')
# iterate over entities and print
for entity in sentence.get_spans('ner'):
    print(entity)

This yields the following output:

Span [1,2]: "George Washington"   [− Labels: PER (1.0)]
Span [5]: "Washington"   [− Labels: LOC (1.0)]

So, the entities " George Washington " (labeled as a person ) and " Washington " (labeled as a location ) are found in the sentence " George Washington ging nach Washington ".


Training: Script to train this model

The following Flair script was used to train this model:

import torch

# 1. get the corpus
from flair.datasets import CONLL_03_GERMAN

corpus = CONLL_03_GERMAN()

# 2. what tag do we want to predict?
tag_type = 'ner'

# 3. make the tag dictionary from the corpus
tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type)

# 4. initialize fine-tuneable transformer embeddings WITH document context
from flair.embeddings import TransformerWordEmbeddings

embeddings = TransformerWordEmbeddings(
    model='xlm-roberta-large',
    layers="-1",
    subtoken_pooling="first",
    fine_tune=True,
    use_context=True,
)

# 5. initialize bare-bones sequence tagger (no CRF, no RNN, no reprojection)
from flair.models import SequenceTagger

tagger = SequenceTagger(
    hidden_size=256,
    embeddings=embeddings,
    tag_dictionary=tag_dictionary,
    tag_type='ner',
    use_crf=False,
    use_rnn=False,
    reproject_embeddings=False,
)

# 6. initialize trainer with AdamW optimizer
from flair.trainers import ModelTrainer

trainer = ModelTrainer(tagger, corpus, optimizer=torch.optim.AdamW)

# 7. run training with XLM parameters (20 epochs, small LR)
from torch.optim.lr_scheduler import OneCycleLR

trainer.train('resources/taggers/ner-german-large',
              learning_rate=5.0e-6,
              mini_batch_size=4,
              mini_batch_chunk_size=1,
              max_epochs=20,
              scheduler=OneCycleLR,
              embeddings_storage_mode='none',
              weight_decay=0.,
              )

)

Cite

Please cite the following paper when using this model.

@misc{schweter2020flert,
    title={FLERT: Document-Level Features for Named Entity Recognition},
    author={Stefan Schweter and Alan Akbik},
    year={2020},
    eprint={2011.06993},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

Issues?

The Flair issue tracker is available here .

Runs of flair ner-german-large on huggingface.co

193.2K
Total runs
0
24-hour runs
959
3-day runs
1.9K
7-day runs
-22.5K
30-day runs

More Information About ner-german-large huggingface.co Model

ner-german-large huggingface.co

ner-german-large huggingface.co is an AI model on huggingface.co that provides ner-german-large's model effect (), which can be used instantly with this flair ner-german-large model. huggingface.co supports a free trial of the ner-german-large model, and also provides paid use of the ner-german-large. Support call ner-german-large model through api, including Node.js, Python, http.

ner-german-large huggingface.co Url

https://huggingface.co/flair/ner-german-large

flair ner-german-large online free

ner-german-large huggingface.co is an online trial and call api platform, which integrates ner-german-large's modeling effects, including api services, and provides a free online trial of ner-german-large, you can try ner-german-large online for free by clicking the link below.

flair ner-german-large online free url in huggingface.co:

https://huggingface.co/flair/ner-german-large

ner-german-large install

ner-german-large is an open source model from GitHub that offers a free installation service, and any user can find ner-german-large on GitHub to install. At the same time, huggingface.co provides the effect of ner-german-large install, users can directly use ner-german-large installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ner-german-large install url in huggingface.co:

https://huggingface.co/flair/ner-german-large

Url of ner-german-large

ner-german-large huggingface.co Url

Provider of ner-german-large huggingface.co

flair
ORGANIZATIONS

Other API from flair

huggingface.co

Total runs: 166.9K
Run Growth: -66.0K
Growth Rate: -39.94%
Updated:2024年7月22日
huggingface.co

Total runs: 34.2K
Run Growth: 29.4K
Growth Rate: 86.78%
Updated:2025年3月13日
huggingface.co

Total runs: 28.4K
Run Growth: 813
Growth Rate: 2.88%
Updated:2023年4月10日
huggingface.co

Total runs: 19.1K
Run Growth: -25.2K
Growth Rate: -130.54%
Updated:2024年7月22日
huggingface.co

Total runs: 16.0K
Run Growth: 3.6K
Growth Rate: 21.30%
Updated:2025年8月13日
huggingface.co

Total runs: 6.1K
Run Growth: -2.6K
Growth Rate: -42.21%
Updated:2023年4月5日
huggingface.co

Total runs: 1.7K
Run Growth: 1.2K
Growth Rate: 71.32%
Updated:2024年12月6日
huggingface.co

Total runs: 437
Run Growth: 314
Growth Rate: 71.69%
Updated:2023年4月7日
huggingface.co

Total runs: 397
Run Growth: -81
Growth Rate: -20.56%
Updated:2023年4月5日
huggingface.co

Total runs: 299
Run Growth: 8
Growth Rate: 2.77%
Updated:2021年3月3日
huggingface.co

Total runs: 250
Run Growth: -261
Growth Rate: -109.66%
Updated:2025年3月13日
huggingface.co

Total runs: 168
Run Growth: -40
Growth Rate: -24.54%
Updated:2021年3月3日
huggingface.co

Total runs: 60
Run Growth: -655
Growth Rate: -1129.31%
Updated:2022年10月4日
huggingface.co

Total runs: 25
Run Growth: -7
Growth Rate: -28.00%
Updated:2024年7月22日
huggingface.co

Total runs: 16
Run Growth: -12
Growth Rate: -400.00%
Updated:2021年2月26日