Downloads · 30 days
2
14% of all-time downloads
Dongspam/t5-small-custom
t5-small-custom is a machine learning model from Dongspam. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
2
14% of all-time downloads
All-time downloads
14
Public
Parameters
60.5M
243 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors242 MB · 99%
From the Hugging Face model README
t5_small 요약 모델은 Transformer 기반의 Encoder-Decoder 구조를 가진 모델이다.
N2M 문제의 문장 요약 task를 해결하는데 사용했다.
모델은 CNN/Daily Mail 데이터셋을 사용하여 학습되었다.
이 데이터셋은 주로 뉴스 기사와 그에 대한 요약문으로 구성되어 있다.
학습 데이터는 Train, Validation, Test 세트로 나누어 사용되었다.
이번 실습에서 사용되는 CNN/Daily mail dataset에는 2가지 데이터가 존재한다.
training_args = Seq2SeqTrainingArguments(
output_dir="./results",
eval_strategy="epoch",
learning_rate=2e-5,
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
warmup_steps=500,
weight_decay=0.01,
save_total_limit=2,
num_train_epochs=1,
fp16=True,
predict_with_generate=True
)
위는 Training arguments이다.
epoch단위로 평가를 진행하며, text 생성에 대한 평가(True)를 의미한다.
train,eval batch size는 4로 지정하였고, warmup steps는 500, weight_decay는 0.01로 설정하였다.
trainer = Seq2SeqTrainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=valid_dataset,
tokenizer=tokenizer,
data_collator=data_collator,
compute_metrics=compute_metrics
)
from transformers import AutoTokenizer,AutoModelForSeq2SeqLM
model = AutoModelForSeq2SeqLM.from_pretrained("Model_path") tokenizer = AutoTokenizer.from_pretrained("Model_path")
모델은 ROUGE,BLEU 스코어를 기준으로 평가되었다.
모델은 일반적인 뉴스 기사 요약에 적합한 성능을 보였다.
1 epoch만 수행했기 때문에 성능이 좋지는 않다.