Downloads · 30 days
26
2% of all-time downloads
nguyendangsonlam/lsg-ner-vietnamese-electra-base-1024
lsg-ner-vietnamese-electra-base-1024 is a token classification model from nguyendangsonlam. Use it when you need labels on individual words, such as names. It is set up for transformers.
A LSG version with extended input length based on NlpHUST/ner-vietnamese-electra-base and LSG Attention.\ Remember to add trustremotecode=True option while loading the model.
Downloads · 30 days
26
2% of all-time downloads
All-time downloads
1.4K
Public
Repo size
1.1 GB
Likes
2
Public
Click a slice to open those files.
.bin537 MB · 100%
From the Hugging Face model README
A LSG version with extended input length based on NlpHUST/ner-vietnamese-electra-base and LSG Attention.
Remember to add trust_remote_code=True option while loading the model.
Fill mask example:
from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
model = AutoModelForTokenClassification.from_pretrained("nguyendangsonlam/lsg-ner-vietnamese-electra-base-1024", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("nguyendangsonlam/lsg-ner-vietnamese-electra-base-1024")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "Chiều 3/1, Đoàn công tác của Báo Nhân Dân do đồng chí Lê Quốc Minh, Ủy viên Trung ương Đảng, Tổng Biên tập Báo Nhân Dân, Phó Trưởng Ban Tuyên giáo Trung ương, Chủ tịch Hội Nhà báo Việt Nam làm Trưởng đoàn đã có buổi làm việc với lãnh đạo tỉnh Tuyên Quang."
ner_results = nlp(example)
print(ner_results)