Instructions to use sinhala-nlp/Qwen3.5-9B-NSINA-Headlines-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-NSINA-Headlines-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-NSINA-Headlines-si") - Notebooks
- Google Colab
- Kaggle
Qwen3.5-9B-NSINA-Headlines-si
A LoRA adapter for Sinhala news headline generation, 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-NSINA-Headlines-si")
Prompts use the base model's chat template with thinking disabled, and the assistant
response begins with the Headline: prefix. Articles are trimmed to
2500 characters and then budgeted to fit max_seq_len from the lead.
Training
| Training articles | 8000 |
| Instruction language | si |
| Epochs | 1.0 |
| Effective batch size | 16 |
| Learning rate | 0.0002 |
| Max sequence length | 2560 |
| LoRA r / alpha / dropout | 16 / 32 / 0.05 |
| Thinking during training | False |
Evaluation
First 1000 instances of the NSINA-Headlines test split, ROUGE F1 x100 with
whitespace tokenization (the default rouge_score tokenizer strips non-ASCII and
zeroes out every Sinhala score):
| Metric | Score |
|---|---|
| ROUGE-1 | 29.20 |
| ROUGE-2 | 13.71 |
| ROUGE-L | 28.53 |
Licence
This adapter inherits the licence of the base model; check the base model card before redistributing. The training data is NSINA-Headlines, derived from scraped Sri Lankan news content -- verify its terms on the dataset card, as they may be more restrictive than the base model's licence.
- Downloads last month
- 18