Thai wangchanberta_wiki_qa_finetuned_squad CamemBertForQuestionAnswering from SiraH

Description

Pretrained CamemBertForQuestionAnswering model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.wangchanberta_wiki_qa_finetuned_squad is a Thai model originally trained by SiraH.

Download Copy S3 URI

How to use



document_assembler = MultiDocumentAssembler() \
    .setInputCol(["question", "context"]) \
    .setOutputCol(["document_question", "document_context"])
    
    
spanClassifier = CamemBertForQuestionAnswering.pretrained("wangchanberta_wiki_qa_finetuned_squad","th") \
            .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 = CamemBertForQuestionAnswering  
    .pretrained("wangchanberta_wiki_qa_finetuned_squad", "th")
    .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: wangchanberta_wiki_qa_finetuned_squad
Compatibility: Spark NLP 5.2.4+
License: Open Source
Edition: Official
Input Labels: [document_question, document_context]
Output Labels: [answer]
Language: th
Size: 389.4 MB

References

https://huggingface.co/SiraH/wangchanberta-wiki-qa-finetuned-squad