自然语言处理NLP星空智能对话机器人系列:深入理解Transformer自然语言处理 KantaiBERT Initializing the trainer
目录
Step : Building the dataset
- Step : Building the dataset
- Step : Defining a data collator
- Step : Initializing the trainer
- 星空智能对话机器人系列博客
现在逐行加载数据集,使用块进行批量训练,block_size=128 示例的长度 ,Hugging Face投入了大量的资源 用于优化处理数据所需时间 :
#@title Step 10: Building the Dataset
#%%time
from transformers import LineByLineTextDataset
dataset = LineByLineText