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 | MiniCPM-o 2.6-A100-CUDA | MiniCPM-o 2.6-FlagOS-Cambricon |
|---|---|---|
| mmmu_val | 48.33 | 48.33 |
| math_vision_test | 22.57 | 23.12 |
| ocrbench_test | 85.4 | 85 |
| blink_val | 54.87 | 55.23 |
| mmvet_v2 | 59.07 | 57.35 |
| mmmu_pro_vision_test | 24.37 | 23.75 |
| mmmu_pro_standard_test | 30.75 | 30.29 |
| cmmmu_val | 39.11 | 38.56 |
| cii_bench_test | 50.98 | 49.67 |
1#download ckpt
2pip install modelscope
3modelscope download --model AI-ModelScope/MiniCPM-o-2_6 --local_dir /nfs/MiniCPM-o-2_6
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 /share/project:/share/project \-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/bash1cd <CONTAINER_CKPT_PATH> #Should be replaced with a custom path
2git clone -b deepseek_release_cambricon https://github.com/FlagOpen/FlagGems.git
3cd FlagGems
4pip install --index-url https://pypi.org/simple ./ --no-deps
5cd ../1git 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 mini_cpm_o26 yaml
2cd FlagScale/build/cambricon_MLU/FlagScale/examples/mini_cpm_o26/conf
3# config_mini_cpm_o26.yaml configuration:
4vim config_mini_cpm_o26.yaml
5defaults:
6 - _self_
7 - serve: serve_mini_cpm_o26
8
9experiment:
10 exp_name: mini_cpm_o26
11 exp_dir: outputs/${experiment.exp_name}
12 task:
13 type: serve
14 backend: vllm
15 entrypoint: null
16 runner:
17 hostfile: null
18action: run
19hydra:
20 run:
21 dir: ${experiment.exp_dir}/hydra
22
23# serve_mini_cpm_o26.yaml configuration:
24vim serve/serve_mini_cpm_o26.yaml
25model_args:
26 vllm_model:
27 model-tag: /nfs/MiniCPM-o-2_6 # path of weight of MiniCPM-o-2_6
28 served-model-name: minicpmo26-cambricon-flagos
29 tensor-parallel-size: 1
30 gpu-memory-utilization: 0.9
31 port: 9010
32 limit-mm-per-prompt: image=18
33 action-args:
34 - trust-remote-code
35 - enable-chunked-prefill
36deploy:
37 command_line_mode: true
38 models:
39 vllm_model:
40 num_gpus: 11# serve
2cd build/cambricon_MLU/FlagScale/
3pip install .
4flagscale serve mini_cpm_o26
5
6curl http://ip:9010/v1/chat/completions \
7 -H "Content-Type: application/json" \
8 -d '{
9 "model": "minicpmo26-cambricon-flagos",
10 "messages": [
11 {
12 "role": "user",
13 "content": "hello"
14 }
15 ]
16 }'