English DistilBertForQuestionAnswering model (from huxxx657) Jumbling

Description

Pretrained Question Answering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. distilbert-base-uncased-finetuned-jumbling-squad-15 is a English model originally trained by huxxx657.

Download Copy S3 URICopied!

How to use

documentAssembler = MultiDocumentAssembler() \
.setInputCols(["question", "context"]) \
.setOutputCols(["document_question", "document_context"])

spanClassifier = DistilBertForQuestionAnswering.pretrained("distilbert_qa_base_uncased_finetuned_jumbling_squad_15","en") \
.setInputCols(["document_question", "document_context"]) \
.setOutputCol("answer")\
.setCaseSensitive(True)

pipeline = Pipeline(stages=[documentAssembler, spanClassifier])

data = spark.createDataFrame([["What is my name?", "My name is Clara and I live in Berkeley."]]).toDF("question", "context")

result = pipeline.fit(data).transform(data)

Model Information

Model Name: distilbert_qa_base_uncased_finetuned_jumbling_squad_15
Compatibility: Spark NLP 4.0.0+
License: Open Source
Edition: Official
Input Labels: [document_question, document_context]
Output Labels: [answer]
Language: en
Size: 247.5 MB
Case sensitive: false
Max sentence length: 512

References

  • https://huggingface.co/huxxx657/distilbert-base-uncased-finetuned-jumbling-squad-15