CTranslate2 Exception when using some T5 model

8mmmxcuj  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(38)

您好,根据您的描述,您在使用T5Tokenizer时遇到了异常。这可能是因为您正在尝试运行一个使用不同算法训练的模型。在某些情况下,某些模型必须使用T5Tokenizer。

如果您想解决这个问题,可以尝试更改代码中的

tokenizer_class = transformers.AutoTokenizer

if self._model_name_or_path == 'Rostlab/prot_t5_xl_uniref50':
    tokenizer_class = transformers.T5Tokenizer
else:
    tokenizer_class = transformers.AutoTokenizer

ifsvaxew

ifsvaxew1#

我还想知道ct2何时能支持t5作为编码器。

相关问题