Downloads · 30 days
17
19% of all-time downloads
bhaskar1707/banglasum-qwen3-0.6b
banglasum-qwen3-0.6b is a summarization model from bhaskar1707. Use it when you need a shorter version of a longer text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter fine-tuned from Qwen/Qwen3-0.6B for abstractive Bengali news summarization, trained on the full Bengali configuration of XL-Sum v2.0.
Downloads · 30 days
17
19% of all-time downloads
All-time downloads
90
Public
Repo size
52 MB
Likes
0
Public
Click a slice to open those files.
.safetensors40.4 MB · 72%
From the Hugging Face model README
A LoRA adapter fine-tuned from Qwen/Qwen3-0.6B for abstractive Bengali news summarization, trained on the full Bengali configuration of XL-Sum v2.0.
Fine-tuning was performed with 4-bit QLoRA via TRL SFTTrainer + PEFT, on a single NVIDIA Tesla T4 (16 GB) in Google Colab, resumed across multiple sessions via checkpointing.
Qwen/Qwen3-0.6BSFTTrainer + PEFT + bitsandbytescsebuetnlp/xlsum — Bengali configuration, XL-Sum v2.0, full dataset| Split | Samples |
|---|---|
| Train | 8,102 |
| Validation | 1,012 |
| Test | 1,012 |

Qwen3's tokenizer inflates Bengali text substantially — a typical article can expand to several thousand tokens (see distribution below). To guarantee every training example keeps its full reference summary within the model's context window, articles are lead-truncated to 600 tokens before the prompt is built.

| Setting | Value |
|---|---|
| LoRA rank (r) / alpha | 16 / 32 |
| Trainable parameters | 10,092,544 (2.62%) |
| Learning rate | 2e-4, cosine schedule |
| Effective batch size | 16 (per-device batch × gradient accumulation) |
| Max sequence length | 1,024 tokens |
| Epochs | 3 (1,521 total optimizer steps) |
| Optimizer | paged_adamw_8bit |
| Compute precision | bfloat16 |
| Peak GPU memory | 4.17 GB / 16 GB |
| Training | Resumed across multiple Colab sessions via checkpointing |

Full per-step logs: results/training_log_history.csv.
Evaluated on a fixed subset of 100 samples from the held-out test split (never seen during training), using deterministic (greedy) generation for a fair before/after comparison. Exact sample IDs: results/eval_sample_ids.json.
| Metric | Base Qwen3-0.6B | BanglaSum-Qwen3-0.6B | Improvement |
|---|---|---|---|
| ROUGE-1 | 0.0638 | 0.1230 | +0.0592 |
| ROUGE-2 | 0.0177 | 0.0345 | +0.0168 |
| ROUGE-L | 0.0577 | 0.1108 | +0.0531 |
| BLEU | 1.2486 | 1.6751 | +0.4265 |

Full numeric results: results/final_metrics_export.json, results/metric_comparison.csv.
✅ Success case (news-39127107)
Article: ভারতের অন্য অঞ্চলেও কোক, পেপসি নিষিদ্ধ করার দাবি জানাচ্ছেন কর্মীরা। স্থানীয় পণ্যের ব্যবহার নিশ্চিত করার জন্যই এই উদ্যোগ গ্রহণ করেছে ব্যবসায়ীরা... Reference: ভারতের দক্ষিণাঞ্চলীয় রাজ্য তামিলনাডুর ব্যবসায়ীরা সেখানে কোকা-কোলা ও পেপসি বিক্রি নিষিদ্ধ ঘোষণা করেছে। Base model: (degenerates into a bulleted list echoing the article instead of summarizing) Fine-tuned: ভারতের তামিলনাডু রাজ্যে কোকা-কোলা ও পেপসি নিষিদ্ধ করার দাবি জানাচ্ছেন কর্মীরা।
❌ Failure case — hallucination (news-46679946)
Article: ইতালিতে অবৈধভাবে খৎনা করানো নিয়ে অনেকের উদ্বেগ রয়েছে। জানা গেছে, মৃত শিশুটির ভাইকেও একই সাথে খৎনা করানো হয়... Reference: ইতালিতে অভিবাসীদের এক কেন্দ্রে একটি দু'বছরের শিশুর খৎনা করানোর সময় অতিরিক্ত রক্তক্ষরণ শুরু হবার ফলে ছেলেটি মারা গেছে। Fine-tuned: ইতালির এক ব্যক্তি খৎনা করার জন্য নিজের সন্তানের ভাইকে গ্রেফতার করেছেন।
The fine-tuned model invents an arrest that isn't in the source article — a clear hallucination, not a paraphrase of the actual event (a child's death during circumcision).
❌ Failure case — repetition (news-45332030)
Article: কেবল কোটিপতি হলেই এসব খাবারের স্বাদ নেয়া যাবে তা নয়। কিন্তু আপনাকে অনেক টাকা জমাতে হবে!... Reference: জাফরানের নাম যদি শুনে থাকেন, এটাও নিশ্চয়ই জানেন যে এটি বিশ্বের সবচেয়ে দামী মশলার একটি... Fine-tuned: আপনি কোন খাবার জমাতে হবেন? কোন খাবার জমাতে হবেন? কোন খাবার জমাতে হবেন?
A clear degenerate-repetition failure — the model loops the same phrase instead of producing content, despite
repetition_penalty=1.1at generation time.
Full predictions (all 100 evaluated samples): results/final_predictions_export.csv.
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
BASE_MODEL_ID = "Qwen/Qwen3-0.6B"
ADAPTER_ID = "bhaskar1707/banglasum-qwen3-0.6b"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True, bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True, bnb_4bit_compute_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained(ADAPTER_ID)
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL_ID, quantization_config=bnb_config, device_map="auto", torch_dtype=torch.bfloat16,
)
model = PeftModel.from_pretrained(base_model, ADAPTER_ID)
model.eval()
instruction = "নিচের বাংলা সংবাদটির একটি সংক্ষিপ্ত ও তথ্যসমৃদ্ধ সারাংশ তৈরি করুন।"
article = "..." # your Bengali news article
messages = [{"role": "user", "content": f"{instruction}\n\nসংবাদ:\n{article}"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
output_ids = model.generate(**inputs, max_new_tokens=96, do_sample=False, repetition_penalty=1.1)
summary = tokenizer.decode(output_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(summary)
Qwen/Qwen3-0.6B (Qwen Team)csebuetnlp/xlsum (Hasan et al., XL-Sum)Fine-tuned by Bhaskar Pal