- 香橙派 - mindnlp - deepseek # 香橙派安装 mindnlp报错 # ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them ``` -sh-5.1# pip install mindnlp --no-cache-dir --trusted-host https://files.pythonhosted.org WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead. Collecting mindnlp Downloading mindnlp-0.4.0-py3-none-any.whl (8.4 MB) |████████████████████████████████| 8.4 MB 1.3 MB/s Collecting safetensors Downloading safetensors-0.5.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (450 kB) |████████████████████████████████| 450 kB 463 kB/s Requirement already satisfied: requests in /usr/local/lib/python3.9/site-packages (from mindnlp) (2.31.0) Collecting addict Downloading addict-2.4.0-py3-none-any.whl (3.8 kB) Collecting pytest==7.2.0 Downloading pytest-7.2.0-py3-none-any.whl (316 kB) |████████████████████████████████| 316 kB 456 kB/s Collecting tokenizers==0.19.1 Downloading tokenizers-0.19.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.6 MB) |████████████████████████████████| 3.6 MB 1.1 MB/s Collecting ml-dtypes Downloading ml_dtypes-0.5.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.6 MB) |████████████████████████████████| 4.6 MB 1.1 MB/s Collecting evaluate Downloading evaluate-0.4.3-py3-none-any.whl (84 kB) |████████████████████████████████| 84 kB 1.3 MB/s Requirement already satisfied: tqdm in /usr/local/lib/python3.9/site-packages (from mindnlp) (4.66.1) Requirement already satisfied: pillow>=10.0.0 in /usr/local/lib64/python3.9/site-packages (from mindnlp) (10.2.0) Collecting jieba Downloading jieba-0.42.1.tar.gz (19.2 MB) |████████████████████████████████| 19.2 MB 437 kB/s Preparing metadata (setup.py) ... done Collecting regex Downloading regex-2024.11.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (782 kB) |████████████████████████████████| 782 kB 446 kB/s Collecting pyctcdecode Downloading pyctcdecode-0.5.0-py2.py3-none-any.whl (39 kB) Collecting datasets Downloading datasets-3.3.2-py3-none-any.whl (485 kB) |████████████████████████████████| 485 kB 966 kB/s Collecting sentencepiece Downloading sentencepiece-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB) |████████████████████████████████| 1.3 MB 648 kB/s Collecting mindspore>=2.2.14 Downloading mindspore-2.5.0-cp39-none-any.whl (345.0 MB) |████████████████▉ | 181.9 MB 20 kB/s eta 2:15:46 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. mindspore>=2.2.14 from https://files.pythonhosted.org/packages/28/ef/5e67b9b0d6b4f1058c27b5e9700abf3501738b2e347e324781c6273bc99c/mindspore-2.5.0-cp39-none-any.whl#sha256=d484b1386289b4f4c05711da8edf2c438b0000f774e6bb3d1930f78d36a3a96e (from mindnlp): Expected sha256 d484b1386289b4f4c05711da8edf2c438b0000f774e6bb3d1930f78d36a3a96e Got 40ee9d02ca02362af301a1e67291e5f3eb6d2c5639ae6156bfc2fe62786a8e0d ``` # 解决 `pip install --trusted-host files.pythonhosted.org mindspore` ## 手动下载 `wget https://files.pythonhosted.org/packages/28/ef/5e67b9b0d6b4f1058c27b5e9700abf3501738b2e347e324781c6273bc99c/mindspore-2.5.0-cp39-none-any.whl ` `pip install --user mindspore-2.5.0-cp39-none-any.whl` `pip install mindnlp` ## ValueError: The mirror name not support, please use one of the mirror website below: ["huggingface", "modelscope", "wisemodel", "gitee", "aifast"] ``` Building prefix dict from the default dictionary ... Loading model from cache /tmp/jieba.cache Loading model cost 2.511 seconds. Prefix dict has been built successfully. Traceback (most recent call last): File "/root/orange-pi-mindspore/Online/17-DeepSeek-R1-Distill-Qwen-1.5B/deepseek-r1-distill-qwen-1.5b.py", line 10, in <module> tokenizer = AutoTokenizer.from_pretrained("MindSpore-Lab/DeepSeek-R1-Distill-Qwen-1.5B", mirror="modelers", ms_dtype=mindspore.float16) File "/usr/local/lib/python3.9/site-packages/mindnlp/transformers/models/auto/tokenization_auto.py", line 834, in from_pretrained tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs) File "/usr/local/lib/python3.9/site-packages/mindnlp/transformers/models/auto/tokenization_auto.py", line 665, in get_tokenizer_config resolved_config_file = cached_file( File "/usr/local/lib/python3.9/site-packages/mindnlp/utils/download.py", line 503, in cached_file resolved_file = download( File "/usr/local/lib/python3.9/site-packages/mindnlp/utils/download.py", line 616, in download url = build_download_url(repo_id, filename, revision, repo_type=repo_type, mirror=mirror) File "/usr/local/lib/python3.9/site-packages/mindnlp/utils/download.py", line 901, in build_download_url raise ValueError('The mirror name not support, please use one of the mirror website below: ' ValueError: The mirror name not support, please use one of the mirror website below: ["huggingface", "modelscope", "wisemodel", "gitee", "aifast"] -sh-5.1# ls ``` ### 解决 `nano /root/orange-pi-mindspore/Online/17-DeepSeek-R1-Distill-Qwen-1.5B/deepseek-r1-distill-qwen-1.5b.py` 修改前 ``` tokenizer = AutoTokenizer.from_pretrained("MindSpore-Lab/DeepSeek-R1-Distill-Qwen-1.5B", mirror="modelers", ms_dtype=mi> model = AutoModelForCausalLM.from_pretrained("MindSpore-Lab/DeepSeek-R1-Distill-Qwen-1.5B", mirror="modelers", ms_dtype> ``` 修改后 ``` tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", mirror="huggingface", ms_dtype=m> model = AutoModelForCausalLM.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", mirror="huggingface", ms_dtyp> ``` 完全免费社工库 下山虎社工库 https://t.me/MTTigerSGK #社工库 #免费社工库