wget https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run
sudo sh cuda_12.6.0_560.28.03_linux.run

在这里插入图片描述

# pip -V
pip 24.3.1
# pip3 -V
pip 24.3.1

设置pip镜像源

# pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
Writing to /root/.config/pip/pip.conf
pip install modelscope

国内镜像源安装

pip install modelscope -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install modelscope -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn
mkdir modelscope
# modelscope --help
usage: modelscope <command> [<args>]

positional arguments:
  {download,upload,clear-cache,plugin,pipeline,modelcard,model,server,login,llamafile}
                        modelscope commands helpers

options:
  -h, --help            show this help message and exit
  --token TOKEN         Specify ModelScope SDK token.
mkdir hub

下载 DeepSeek-R1-UD-Q2_K_XL 量化版本

screen -S mode
modelscope download unsloth/DeepSeek-R1-GGUF --include "DeepSeek-R1-UD-Q2_K_XL/*" --local_dir './hub'

在这里插入图片描述

# curl -LsSf https://astral.sh/uv/install.sh | sh
downloading uv 0.6.3 x86_64-unknown-linux-gnu
no checksums to verify
installing to /root/.local/bin
  uv
  uvx
everything's installed!

To add $HOME/.local/bin to your PATH, either restart your shell or run:

    source $HOME/.local/bin/env (sh, bash, zsh)
    source $HOME/.local/bin/env.fish (fish)
WARNING: The following commands are shadowed by other commands in your PATH: uv uvx

# source $HOME/.local/bin/env
# which uv
/root/.local/bin/uv
# which uvx
/root/.local/bin/uvx
git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git checkout 94ab2de
git rev-parse --short HEAD # 应显示 94ab2de

# uv venv ./venv --python 3.11 --python-preference=only-managed
INFO Fetching requested Python...
Downloading cpython-3.11.11-linux-x86_64-gnu (20.5MiB)
 Downloaded cpython-3.11.11-linux-x86_64-gnu
Using CPython 3.11.11
Creating virtual environment at: ./venv
Activate with: source venv/bin/activate
apt-get install build-essential cmake
source venv/bin/activate
uv pip install -r requirements-local_chat.txt
uv pip install setuptools wheel packaging

参考

  1. 魔搭 ModelScope 模型下载
  2. ktransformers 上的 DeepSeek-R1 671B
  3. 只想下载DeepSeek-R1-Q4_K_M这个量化版本,下载命令是怎样的?
Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐