Text Generation
PEFT
Safetensors
lora
adapter
causal-lm
qwen
instruction-tuning
summary
building-energy
Instructions to use meftah416/qwen3-1.7B-bang-summary with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use meftah416/qwen3-1.7B-bang-summary with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-1.7B") model = PeftModel.from_pretrained(base_model, "meftah416/qwen3-1.7B-bang-summary") - Notebooks
- Google Colab
- Kaggle
metadata
license: apache-2.0
base_model: Qwen/Qwen1.5-1.7B
tags:
- peft
- lora
- adapter
- text-generation
- causal-lm
- qwen
- instruction-tuning
- summary
- building-energy
library_name: peft
pipeline_tag: text-generation
datasets:
- kawsarahmd/papers_summary_datasets_v4
model_type: causal-lm
inference: false
qwen3-1.7B-bang-summary
This repository contains a LoRA adapter fine-tuned on Qwen/Qwen1.5-1.7B using supervised fine-tuning (SFT) for the task of summarizing academic papers, with a focus on building energy, sustainability, and mechanical engineering topics.
Model Description
- Base Model: Qwen/Qwen1.5-1.7B
- Adapter Type: LoRA (Parameter-Efficient Fine-Tuning)
- Framework: PEFT with Hugging Face
transformers - Fine-tuning Task: Text summarization for technical/academic content
- Languages: Bangla, English
This adapter is trained to generate concise and informative summaries of Bangla news paper or full texts.
Dataset
- Source: kawsarahmd/papers_summary_datasets_v4
- Content: Paper abstracts and summaries
- Domain: Summary
Training Details
- Steps: ~1969
- Epochs: 1
- Max Sequence Length: 32000 tokens
- Precision: FP16 with QLoRA
- Trainer:
transformers+trl'sSFTTrainer - Hardware: 4 × 23 GB VRAM GPUs
Loss Curve
| Step | Training Loss | Validation Loss |
|---|---|---|
| 100 | 0.8318 | 0.8238 |
| 500 | 0.7467 | 0.7218 |
| 1000 | 0.6708 | 0.6710 |
| 1500 | 0.6561 | 0.6431 |
| 1900 | 0.6913 | 0.6380 |
How to Use
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("meftah416/qwen3-1.7B-bang-summary")
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen1.5-1.7B", device_map="auto", torch_dtype="auto")
# Load adapter
model = PeftModel.from_pretrained(base_model, "meftah416/qwen3-1.7B-bang-summary")
# Generate text
prompt = """
দরপতনের বৃত্তে বন্দি থাকা শেয়ারবাজার তীব্র তারল্য সংকটের মুখেও পড়েছে। মঙ্গলবার দেশের প্রধান শেয়ারবাজার ঢাকা স্টক এক্সচেঞ্জে (ডিএসই)
লেনদেন হয়েছে ৩০০ কোটি টাকারও কম। দিনশেষে লেনদেন হয়েছে ২৯১ কোটি টাকা, যা চলতি বছরের সর্বনিম্ন লেনদেন। উপরন্তু চলতি বছরে
প্রথমবারের মতো ৩০০ কোটি টাকার কম লেনদেন হয়েছে। এরআগে গত বছরের ২৬ ডিসেম্বর ডিএসইতে ৩০০ কোটি টাকার কম লেনদেন হয়েছিল। ওইদিন লেনদেন হয়েছিল ২৮২ কোটি টাকা।
এদিকে লেনদেন কমার পাশাপাশি সূচকেরও পতন ঘটেছে। আগের দিনের সূচক থেকে ১৭ পয়েন্ট কমে দিনশেষে ডিএসইর প্রধান সূচক ডিএসইএক্স
দাঁড়িয়েছে ৪ হাজার ৯৩৫ পয়েন্টে। ডিএসইক্সের পাশাপাশি ডিএসই শরিয়াহ সূচক ও ডিএসই-৩০ সূচকেরও পতন হয়েছে।
"""
input_text = f"Summarize the following text \n{prompt}:"
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(output[0], skip_special_tokens=True))