未预编译的 T5 句子分词器无法加载
This is because T5Tokenizer is trying to load a 0-length bytes as the _spm_precompiled_charsmap here: https://GitHub.com/huggingface/transformers/blob/3713bd839e580d07e4b70f2c89e986cb3c0e8ddf/src/transformers/models/t5/tokenization_t5.py#L120-L121 The bytes comes from here: https://GitHub.com/huggingface/transformers/blob/3713bd839e580d07e4b70f2c89e986cb3c0e8ddf/src/transformers/convert_slow_tokenizer.py#L195 Even if _spm_precompiled_charsmap is missing from the protobuf model, this will return empty bytes, as that is the default value for bytes fields. This can be reproduced with the tokenizer from google/umt5-xxl. (Remove the tokenizer.json, keep only special_tokens_map.json, spiece.model, and tokenizer_config.json.)
内容来源: huggingface/transformers