tashfiq61's picture
Update README.md
f2be1e8 verified
|
raw
history blame
2.89 kB
metadata
language: bn
library_name: transformers
tags:
  - summarization
  - bengali
  - mt5
license: mit
metrics:
  - rouge
  - bleu
base_model:
  - google/mt5-small
pipeline_tag: summarization

Bengali Summarizer MT5

This model is a fine-tuned version of the MT5 model, tailored for text summarization tasks in the Bengali language.

Model Details

Model Information

Uses

Direct Use

This model is intended for generating concise summaries of Bengali text inputs, making it useful for applications like news summarization, content aggregation, and more.

Downstream Use

Users can integrate this model into larger systems requiring text summarization capabilities in Bengali.

Out-of-Scope Use

The model is not designed for tasks outside text summarization, such as translation or sentiment analysis.

Bias, Risks, and Limitations

While the model performs well on the training data, it may not generalize perfectly to all Bengali text. Users should be cautious of potential biases present in the training data and avoid using the model for critical applications without thorough evaluation.

Recommendations

Users should evaluate the model's performance on their specific datasets and consider fine-tuning further if necessary. It's also recommended to monitor the model's outputs for any unintended biases or errors.

How to Get Started with the Model

from transformers import MT5ForConditionalGeneration, MT5Tokenizer

model_name = "tashfiq61/bengali-summarizer-mt5"
tokenizer = MT5Tokenizer.from_pretrained(model_name)
model = MT5ForConditionalGeneration.from_pretrained(model_name)

def summarize(text):
    inputs = tokenizer.encode("summarize: " + text, return_tensors="pt", max_length=512, truncation=True)
    summary_ids = model.generate(inputs, max_length=150, min_length=40, length_penalty=2.0, num_beams=4, early_stopping=True)
    return tokenizer.decode(summary_ids[0], skip_special_tokens=True)

text = "Your Bengali text here."
print(summarize(text))

Citation

If you use this model, please cite:

@misc{islam2024bengalisummarizer,
  title={Bengali Summarizer MT5},
  author={Tashfiqul Islam},
  year={2024},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/tashfiq61/bengali-summarizer-mt5}}
}