XLM-RoBERTa Base for Kinyarwanda (sent_xlm_roberta_base_finetuned_kinyarwanda)

Description

sent_xlm_roberta_base_finetuned_kinyarwanda is a Kinyarwanda RoBERTa model obtained by fine-tuning xlm-roberta-base model on Kinyarwanda language texts. It provides better performance than the XLM-RoBERTa on named entity recognition datasets.

Specifically, this model is an xlm-roberta-base model that was fine-tuned on the Kinyarwanda corpus.

Download Copy S3 URI

How to use


document = DocumentAssembler()\ 
.setInputCol("text")\ 
.setOutputCol("document")

sentencerDL = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")\ 
.setInputCols(["document"])\ 
.setOutputCol("sentence")

sentece_embeddings = XlmRoBertaSentenceEmbeddings.pretrained("sent_xlm_roberta_base_finetuned_kinyarwanda", "rw")\ 
.setInputCols(["sentence"])\ 
.setOutputCol("sentence_embeddings")


val document = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")

val sentence = SentenceDetectorDLModel.pretrained("sentence_detector_dl", "xx")
.setInputCols("document")
.setOutputCol("sentence")

val senteceEmbeddings = XlmRoBertaSentenceEmbeddings.pretrained("sent_xlm_roberta_base_finetuned_kinyarwanda", "rw")
.setInputCols("sentence")
.setOutputCol("sentence_embeddings")
import nlu
nlu.load("rw.embed_sentence.xlm_roberta").predict("""Put your text here.""")

Model Information

Model Name: sent_xlm_roberta_base_finetuned_kinyarwanda
Compatibility: Spark NLP 3.3.1+
License: Open Source
Edition: Official
Input Labels: [sentence]
Output Labels: [embeddings]
Language: rw
Case sensitive: true

Data Source

Model is trained by David Adelani

Improted from https://huggingface.co/Davlan/xlm-roberta-base-finetuned-kinyarwanda