NIRVLab โ€” WordPiece Tokenizer for Swahili XNLI

A WordPiece tokenizer (BERT-style) trained from scratch on the Swahili (sw) subset of the facebook/xnli dataset.

Training Details

Parameter Value
Algorithm WordPiece
Vocabulary size 32,000
Special tokens <s>, <pad>, </s>, <unk>, <mask>
Corpus facebook/xnli / sw โ€” all splits
Corpus size 800,404 sentences
Normalizer NFC
Pre-tokenizer Whitespace
Min frequency 2
Continuing subword prefix ##

Evaluation Metrics

Metric Value
Tokens / char 0.2105
Fertility (tokens / word) 1.3605
Avg sequence length 16.58 tokens
Vocabulary coverage 1.0000

Usage

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("NIRVLab/xnli-wordpiece-sw-32k")
tokens = tokenizer("Habari ya leo!", return_tensors="pt")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train NIRVLab/xnli-wordpiece-sw-32k