Views
No views yet
bm): continued masked-language-model
pretraining with a vocabulary-extended tokenizer that adds Bambara words and the characters
Ɛ Ɔ Ɲ Ŋ.<mask> and produces
contextual representations; use it as the initialisation for fine-tuning on classification,
token tagging, QA, or as a retrieval encoder.<mask>, not [MASK].1from transformers import pipeline
2
3fill = pipeline("fill-mask", model="djelia/bm-xlm-roberta-base")
4
5for p in fill("Mɔgɔw bɛɛ bɛ bange hɔrɔnya <mask> danbe la."):
6 print(f"{p['score']:.4f} {p['token_str']!r}")| Class | XLMRobertaForMaskedLM (encoder-only) |
| Parameters | 280,924,397 (F32) |
| Layers / hidden / heads / FFN | 12 / 768 / 12 / 3072 |
| Max sequence length | 512 |
vocab_size | 253,421 |
| Special tokens | <s>=0, <pad>=1, </s>=2, <unk>=3, <mask>=253420 |
pooler_output from AutoModel is randomly
initialised. Take last_hidden_state and pool it yourself:1from transformers import AutoModel, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("djelia/bm-xlm-roberta-base")
4encoder = AutoModel.from_pretrained("djelia/bm-xlm-roberta-base").eval()
5
6hidden = encoder(**tokenizer(["Aw ni ce."], return_tensors="pt")).last_hidden_state