qatc-vimrc-viwikifc / README.md
nielsr's picture
nielsr HF staff
Improve model card with pipeline tag and license
96599b8 verified
|
raw
history blame
4.64 kB
metadata
language:
  - vi
library_name: transformers
tags:
  - SemViQA
  - question-answering
  - fact-checking
  - information-retrieval
pipeline_tag: TEXT_CLASSIFICATION
license: mit

SemViQA-QATC: Vietnamese Question Answering Token Classifier

Model Description

SemViQA-QATC is a component of the SemViQA system, fine-tuned from Vi-MRC to perform Extractive Question Answering (QA) and evidence extraction for fact-checking in Vietnamese.

Model Information

  • Developed by: Vi-MRC
  • Fine-tuned model: QATCForQuestionAnswering
  • Supported Language: Vietnamese
  • Task: Extractive QA, Evidence Extraction
  • Dataset: ViWikiFC

Usage Example

# Install semviqa
!pip install semviqa

# Initalize a pipeline
from transformers import AutoTokenizer
from semviqa.ser.qatc_model import QATCForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("xuandin/semviqa-qatc-vi-mrc-large-viwikifc")
model = QATCForQuestionAnswering.from_pretrained("xuandin/semviqa-qatc-vi-mrc-large-viwikifc")
claim = "Chiến tranh với Campuchia đã kết thúc trước khi Việt Nam thống nhất."
context = "Sau khi thống nhất, Việt Nam tiếp tục gặp khó khăn do sự sụp đổ và tan rã của đồng minh Liên Xô cùng Khối phía Đông, các lệnh cấm vận của Hoa Kỳ, chiến tranh với Campuchia, biên giới giáp Trung Quốc và hậu quả của chính sách bao cấp sau nhiều năm áp dụng. Năm 1986, Đảng Cộng sản ban hành cải cách đổi mới, tạo điều kiện hình thành kinh tế thị trường và hội nhập sâu rộng. Cải cách đổi mới kết hợp cùng quy mô dân số lớn đưa Việt Nam trở thành một trong những nước đang phát triển có tốc độ tăng trưởng thuộc nhóm nhanh nhất thế giới, được coi là Hổ mới châu Á dù cho vẫn gặp phải những thách thức như tham nhũng, tội phạm gia tăng, ô nhiễm môi trường và phúc lợi xã hội chưa đầy đủ. Ngoài ra, giới bất đồng chính kiến, chính phủ một số nước phương Tây và các tổ chức theo dõi nhân quyền có quan điểm chỉ trích hồ sơ nhân quyền của Việt Nam liên quan đến các vấn đề tôn giáo, kiểm duyệt truyền thông, hạn chế hoạt động ủng hộ nhân quyền cùng các quyền tự do dân sự."
 
inputs = tokenizer(claim, context, return_tensors="pt", truncation=True, max_length=512)

with torch.no_grad():
    outputs = model(**inputs)
 
start_logits = outputs.start_logits
end_logits = outputs.end_logits
 
start_idx = torch.argmax(start_logits)
end_idx = torch.argmax(end_logits)
 
tokens = inputs["input_ids"][0][start_idx : end_idx + 1]
evidence = tokenizer.decode(tokens, skip_special_tokens=True)
print(evidence)
# evidence: Sau khi thống nhất, Việt Nam tiếp tục gặp khó khăn do sự sụp đổ và tan rã của đồng minh Liên Xô cùng Khối phía Đông, các lệnh cấm vận của Hoa Kỳ, chiến tranh với Campuchia, biên giới giáp Trung Quốc và hậu quả của chính sách bao cấp sau nhiều năm áp dụng.

Evaluation Results

SemViQA-QATC plays a crucial role in the SemViQA system by enhancing accuracy in evidence extraction. When integrated into a pipeline, this model helps determine whether a claim is supported or refuted based on retrieved evidence.


Citation

If you use SemViQA-QATC in your research, please cite:

@misc{nguyen2025semviqasemanticquestionanswering,
      title={SemViQA: A Semantic Question Answering System for Vietnamese Information Fact-Checking},
      author={Nam V. Nguyen and Dien X. Tran and Thanh T. Tran and Anh T. Hoang and Tai V. Duong and Di T. Le and Phuc-Lu Le},
      year={2025},
      eprint={2503.00955},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2503.00955},
}

🔗 Paper Link: SemViQA on arXiv
🔗 Source Code: GitHub - SemViQA


About

Built by Dien X. Tran LinkedIn For more details, visit the project repository. GitHub stars