Views
No views yet
| Usage | Cambricon | |
|---|---|---|
| Basic Image | basic software environment that supports model running | ecosystem@cambricon.com Contact by email,please indicate the unit/contact person/contact information/equipment source/specific requirements |
| Model | model weight and configuration files | ecosystem@cambricon.com Contact by email,please indicate the unit/contact person/contact information/equipment source/specific requirements |
| Metrics | DeepSeek-R1-Distill-Qwen-32B-H100-CUDA | DeepSeek-R1-Distill-Qwen-32B-FlagOS-Cambricon |
|---|---|---|
| GSM8K (EM) | 87.64 | 86.81 |
| MMLU (Acc.) | 79.33 | 79.45 |
| CEVAL | 83.43 | 83.43 |
| AIME 2024 (Pass@1) | 73.33 | 70.00 |
| GPQA-Diamond (Pass@1) | 59.60 | 64.65 |
| MATH-500 (pass@1) | 92.80 | 93.40 |
1#download ckpt
2pip install modelscope
3modelscope download --model deepseek-ai/DeepSeek-R1-Distill-Qwen-32B --local_dir /nfs/DeepSeek-R1-Distill-Qwen-32B
4# build and enter the container
5docker run -e DISPLAY=$DISPLAY --net=host --pid=host --ipc=host \-v /tmp/.X11-unix:/tmp/.X11-unix \--privileged \-it \-v /nfs/DeepSeek-R1-Distill-Qwen-32B:/nfs/DeepSeek-R1-Distill-Qwen-32B \-v /home:/home \-v /mnt/:/mnt/ \-v /data/:/data/ \-v /opt/data/:/opt/data/ \-v /usr/bin/cnmon:/usr/bin/cnmon \--name flagrelease_cambricon \
6zhiyuan_vllm:v0.2 /bin/bash
71
2cd <CONTAINER_CKPT_PATH> #Should be replaced with a custom path
3git clone -b deepseek_release_cambricon https://github.com/FlagOpen/FlagGems.git
4cd FlagGems
5pip install --index-url https://pypi.org/simple ./ --no-deps
6cd ../
71git clone https://github.com/FlagOpen/FlagScale.git
2cd FlagScale
3pip install --index-url https://pypi.org/simple ./ --no-deps
4pip install cryptography -i https://mirrors.aliyun.com/pypi/simple/
5pip install GitPython -i https://pypi.tuna.tsinghua.edu.cn/simple
6git config --global user.name "your_name"
7git config --global user.email "your_email"
8python tools/patch/unpatch.py --device-type cambricon_MLU --commit-id 57637057 --dir build
9cd build/cambricon_MLU/FlagScale/vllm
10pip install -e . -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
11cd vllm_mlu
12pip install -e . -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
13cd ../../1# config the deepseek_r1_distill_qwen_32b yaml
2cd FlagScale/build/cambricon_MLU/FlagScale/examples/qwq_32b/conf
3# config_deepseek_r1_distill_qwen_32b.yaml configuration:
4vim config_deepseek_r1_distill_qwen_32b.yaml
5defaults:
6 - _self_
7 - serve: serve_deepseek_r1_distill_qwen_32b
8experiment:
9 exp_name: deepseek_r1_distill_qwen_32b
10 exp_dir: outputs/${experiment.exp_name}
11 task:
12 type: serve
13 deploy:
14 use_fs_serve: false
15 runner:
16 ssh_port: 22
17 envs:
18 CUDA_DEVICE_MAX_CONNECTIONS: 1
19action: run
20hydra:
21 run:
22 dir: ${experiment.exp_dir}/hydra
23
24# serve_deepseek_r1_distill_qwen_32b.yaml configuration:
25vim serve/serve_deepseek_r1_distill_qwen_32b.yaml
26- serve_id: vllm_model
27 engine: vllm
28 engine_args:
29 model: /share/DeepSeek-R1-Distill-Qwen-32B # should be customized
30 served_model_name: deepseek-r1-distill-qwen-32b-flagos
31 tensor_parallel_size: 8
32 max_model_len: 32768
33 pipeline_parallel_size: 1
34 max_num_seqs: 8 # Even at full 32,768 context usage, 8 concurrent operations won't trigger OOM
35 gpu_memory_utilization: 0.9
36 port: 9010
37 trust_remote_code: true
38 enforce_eager: true
39 enable_chunked_prefill: true1# serve
2cd build/cambricon_MLU/FlagScale/
3pip install .
4flagscale serve deepseek-r1-distill-qwen-32b-flagos
5
6curl http://ip:9010/v1/chat/completions \
7 -H "Content-Type: application/json" \
8 -d '{
9 "model": "deepseek-r1-distill-qwen-32b-flagos",
10 "messages": [
11 {
12 "role": "user",
13 "content": "hello"
14 }
15 ]
16 }'