Instructions to use YakuzaNeko/kr-dlp-ner-roberta-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YakuzaNeko/kr-dlp-ner-roberta-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="YakuzaNeko/kr-dlp-ner-roberta-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("YakuzaNeko/kr-dlp-ner-roberta-large") model = AutoModelForTokenClassification.from_pretrained("YakuzaNeko/kr-dlp-ner-roberta-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Korean DLP NER v3
klue/roberta-large ๊ธฐ๋ฐ ํ๊ตญ์ด ๊ฐ์ธ์ ๋ณด ํ์ง ๋ชจ๋ธ.
์ฑ๋ฅ
| ํ๊ฐ | F1 |
|---|---|
| ํ ์คํธ (KLUE + ํฉ์ฑ ๋ฐ์ดํฐ) | 95.63% |
| ์์์ฑ ํ๋์์ 34๋ฌธ์ฅ | 93.75% |
์์ธ ๊ฒฐ๊ณผ: eval_report.txt
ํ์ง ํญ๋ชฉ
์ธ๋ช , ๊ธฐ๊ด๋ช , ์ฃผ์, ๋ ์ง, ์ฃผ๋ฏผ๋ฑ๋ก๋ฒํธ, ์ธ๊ตญ์ธ๋ฑ๋ก๋ฒํธ, ์ฌ์ ์๋ฑ๋ก๋ฒํธ, ์ ํ๋ฒํธ, ๊ณ์ข๋ฒํธ, ์ด๋ฉ์ผ, ์นด๋๋ฒํธ, ์ฐจ๋๋ฒํธ, ์ด์ ๋ฉดํ๋ฒํธ, ์ฌ๊ถ๋ฒํธ.
14๊ฐ ์ ํ ยท BIO ํ๊ทธ 29๊ฐ.
ํ์ต
- ๋ฐ์ดํฐ: KLUE NER 26,008๋ฌธ์ฅ + ํฉ์ฑ 30,000๋ฌธ์ฅ
- ํ์ต/๊ฒ์ฆ/ํ ์คํธ: 8:1:1
- Epochs: 8 ยท Batch: 32 ยท Learning rate: 3e-5
- Max length: 128 ยท BF16 ยท Seed: 42
์ฌ์ฉ๋ฒ
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
model_id = "YakuzaNeko/kr-dlp-ner-roberta-large"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id).eval()
text = "ํ๊ธธ๋๋์ ์ด์ ๋ฉดํ๋ฒํธ๋ 11-95-255933-61์ด๊ณ ์ฌ๊ถ๋ฒํธ๋ M123A4567์
๋๋ค."
enc = tok(text, return_offsets_mapping=True, return_tensors="pt")
offsets = enc.pop("offset_mapping")[0].tolist()
with torch.no_grad():
preds = model(**enc).logits.argmax(-1)[0].tolist()
for (s, e), p in zip(offsets, preds):
if s == e:
continue
lbl = model.config.id2label[p]
if lbl != "O":
print(f"{text[s:e]:10s} โ {lbl}")
ํ์ผ
| ํ์ผ | ๋ด์ฉ |
|---|---|
model.safetensors |
PyTorch ๊ฐ์ค์น |
model.onnx |
ONNX ๊ฐ์ค์น (opset 14) |
config.json |
๋ชจ๋ธ ์ค์ ยท๋ผ๋ฒจ |
tokenizer.json, tokenizer_config.json |
ํ ํฌ๋์ด์ |
eval_report.txt |
ํ๊ฐ ๊ฒฐ๊ณผ |
- Downloads last month
- 232
Model tree for YakuzaNeko/kr-dlp-ner-roberta-large
Base model
klue/roberta-large