Commit 590059ff authored by chenych's avatar chenych
Browse files

Fix bugs

parent 715e39c4
...@@ -76,7 +76,12 @@ cd /your_code_path/deepseek-v3.2-exp_pytorch ...@@ -76,7 +76,12 @@ cd /your_code_path/deepseek-v3.2-exp_pytorch
## 推理 ## 推理
样例模型:[DeepSeek-V3.2-Exp](https://huggingface.co/deepseek-ai/DeepSeek-V3.2-Exp) 样例模型:[DeepSeek-V3.2-Exp](https://huggingface.co/deepseek-ai/DeepSeek-V3.2-Exp)
首先将模型转换成bf16格式 首先将模型转换成bf16格式,转换完成后,将原模型中的 `config.json`, `generation_config.json`, `tokenizer_config.json`, `tokenizer.json`拷贝到`/path/to/DeepSeek-V3.2-Exp-bf16`中,并删掉`config.json`中的`quantization_config`字段,如下图所示。
<div align=center>
<img src="./doc/config.png"/>
</div>
```bash ```bash
# fp8转bf16 # fp8转bf16
python inference/fp8_cast_bf16.py --input-fp8-hf-path /path/to/DeepSeek-V3.2-Exp --output-bf16-hf-path /path/to/DeepSeek-V3.2-Exp-bf16 python inference/fp8_cast_bf16.py --input-fp8-hf-path /path/to/DeepSeek-V3.2-Exp --output-bf16-hf-path /path/to/DeepSeek-V3.2-Exp-bf16
...@@ -143,17 +148,16 @@ ray start --address='x.x.x.x:6379' --num-gpus=8 --num-cpus=32 ...@@ -143,17 +148,16 @@ ray start --address='x.x.x.x:6379' --num-gpus=8 --num-cpus=32
```bash ```bash
vllm serve deepseek-v3.2/DeepSeek-V3.2-Exp-bf16 \ vllm serve deepseek-v3.2/DeepSeek-V3.2-Exp-bf16 \
--enforce-eager \
--trust-remote-code \ --trust-remote-code \
--distributed-executor-backend ray \ --distributed-executor-backend ray \
--dtype bfloat16 \ --dtype bfloat16 \
--tensor-parallel-size 32 \ --tensor-parallel-size 32 \
--max-model-len 32768 \ --max-model-len 1024 \
--max-num-seqs 128 \ --max-num-seqs 128 \
--no-enable-chunked-prefill \ --no-enable-chunked-prefill \
--no-enable-prefix-caching \ --no-enable-prefix-caching \
--gpu-memory-utilization 0.85 \ --gpu-memory-utilization 0.85 \
--host 127.0.0.1 \ --host 12.12.12.11 \
--port 8001 \ --port 8001 \
--kv-cache-dtype bfloat16 --kv-cache-dtype bfloat16
``` ```
...@@ -178,6 +182,9 @@ curl http://127.0.0.1:8001/v1/chat/completions \ ...@@ -178,6 +182,9 @@ curl http://127.0.0.1:8001/v1/chat/completions \
``` ```
## result ## result
<div align=center>
<img src="./doc/results_dcu.jpg"/>
</div>
### 精度 ### 精度
DCU与GPU精度一致,推理框架:vllm。 DCU与GPU精度一致,推理框架:vllm。
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment