pub enum QuestionAnsweringOption {
Bert(BertForQuestionAnswering),
Deberta(DebertaForQuestionAnswering),
DebertaV2(DebertaV2ForQuestionAnswering),
DistilBert(DistilBertForQuestionAnswering),
MobileBert(MobileBertForQuestionAnswering),
Roberta(RobertaForQuestionAnswering),
XLMRoberta(RobertaForQuestionAnswering),
Albert(AlbertForQuestionAnswering),
XLNet(XLNetForQuestionAnswering),
Reformer(ReformerForQuestionAnswering),
Longformer(LongformerForQuestionAnswering),
FNet(FNetForQuestionAnswering),
}Expand description
Variants§
Bert(BertForQuestionAnswering)
Bert for Question Answering
Deberta(DebertaForQuestionAnswering)
DeBERTa for Question Answering
DebertaV2(DebertaV2ForQuestionAnswering)
DeBERTa V2 for Question Answering
DistilBert(DistilBertForQuestionAnswering)
DistilBert for Question Answering
MobileBert(MobileBertForQuestionAnswering)
MobileBert for Question Answering
Roberta(RobertaForQuestionAnswering)
Roberta for Question Answering
XLMRoberta(RobertaForQuestionAnswering)
XLMRoberta for Question Answering
Albert(AlbertForQuestionAnswering)
Albert for Question Answering
XLNet(XLNetForQuestionAnswering)
XLNet for Question Answering
Reformer(ReformerForQuestionAnswering)
Reformer for Question Answering
Longformer(LongformerForQuestionAnswering)
Longformer for Question Answering
FNet(FNetForQuestionAnswering)
FNet for Question Answering
Implementations§
source§impl QuestionAnsweringOption
impl QuestionAnsweringOption
sourcepub fn new<'p, P>(
model_type: ModelType,
p: P,
config: &ConfigOption
) -> Result<Self, RustBertError>where
P: Borrow<Path<'p>>,
pub fn new<'p, P>(
model_type: ModelType,
p: P,
config: &ConfigOption
) -> Result<Self, RustBertError>where
P: Borrow<Path<'p>>,
Instantiate a new question answering model of the supplied type.
Arguments
model_type-ModelTypeindicating the model type to load (must match with the actual data to be loaded)p-tch::nn::Pathpath to the model file to load (e.g. model.ot)config- A configuration (the model type of the configuration must be compatible with the value formodel_type)
sourcepub fn model_type(&self) -> ModelType
pub fn model_type(&self) -> ModelType
Returns the ModelType for this SequenceClassificationOption