我想要一天分享一點「LLM從底層堆疊的技術」,並且每篇文章長度控制在三分鐘以內,讓大家不會壓力太大,但是又能夠每天成長一點。
整理目前手上有的素材:
資料準備齊全,也做好 Tokenization,即可以來創建 Trainer,程式如下:
from transformers import Trainer, TrainingArguments
training_args = TrainingArguments(output_dir = "./KantaiBERT",
overwrite_output_dir = True,
num_train_epochs = 1,
per_device_train_batch_size = 64,
save_steps = 10000,
save_total_limit = 2)
trainer = Trainer(model = model,
args = training_args,
data_collator = data_collator,
train_dataset = dataset)
當中參數說明如下: