Downloads · 30 days
143
73% of all-time downloads
akdeniz27/modernbert-tr-base-ner
modernbert-tr-base-ner is a token classification model from akdeniz27. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
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/ner…
Downloads · 30 days
143
73% of all-time downloads
All-time downloads
196
Public
Parameters
149M
1.2 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors597 MB · 100%
From the Hugging Face model README
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).
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,
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.