Views
No views yet
Model variants in this series:
Minuri/sinhala-llama-1b-corpus-news- Trained on news-only corpus (Model A) | Perplexity: 14.68Minuri/sinhala-llama-1b-corpus-random- Trained on random corpus (Model B) | Perplexity: 10.86Minuri/sinhala-llama-1b-corpus-diverse- Trained on diversity-optimized corpus (Model C) | Perplexity: 10.49 ✅ Best
meta-llama/Llama-3.2-1B on Minuri/sinhala-corpus-c-diverse-1m (1M diversity-optimized Sinhala sentences), using an extended tokenizer (Minuri/sinhala-llama-3.2-1b-tokenizer) that adds 7,843 Sinhala-specific tokens to the base vocabulary.paraphrase-multilingual-mpnet-base-v2) and lexical diversity metrics (TTR, MATTR, hapax ratio) from the 12.38M sentence Minuri/diverse_sinhala_dataset.| Parameter | Value |
|---|---|
| Base model | meta-llama/Llama-3.2-1B |
| Tokenizer | Minuri/sinhala-llama-3.2-1b-tokenizer |
| Training corpus | Minuri/sinhala-corpus-c-diverse-1m (1M sentences) |
| Training approach | Two-stage continual pretraining |
| Extended vocab size | 136,099 tokens |
| Token reduction on Sinhala | ~70.4% |
Minuri/sinhala-test-set-50k using token-level perplexity. Baseline perplexity is measured using the base LLaMA 3.2 1B model with the extended Sinhala tokenizer - the high baseline reflects the mismatch between the base model weights and the new vocabulary. When evaluated with the original base tokenizer, the base model perplexity is ~2.| Model | Corpus | Baseline PPL | Trained PPL | Improvement | Loss |
|---|---|---|---|---|---|
Model A (corpus-news) | News-only | 66,448.86 | 14.67 | 99.98% | 2.686 |
Model B (corpus-random) | Random | 66,454.47 | 10.86 | 99.98% | 2.385 |
| Model C (this repo) | Diversity-optimized | 66,439.92 | 10.49 | 99.98% | 2.351 ✅ |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("Minuri/sinhala-llama-1b-corpus-diverse")
4model = AutoModelForCausalLM.from_pretrained("Minuri/sinhala-llama-1b-corpus-diverse")
5
6inputs = tokenizer("ශ්රී ලංකාව", return_tensors="pt")
7outputs = model.generate(**inputs, max_new_tokens=50)
8print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Repo | Description |
|---|---|
Minuri/sinhala-llama-3.2-1b-tokenizer | Extended Sinhala tokenizer |
Minuri/sinhala-corpus-c-diverse-1m | Training corpus |
Minuri/sinhala-test-set-50k | Evaluation test set |
Minuri/sinhala-corpus-a-news-1m | Corpus A - news-only |
Minuri/sinhala-corpus-b-random-1m | Corpus B - random |
Minuri/diverse_sinhala_dataset | Full parent corpus |
meta-llama/Llama-3.2-1B and is subject to the LLaMA 3.2 Community License.