flair / ner-german-large

huggingface.co
Total runs: 192.2K
24-hour runs: 0
7-day runs: 785
30-day runs: -15.9K
Model's Last Updated: 8월 28 2022
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

192.2K
Total runs
0
24-hour runs
-988
3-day runs
785
7-day runs
-15.9K
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: 162.7K
Run Growth: -74.8K
Growth Rate: -45.93%
Updated:7월 22 2024
huggingface.co

Total runs: 33.2K
Run Growth: 24.9K
Growth Rate: 74.95%
Updated:3월 13 2025
huggingface.co

Total runs: 28.3K
Run Growth: 1.0K
Growth Rate: 3.56%
Updated:4월 10 2023
huggingface.co

Total runs: 13.2K
Run Growth: -5.8K
Growth Rate: -44.36%
Updated:8월 13 2025
huggingface.co

Total runs: 5.7K
Run Growth: -2.5K
Growth Rate: -44.36%
Updated:4월 05 2023
huggingface.co

Total runs: 3.3K
Run Growth: 2.8K
Growth Rate: 85.96%
Updated:12월 06 2024
huggingface.co

Total runs: 439
Run Growth: 326
Growth Rate: 74.26%
Updated:4월 07 2023
huggingface.co

Total runs: 387
Run Growth: -90
Growth Rate: -23.26%
Updated:4월 05 2023
huggingface.co

Total runs: 268
Run Growth: -76
Growth Rate: -28.36%
Updated:3월 03 2021
huggingface.co

Total runs: 264
Run Growth: -233
Growth Rate: -88.26%
Updated:3월 13 2025
huggingface.co

Total runs: 61
Run Growth: -577
Growth Rate: -945.90%
Updated:10월 04 2022
huggingface.co

Total runs: 22
Run Growth: -8
Growth Rate: -36.36%
Updated:7월 22 2024
huggingface.co

Total runs: 16
Run Growth: 3
Growth Rate: 18.75%
Updated:2월 26 2021