URL: https://github.com/sophgo/LLM-TPU/tree/main/models/language_model/python_demo 一、环境准备 # git clone https://github.com/sophgo/LLM-TPU.git # pip3 install dfss transformers==4.45.1 pybind11[global] # cd LLM-TPU/models/language_model/python_demo # mkdir build # cd build && cmake .. && make && cp *cpython* .. && cd .. 二、模型下载与运行 # python3 -m dfss --url=open@sophgo.com:/ext_model_information/LLM/LLM-TPU/deepseek-r1-distill-qwen-1-5b.zip # unzip deepseek-r1-distill-qwen-1-5b.zip # python3 pipeline.py --model_path ./deepseek-r1-distill-qwen-1-5b/qwen2_w4bf16_seq8192_20250131_213156.bmodel --devid 0 --dir_path ./deepseek-r1-distill-qwen-1-5b/ # python3 -m dfss --url=open@sophgo.com:/ext_model_information/LLM/LLM-TPU/deepseek-r1-distill-qwen-7b.zip # unzip deepseek-r1-distill-qwen-7b.zip # python3 pipeline.py --model_path ./deepseek-r1-distill-qwen-7b/qwen2_w4bf16_seq2048_20250131_203910.bmodel --devid 0 --dir_path ./deepseek-r1-distill-qwen-7b/