模型:

AVISHKAARAM/avishkaarak-ekta-hindi

英文

avishkaarak-ekta-hindi

这是 avishkaarak-ekta-hindi 模型,使用 SQuAD2.0 数据集进行了微调。它是通过问题-回答对进行训练的,包括不可回答的问题,用于问答任务。

概述

语言模型: avishkaarak-ekta-hindi 语言:英语,印地语(即将推出) 下游任务: 提取型问答 训练数据: SQuAD 2.0 评估数据: SQuAD 2.0 代码: 查看 an example QA pipeline on Haystack 基础设施: 4x Tesla v100

超参数

batch_size = 4
n_epochs = 50
base_LM_model = "roberta-base"
max_seq_len = 512
learning_rate = 9e-5
lr_schedule = LinearWarmup
warmup_proportion = 0.2
doc_stride=128
max_query_length=64

用法

在Haystack中

Haystack是由deepset开发的NLP框架。您可以在Haystack流水线中使用此模型进行大规模的问答(在许多文档上)。要在 Haystack 中加载模型:

reader = FARMReader(model_name_or_path="AVISHKAARAM/avishkaarak-ekta-hindi")
# or 
reader = TransformersReader(model_name_or_path="AVISHKAARAM/avishkaarak-ekta-hindi",tokenizer="deepset/roberta-base-squad2")

关于AVISHKAARAM/avishkaarak-ekta-hindi用于问答的完整示例,请查看 Tutorials in Haystack Documentation

在Transformers中

from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

model_name = "AVISHKAARAM/avishkaarak-ekta-hindi"

# a) Get predictions
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
    'question': 'Why is model conversion important?',
    'context': 'The option to convert models between FARM and transformers gives freedom to the user and let people easily switch between frameworks.'
}
res = nlp(QA_input)

# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

性能

使用 official eval script 对SQuAD 2.0开发集进行评估。

"exact": 79.87029394424324,
"f1": 82.91251169582613,

"total": 11873,
"HasAns_exact": 77.93522267206478,
"HasAns_f1": 84.02838248389763,
"HasAns_total": 5928,
"NoAns_exact": 81.79983179142137,
"NoAns_f1": 81.79983179142137,
"NoAns_total": 5945

作者

Shashwat Bindal: optimus.coders.@ai

Sanoj: optimus.coders.@ai