diff --git a/README.md b/README.md index e70a56e..3b2ff82 100644 --- a/README.md +++ b/README.md @@ -236,12 +236,37 @@ pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple ### 2.下载模型 -到项目根目录 +到项目根目录: + +```bash +cd minimind +``` + +方法一:使用 Git + Git LFS(需要预装 [Git LFS](https://git-lfs.com/)) ```bash git clone https://huggingface.co/jingyaogong/MiniMind2 # or https://www.modelscope.cn/models/gongjy/MiniMind2 ``` +方法二:使用 hf CLI + +```bash +hf download jingyaogong/MiniMind2 --local-dir ./MiniMind2 +``` + +方法三:使用 hf CLI + 更换下载源(大陆推荐) + +```bash +export HF_ENDPOINT=https://hf-mirror.com +hf download jingyaogong/MiniMind2 --local-dir ./MiniMind2 +``` + +方法四:使用 modelscope CLI(大陆推荐) + +```bash +modelscope download --model gongjy/MiniMind2 --local_dir ./MiniMind2 +``` + ### (可选)命令行问答 ```bash @@ -1911,4 +1936,3 @@ If you find MiniMind helpful in your research or work, please cite: This repository is licensed under the [Apache-2.0 License](LICENSE). - diff --git a/README_en.md b/README_en.md index f8ea2a2..2194baf 100644 --- a/README_en.md +++ b/README_en.md @@ -243,10 +243,35 @@ pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple Go to the project root directory +```bash +cd minimind +``` + +Method 1: Using Git + Git LFS (Requires pre-installed [Git LFS](https://git-lfs.com/)) + ```bash git clone https://huggingface.co/jingyaogong/MiniMind2 # or https://www.modelscope.cn/models/gongjy/MiniMind2 ``` +Method 2: Using hf CLI + +```bash +hf download jingyaogong/MiniMind2 --local-dir ./MiniMind2 +``` + +Method 3: Using hf CLI + Changing download source (Recommended in Mainland China) + +```bash +export HF_ENDPOINT=https://hf-mirror.com +hf download jingyaogong/MiniMind2 --local-dir ./MiniMind2 +``` + +Method 4: Using modelscope CLI (Recommended in Mainland China) + +```bash +modelscope download --model gongjy/MiniMind2 --local_dir ./MiniMind2 +``` + ### (Optional) Command Line Q&A ```bash diff --git a/requirements.txt b/requirements.txt index 4688970..032c3bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,12 @@ datasets==3.6.0 datasketch==1.6.4 Flask==3.0.3 Flask_Cors==4.0.0 +huggingface-hub==0.36.0 jieba==0.42.1 jsonlines==4.0.0 marshmallow==3.22.0 matplotlib==3.10.0 +modelscope==1.31.0 ngrok==1.4.0 nltk==3.8 numpy==1.26.4