tsmatz/xlm-roberta-ner-japanese

token classificationtransformersjatransformerspytorchsafetensorsxlm-robertatoken-classificationgenerated_from_trainermit
335.2K

xlm-roberta-ner-japanese

(Japanese caption : 日本語の固有表現抽出のモデル)

This model is a fine-tuned version of xlm-roberta-base (pre-trained cross-lingual RobertaModel) trained for named entity recognition (NER) token classification.

The model is fine-tuned on NER dataset provided by Stockmark Inc, in which data is collected from Japanese Wikipedia articles.
See here for the license of this dataset.

Each token is labeled by :

Label idTagTag in WidgetDescription
0O(None)others or nothing
1PERPERperson
2ORGORGgeneral corporation organization
3ORG-PPpolitical organization
4ORG-OOother organization
5LOCLOClocation
6INSINSinstitution, facility
7PRDPRDproduct
8EVTEVTevent

Intended uses

from transformers import pipeline

model_name = "tsmatz/xlm-roberta-ner-japanese"
classifier = pipeline("token-classification", model=model_name)
result = classifier("鈴井は4月の陽気の良い日に、鈴をつけて北海道のトムラウシへと登った")
print(result)

Training procedure

You can download the source code for fine-tuning from here.

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 12
  • eval_batch_size: 12
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 5

Training results

Training LossEpochStepValidation LossF1
No log1.04460.15100.8457
No log2.08920.06260.9261
No log3.013380.03660.9580
No log4.017840.01960.9792
No log5.022300.01730.9864

Framework versions

  • Transformers 4.23.1
  • Pytorch 1.12.1+cu102
  • Datasets 2.6.1
  • Tokenizers 0.13.1
DEPLOY IN 60 SECONDS

Run xlm-roberta-ner-japanese on Runcrate

Deploy on H100, A100, or RTX GPUs. Pay only for what you use. No setup required.