模型:
akdeniz27/mDeBERTa-v3-base-turkish-ner
此模型是"microsoft/mDeBERTa-v3-base"(DeBERTa V3的多语言版本)的微调版本,使用经过审查的著名的土耳其NER数据集进行微调( https://github.com/stefan-it/turkish-bert/files/4558187/nerdata.txt )。
task = "ner" model_checkpoint = "microsoft/mdeberta-v3-base" batch_size = 8 label_list = ['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'] max_length = 512 learning_rate = 2e-5 num_train_epochs = 2 weight_decay = 0.01
model = AutoModelForTokenClassification.from_pretrained("akdeniz27/mDeBERTa-v3-base-turkish-ner") tokenizer = AutoTokenizer.from_pretrained("akdeniz27/mDeBERTa-v3-base-turkish-ner") ner = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple") ner("<your text here>")
请参考“ https://huggingface.co/transformers/_modules/transformers/pipelines/token_classification.html" ”了解使用凝聚策略参数进行实体分组的方法。