--- widget: - text: "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." inference: false tags: - named-entity-recognition language: - vi model-index: - name: lsg-ner-vietnamese-electra-base-1024 results: [] --- # LSG ner vietnamese electra base model with max input length of 1024 A LSG version with extended input length based on [NlpHUST/ner-vietnamese-electra-base](https://huggingface.co/NlpHUST/ner-vietnamese-electra-base) and [LSG Attention](https://arxiv.org/abs/2210.15497).\ Remember to add trust_remote_code=True option while loading the model. ## Usage Fill mask example: ```python: 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) ```