在 R 包文本中運行 deberta 時出現錯誤,運行時:
textEmbed(“hello”, model = “microsoft/deberta-v3-base”)
錯誤:
Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: This tokenizer cannot be instantiated. Please make sure you have `sentencepiece` installed in order to use this tokenizer.
uj5u.com熱心網友回復:
所以要讓它作業,你需要sentencepiece在你的 conda 環境中安裝。(當我這樣做時,我遇到了一些 RStudio 對我來說凍結的問題——所以在更新 RStudio 和 R 之后,我使用 and 創建了一個特定的 conda 環境scipy 1.6,sentencepiece然后它可以毫無問題地作業:
text::textrpp_install(rpp_version=c("torch==1.8", "transformers==4.12.5",
"numpy", "nltk",
"scipy==1.6", "sentencepiece"),
envname = "textrpp_condaenv_sentencepiece")
text::textrpp_initialize(condaenv = "textrpp_condaenv_sentencepiece",
refresh_settings = TRUE)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/480418.html
