使用 spacy v3,我尝试使用camemBert 训练分类器,但遇到了CUDA out of memory问题。为了解决这个问题,我读到应该减小批量大小,但我很困惑应该更改哪个参数:
我试图理解每个参数之间的区别:
管道和评估的默认批量大小。默认为 1000。
培训/评估过程中是否使用了这些功能?
在快速启动小部件(https://spacy.io/usage/training#quickstart)中,为什么该值根据硬件而不同?CPU 为 1000,GPU 为 128。
训练过程中,这个值低的话评估会不会慢一些?
填充批次的最大尺寸。默认为 4096。
根据警告消息:Token indices sequence length is longer than the specified maximum sequence length for this model (556 > 512). Running this sequence through the model will result in indexing errors此处解释(https://github.com/explosion/spaCy/issues/6939),Camembert模型指定的最大序列长度为 512。
参数 max_batch_item 是否重载到该值?我应该将该值更改为 512 吗?
machine-learning spacy-transformers huggingface-transformers spacy-3