Hugging Face包安装碰到的一些问题

为了尝试体验AI模型,需要到hugging face下载模型数据,在机器上安装了一下hugging face支持包,碰到如下一些问题
1. Cargo, the Rust package manager, is not installed or is not on PATH
解决方法安装rust curl -sSf |sh

2. error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
–> tokenizers-lib\src\models\bpe\
522 | let w = &words[*i] as *const _ as *mut _;
| ——————————– casting happend here …
526 | let word: &mut Word = &mut (*w);
| ^^^^^^^^^
= note: for more information, visit
= note: `#[deny(invalid_reference_casting)]` on by default
!rustup toolchain install 1.72.0
!rustup default 1.72.0
!rustc –version
!pip install -U transformers
!pip install –upgrade transformers==4.06 –verbose
解决方法,先单独安装 tokenizers 库 pip install tokenizers 问题消失

Popularity: 1% [?]

Random Posts