ViBidLAQA_base 是一款专为越南语招投标法律领域开发的抽象问答(AQA)模型。该模型基于 VietAI/vit5-base 架构构建,并使用专业的招投标法律数据集进行微调,在生成自然、准确的法律查询响应方面表现出强劲性能。
ViBidLQA 数据集具有以下特点:
| 指标 | 得分 |
|---|---|
| ROUGE-1 | 75.09 |
| ROUGE-2 | 63.43 |
| ROUGE-L | 65.72 |
| ROUGE-L-SUM | 65.79 |
| BLEU-1 | 53.61 |
| BLEU-2 | 47.51 |
| BLEU-3 | 43.40 |
| BLEU-4 | 39.54 |
| METEOR | 64.38 |
| BERT-Score | 86.65 |
import argparse
import torch
from openmind import pipeline, is_torch_npu_available
from openmind_hub import snapshot_download
import time
def parse_args():
parser = argparse.ArgumentParser(description="Eval the model")
parser.add_argument(
"--model_name_or_path",
type=str,
help="Path to the model",
default="zhouhui/ViBidLAQA_base",
)
args = parser.parse_args()
return args
def main():
args = parse_args()
model_path = args.model_name_or_path
if is_torch_npu_available():
device = "npu:0"
elif torch.cuda.is_available():
device = "cuda:0"
else:
device = "cpu"
#device = "cpu"
start_time = time.time()
qa = pipeline("question-answering", model=model_path, tokenizer=model_path, device=device)
qa_input = {
"question": "Why is model conversion important?",
"context": "The option on convert models between FARM and openmind gives freedom to the user and let people easily switch between frameworks."
}
ans = qa(qa_input)
print()
print(ans)
print()
end_time = time.time()
print(f"硬件环境:{device},推理执行时间:{end_time - start_time}秒")
if __name__ == "__main__":
main()该模型在以下方面具有优势:
如果您在研究中使用此模型,请引用:
comming soon...如有问题、反馈或合作意向:
本项目采用 MIT 许可证 - 详情参见 LICENSE 文件。