File size: 1,209 Bytes
4ff3d2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
license: cc
language:
- nso
metrics:
- perplexity
tags:
- sepedi
- sesotho sa leboa
- northen sotho
- south africa
- bantu
- xlm-roberta
library_name: transformers
widget:
- text: "mopresidente wa <mask> wa afrika-borwa"
---


# Zabantu - Sepedi 

This is a variant of [Zabantu](https://huggingface.co/dsfsi/zabantu-bantu-250m) pre-trained on a monolingual dataset of Sepedi(nso) sentences on a transformer network 
with 120 million traininable parameters.


# Usage Example(s)

```python
from transformers import pipeline

# Initialize the pipeline for masked language model
unmasker = pipeline('fill-mask', model='dsfsi/zabantu-nso-120m')

# The Sepedi sentence with a masked token
sample_sentences = ["mopresidente wa <mask> wa afrika-borwa",   # original token: maloba
"bašomedi ba polase ya dinamune ya zebediela citrus ba hlomile magato a <mask> malebana le go se sepetšwe botse ga dilo ka polaseng eo."  # original token: boipelaetšo
]

# Perform the fill-mask task
results = unmasker(sentence)

# Display the results
for result in results:
    print(f"Predicted word: {result['token_str']} - Score: {result['score']}")
    print(f"Full sentence: {result['sequence']}\n")
    print("=" * 80)
```