Downloads · 30 days
22
1% of all-time downloads
satjawat/pegasus-x-thai-sum
pegasus-x-thai-sum is a summarization model from satjawat. Use it when you need a shorter version of a longer text. It is set up for transformers.
This repository features a fine-tuned Pegasus X model designed for summarizing Thai text. The architecture of the model is based on the Pegasus X model.
Downloads · 30 days
22
1% of all-time downloads
All-time downloads
1.5K
Public
Parameters
272M
2.3 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors1.1 GB · 100%
From the Hugging Face model README
This repository features a fine-tuned Pegasus X model designed for summarizing Thai text. The architecture of the model is based on the Pegasus X model.
pip install transformers
from transformers import PegasusXForConditionalGeneration, AutoTokenizer
model = PegasusXForConditionalGeneration.from_pretrained("satjawat/pegasus-x-thai-sum")
tokenizer = AutoTokenizer.from_pretrained("satjawat/pegasus-x-thai-sum")
new_input_string = "ข้อความ"
new_input_ids = tokenizer(new_input_string.lower(), return_tensors="pt").input_ids
summary_ids = model.generate(new_input_ids, max_length=50, num_beams=6, length_penalty=2.0, early_stopping=True)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print("Input:", new_input_string)
print("Generated Summary:", summary)
The following hyperparameters were used during training:
Evaluate the model with the test dataset of <a href="https://github.com/nakhunchumpolsathien/ThaiSum">ThaiSum</a>, consisting of a total of 11,000 articles, with the following scores:
NSTDA Supercomputer center (ThaiSC) and the National e-Science Infrastructure Consortium for their support of computer facilities.
If you use "satjawat/pegasus-x-thai-sum" in your project or publication, please cite the model as follows:
ปรีชานนท์ ชาติไทย และ สัจจวัจน์ ส่งเสริม. (2567),
การสรุปข้อความข่าวภาษาไทยด้วยโครงข่ายประสาทเทียม (Thai News Text Summarization Using Neural Network),
วิทยาศาสตรบัณฑิต (วทบ.):ขอนแก่น, มหาวิทยาลัยขอนแก่น