Downloads · 30 days
90
1% of all-time downloads
StelleX/mt5-base-thaisum-text-summarization
mt5-base-thaisum-text-summarization is a summarization model from StelleX. Use it when you need a shorter version of a longer text. It is set up for transformers.
This repository contains the finetuned mT5-base model for Thai sentence summarization. The architecture of the model is based on mT5 model and fine-tuned on text-summarization pairs in Thai.
Downloads · 30 days
90
1% of all-time downloads
All-time downloads
14.4K
Public
Parameters
582M
7.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
This repository contains the finetuned mT5-base model for Thai sentence summarization. The architecture of the model is based on mT5 model and fine-tuned on text-summarization pairs in Thai.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
tokenizer = AutoTokenizer.from_pretrained("preechanon/mt5-base-thaisum-text-summarization")
model = AutoModelForSeq2SeqLM.from_pretrained("preechanon/mt5-base-thaisum-text-summarization")
new_input_string = "ข้อความที่ต้องการ"
input_ = tokenizer(new_input_string, truncation=True, max_length=1024, return_tensors="pt")
with torch.no_grad():
preds = model.generate(
input_['input_ids'].to('cpu'),
num_beams=15,
num_return_sequences=1,
no_repeat_ngram_size=1,
remove_invalid_values=True,
max_length=140,
)
summary = tokenizer.decode(preds[0], skip_special_tokens=True)
summary
The following hyperparameters were used during training:
NSTDA Supercomputer center (ThaiSC) and the National e-Science Infrastructure Consortium for their support of computer facilities.
ปรีชานนท์ ชาติไทย และ สัจจวัจน์ ส่งเสริม. (2567),
การสรุปข้อความข่าวภาษาไทยด้วยโครงข่ายประสาทเทียม (Thai News Text Summarization Using Neural Network),
วิทยาศาสตรบัณฑิต (วทบ.):ขอนแก่น, มหาวิทยาลัยขอนแก่น