Hugging Face包安装碰到的一些问题
为了尝试体验AI模型,需要到hugging face下载模型数据,在机器上安装了一下hugging face支持包,碰到如下一些问题
1. Cargo, the Rust package manager, is not installed or is not on PATH
解决方法安装rust curl https://sh.rustup.rs -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\trainer.rs:526:47
|
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
网上搜索尝试的方法
降级rust版本,失败
!rustup toolchain install 1.72.0
!rustup default 1.72.0
!rustc –version
卸载transfer,安装指定版本,失败
!pip install -U transformers
!pip install –upgrade transformers==4.06 –verbose
解决方法,先单独安装 tokenizers 库 pip install tokenizers 问题消失
Popularity: 4% [?]
Random Posts
各版本gcc对C++标准的支持情况
GCC所有版本支持C++和C语言情况
版本 |
发布时间 |
默认支持C标准 |
默认支持C++标准 |
April 26, 2023 |
C17 |
C++17 |
|
August 19, 2022 |
C17 |
C++17 |
|
June 28, 2022 |
C17 |
C++14 |
|
May 27, 2022 |
C17 |
C++14 |
|
May 6, 2022 |
C17 |
C++14 |
|
April 21, 2022 |
C17 |
C++17 |
|
July 28, 2021 |
C17 |
C++17 |
|
June 1, 2021 |
C17 |
C++14 |
|
May 14, 2021 |
C17 |
C++14 |
|
April 27, 2021 |
C17 |
C++17 |
|
April 8, 2021 |
C17 |
C++14 |
|
July 23, 2020 |
C17 |
C++14 |
|
May 7, 2020 |
C17 |
C++14 |
|
March 12, 2020 |
C17 |
C++14 |
|
March 4, 2020 |
C17 |
C++14 |
|
November 14, 2019 |
C11 |
C++14 |
|
August 12, 2019 |
C17 |
C++14 |
|
May 3, 2019 |
C17 |
C++14 |
|
February 22, 2019 |
C17 |
C++14 |
|
December 6, 2018 |
C11 |
C++14 |
|
October 26, 2018 |
C11 |
C++98 |
|
July 26, 2018 |
C17 |
C++14 |
|
May 2, 2018 |
C17 |
C++14 |
|
January 25, 2018 |
C11 |
C++14 |
|
October 10, 2017 |
C11 |
C++98 |
|
August 14, 2017 |
C11 |
C++14 |
|
July 4, 2017 |
C11 |
C++14 |
|
May 2, 2017 |
C11 |
C++14 |
|
December 21, 2016 |
C11 |
C++14 |
|
August 22, 2016 |
C11 |
C++14 |
|
August 3, 2016 |
C90 |
C++98 |
|
June 3, 2016 |
C11 |
C++98 |
|
April 27, 2016 |
C11 |
C++14 |
|
December 4, 2015 |
C11 |
C++98 |
|
July 16, 2015 |
C11 |
C++98 |
|
June 26, 2015 |
C90 |
C++98 |
|
June 23, 2015 |
C90 |
C++98 |
|
April 22, 2015 |
C90 |
C++98 |
|
December 19, 2014 |
C90 |
C++98 |
|
October 30, 2014 |
C90 |
C++98 |
|
July 16, 2014 |
C90 |
C++98 |
|
June 12, 2014 |
C90 |
C++98 |
|
May 22, 2014 |
C90 |
C++98 |
GCC对C++版本迭代支持情况
C++版本 |
GCC版本支持情况 |
GCC版本 |
指定版本的命令标志 |
C++98 |
完全支持 |
从GCC6.1之前版本的默认模式 |
-std=c++98 or std=gnn++98 |
C++11 |
完全支持 |
从GCC4.8.1版本完全支持 |
-std=c++11 or std=gnu++11 |
C++14 |
完全支持 |
从GCC6.1版本开始完全支持,从6.1-10(包括)的默认模式 |
-std=c++14 or std=gnu++14 |
C++17 |
完全支持 |
从GCC 5版本开始支持,到GCC 7版本已完全支持,是GCC 11到13版本的默认模式 |
-std=c++17 or std=gnu++17 |
C++20 |
未完全支持 |
从GCC 8版本开始支持 |
-std=c++20 or std=gnu++20(GCC 9以及之前版本使用-std=c++2a) |
C++23 |
未完全支持(标准开发中) |
从GCC 11版本开始支持 |
-std=c++2b or std=gnu++2b |
Popularity: 4% [?]
Random Posts
给CentOS6添加高版本gcc8支持
先换yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-6.10.repo
如果没有安装 centos-release-scl 工具包,可以使用如下方式先装它 (或在Extra光盘上找到它做安装)
wget https://copr.fedorainfracloud.org/coprs/rhscl/centos-release-scl/repo/epel-6/rhscl-centos-release-scl-epel-6.repo -O /etc/yum.repos.d/centos-release-scl.repo
yum install centos-release-scl
设置devtoolset-8的源信息
wget https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-8/repo/epel-6/mayeut-devtoolset-8-epel-6.repo -O /etc/yum.repos.d/devtoolset-8.repo
安装devtoolset-8-toolchain
yum install devtoolset-8-toolchain
安装过程中提示依赖包 strace 失败通不过,使用下面命令安装必须的编译器部分
yum install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils
启用它
scl enable devtoolset-8 bash
启用后,cmake未能正确识别新的gcc版本,可以在使用cmake时添加上命令行参数 -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/g++
Popularity: 4% [?]