Views
No views yet
[!IMPORTANT] Superseded. Use ChatgaiyyaLM-0.5B-B2_subset_ctg_syl_bn instead — 65.64 chrF on Chittagonian→Bangla against this adapter's 35.66, trained jointly with Sylheti and standard Bangla and uploaded without the lossy repackaging step described below.
Qwen/Qwen2.5-0.5B to Chittagonian (চাটগাঁইয়া), a Bangla dialect
spoken by tens of millions of people with almost no NLP resources.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5REPO = "AsifZaman1912/ChatgaiyyaLM-0.5B"
6tok = AutoTokenizer.from_pretrained(REPO)
7model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B", dtype=torch.float16)
8model.resize_token_embeddings(len(tok)) # REQUIRED: adapter adds 3,914 tokens
9model = PeftModel.from_pretrained(model, REPO).eval()
10
11prompt = "চাটগাঁইয়া থেকে প্রমিত বাংলায় অনুবাদ করো:\nঅ্যাঁই ভাত ন হাইয়্যুম\nঅনুবাদ:"
12ids = tok(prompt, return_tensors="pt")
13out = model.generate(**ids, max_new_tokens=64, do_sample=False)
14print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))| System | ctg → bn | bn → ctg |
|---|---|---|
| base Qwen2.5-0.5B, no adaptation | 20.54 | 19.77 |
| copy the input unchanged | 29.51 | 28.79 |
| this adapter (independently re-measured) | 35.66 | 24.10 |
| rule transducer, no GPU | — | 57.94 |
| the same arm, as measured on the training run | 58.46 | 52.63 |
| Adaptation | vocabulary augmentation + subset-selected continued pretraining + instruction tuning |
| CPT tokens | 7,189,504 |
| CPT loss | 2.7438 |
| SFT loss | 1.3713 |
| Wall time | 95 min on 2× Tesla T4 |
| Added vocabulary | 3,914 Chittagonian subword tokens |
| Precision | fp16+GradScaler (Tesla T4, sm_75 has no hardware bf16) |
silver (auto-derived labels or transduced text),
awaiting native-speaker validation.1@software{chatgaiyyalm,
2 title = {ChatgaiyyaLM: Language Adaptation and Benchmarking for Chittagonian},
3 author = {Asifuzzaman, A. K. M.},
4 year = {2026},
5 url = {https://github.com/A-K-M-Asifuzzaman/Chatgaiya-AI}
6}