English roberta_base_uy22_cased_finetuned_nlquad RoBertaForQuestionAnswering from jmachado

Description

Pretrained RoBertaForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.roberta_base_uy22_cased_finetuned_nlquad is a English model originally trained by jmachado.

Download Copy S3 URI

How to use



document_assembler = MultiDocumentAssembler() \
    .setInputCol(["question", "context"]) \
    .setOutputCol(["document_question", "document_context"])
    
    
spanClassifier = RoBertaForQuestionAnswering.pretrained("roberta_base_uy22_cased_finetuned_nlquad","en") \
            .setInputCols(["document_question","document_context"]) \
            .setOutputCol("answer")

pipeline = Pipeline().setStages([document_assembler, spanClassifier])

pipelineModel = pipeline.fit(data)

pipelineDF = pipelineModel.transform(data)



val document_assembler = new MultiDocumentAssembler()
    .setInputCol(Array("question", "context")) 
    .setOutputCol(Array("document_question", "document_context"))
    
val spanClassifier = RoBertaForQuestionAnswering  
    .pretrained("roberta_base_uy22_cased_finetuned_nlquad", "en")
    .setInputCols(Array("document_question","document_context")) 
    .setOutputCol("answer") 

val pipeline = new Pipeline().setStages(Array(document_assembler, spanClassifier))

val pipelineModel = pipeline.fit(data)

val pipelineDF = pipelineModel.transform(data)


Model Information

Model Name: roberta_base_uy22_cased_finetuned_nlquad
Compatibility: Spark NLP 5.2.1+
License: Open Source
Edition: Official
Input Labels: [document_question, document_context]
Output Labels: [answer]
Language: en
Size: 407.2 MB

References

https://huggingface.co/jmachado/roberta-base-uy22-cased-finetuned-nlquad