akdeniz27/modernbert-tr-base-ner

🤗 Hugging Face 来源token-classificationmit149M 参数597 MBsafetensors✓ 1 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo akdeniz27/modernbert-tr-base-ner ./model-folder
需要做种者 →

Turkish Named Entity Recognition (NER) Model

This model is the fine-tuned version of ModernBERT based model "ytu-ce-cosmos/modernbert-tr-base" using a reviewed version of well known Turkish NER dataset (https://github.com/stefan-it/turkish-bert/files/4558187/nerdata.txt).

Fine-tuning parameters:

task = "ner"
model_checkpoint = "ytu-ce-cosmos/modernbert-tr-base"
label_list = ['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC']
learning_rate=2e-5,
per_device_train_batch_size=8,
per_device_eval_batch_size=8,
gradient_accumulation_steps=2,
num_train_epochs=3,
weight_decay=0.01,

How to use:

from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
model = AutoModelForTokenClassification.from_pretrained("akdeniz27/modenbert-tr-base-ner")
tokenizer = AutoTokenizer.from_pretrained("akdeniz27/modenbert-tr-base-ner")
# tokenizer.model_max_length = 512 # Model max_length could be set here (max 8192 as default)
ner = pipeline("token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="first")
ner("your text here")

Pls refer "https://huggingface.co/transformers/_modules/transformers/pipelines/token_classification.html" for entity grouping with aggregation_strategy parameter.

Reference test results:

  • accuracy: 0.9938495889576778
  • f1: 0.9506687760678844
  • precision: 0.9448256146369354
  • recall: 0.9565846599131693