VInFi-Check — Qwen2.5-7B QLoRA

Vietnamese fact-checking model fine-tuned from Qwen2.5-7B-Instruct with QLoRA, trained on sentence-level verified Vietnamese news summaries. Given a Vietnamese news article and a summary sentence, the model verifies whether the sentence is grounded in the source document.

Inspired by InFi-Check (arXiv:2601.06666).


Model Details


Training Data

Vietnamese news articles across 20 topic categories, with summaries generated by DeepSeek and verified via majority vote across 3 LLMs (GPT-4o-mini · Qwen-2.5-72B · LLaMA-3.3-70B). Each sentence is paired with grounding evidence from the source document. Six hallucination types are injected synthetically: Predicate Error, Entity Error, Circumstance Error, Co-reference Error, Discourse Link Error, Extrinsic Error.


How to Use

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, GenerationConfig
from peft import PeftModel

BASE_MODEL = "Qwen/Qwen2.5-7B-Instruct"
ADAPTER_ID = "sunflowerbiii/infi-check-qwen25-7b-qlora-c"

# Load with 4-bit quantization
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
    bnb_4bit_use_double_quant=True,
)

tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
    BASE_MODEL, quantization_config=bnb_config, device_map="auto", trust_remote_code=True
)
model = PeftModel.from_pretrained(base_model, ADAPTER_ID)
model.eval()

# Build prompt
document = "..."         # Vietnamese news article
summary  = "..."         # Summary sentence to verify

instruction = (
    "Your task is to evaluate a summary by comparing it to the original document "
    "and identifying any errors present in the summary.\n\n"
    "Possible error types:\n"
    "- Predicate Error, Entity Error, Circumstance Error\n"
    "- Co-reference Error, Discourse Link Error\n"
    "- Extrinsic Error\n\n"
    "For each error found, output:\n"
    "- Location: the erroneous sentence\n"
    "- Explanation: why it is wrong\n"
    "- Correction: corrected version\n"
    "- Error Type: one of the types above\n\n"
    "Write analysis in Vietnamese. End with: 'Therefore, the answer is YES.' or 'Therefore, the answer is NO.'\n\n"
    f"Document:\n{document}\n\nSummary:\n{summary}"
)

prompt = f"<|im_start|>user\n{instruction}<|im_end|>\n<|im_start|>assistant\n"

im_end_id = tokenizer.convert_tokens_to_ids("<|im_end|>")
eot_id    = tokenizer.convert_tokens_to_ids("<|endoftext|>")

inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=2048).to(model.device)
with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=1024,
        do_sample=False,
        repetition_penalty=1.1,
        eos_token_id=[im_end_id, eot_id],
        pad_token_id=eot_id,
    )

gen_ids = output_ids[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(gen_ids, skip_special_tokens=True))

Citation

@article{bai2026inficheck,
  title   = {InFi-Check: Interpretable and Fine-Grained Fact-Checking of LLMs},
  author  = {Bai, Yuzhuo and Si, Shuzheng and Luo, Kangyang and Wang, Qingyi and
             Li, Wenhao and Chen, Gang and Qi, Fanchao and Sun, Maosong},
  journal = {arXiv preprint arXiv:2601.06666},
  year    = {2026}
}
Downloads last month
44
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sunflowerbiii/VInficheck

Base model

Qwen/Qwen2.5-7B
Adapter
(2137)
this model

Paper for sunflowerbiii/VInficheck