Instructions to use sinhala-nlp/Qwen3.5-9B-PaliSinhala-Pali2Si-si with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sinhala-nlp/Qwen3.5-9B-PaliSinhala-Pali2Si-si with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "sinhala-nlp/Qwen3.5-9B-PaliSinhala-Pali2Si-si") - Notebooks
- Google Colab
- Kaggle
Qwen3.5-9B-PaliSinhala-Pali2Si-si
A LoRA adapter for Pali to Sinhala translation, fine-tuned from Qwen/Qwen3.5-9B as part of the SinGen Sinhala text generation benchmark.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B", dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, "sinhala-nlp/Qwen3.5-9B-PaliSinhala-Pali2Si-si")
Prompts use the base model's chat template with thinking disabled, and the assistant
response begins with the Translation: prefix.
Training
| Training pairs | 9450 |
| Instruction language | si |
| Length-matched subsample | False |
| Epochs | 1.0 |
| Effective batch size | 16 |
| Learning rate | 0.0002 |
| Max sequence length | 3072 |
| LoRA r / alpha / dropout | 16 / 32 / 0.05 |
| Thinking during training | False |
Evaluation
Last 1000 rows of sinhala-nlp/pali-sinhala, whitespace-tokenized (sacreBLEU's default
13a tokenizer splits Sinhala conjuncts and vowel signs):
| Metric | Score |
|---|---|
| Corpus sacreBLEU | 0.00 |
| Sentence-level BLEU mean | 0.07 |
| Hyp/ref length ratio | 0.028 |
Read the scores with the length ratio. The corpus is in canonical order, so the trailing 1000 rows used as the test set are much longer than the training pool (median target length differs by roughly an order of magnitude). Predictions are therefore shorter than references and BLEU is partly driven by the brevity penalty rather than translation quality. This split is kept as-is so the numbers stay comparable across the model families evaluated in SinGen.
Licence
This adapter inherits the licence of the base model; check the base model card
before redistributing. Verify the terms of the sinhala-nlp/pali-sinhala dataset
on its dataset card as well.
- Downloads last month
- 21
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "sinhala-nlp/Qwen3.5-9B-PaliSinhala-Pali2Si-si")