尝试运行huggingface上的Kosmos,https://huggingface.co/ydshieh/kosmos-2-patch14-224失败,报错:
nameerror: name 'kosmos2tokenizer' is not defined
查看报错代码:
vi /root/.cache/huggingface/modules/transformers_modules/ydshieh/kosmos-2-patch14-224/48e3edebaeb02dc9fe105f40e85a43a3b440dc72/tokenization_kosmos2_fast.py
看到以下代码:
print('available: ', is_sentencepiece_available())
if is_sentencepiece_available():