Skip to content

Commit 3b9d6c6

Browse files
authored
[Iiluvatar] fix ci error and update readme (#7453)
1 parent a729e0f commit 3b9d6c6

File tree

4 files changed

+35
-11
lines changed

4 files changed

+35
-11
lines changed

docs/get_started/installation/iluvatar_gpu.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,24 @@ Note: Because the 4.3.8 SDK in the image is incompatible with KMD, paddle cannot
3434
### 3.2 Install paddle
3535

3636
```bash
37-
pip3 install paddlepaddle-iluvatar==3.4.0.dev20260326 -i https://www.paddlepaddle.org.cn/packages/nightly/ixuca/
37+
pip3 install paddlepaddle-iluvatar==3.4.0.dev20260326 -i https://www.paddlepaddle.org.cn/packages/nightly/ixuca/ --extra-index-url https://mirrors.aliyun.com/pypi/simple/
3838
```
3939

4040
### 3.3 Install or build FastDeploy
41+
42+
You can install FastDeploy in either of the following ways:
43+
44+
- pip install
4145
```bash
4246
pip3 install fastdeploy_iluvatar_gpu==2.5.0.dev0 -i https://www.paddlepaddle.org.cn/packages/stable/ixuca/ --extra-index-url https://mirrors.aliyun.com/pypi/simple/
4347
```
48+
49+
- Build from source
4450
You can build FastDeploy from source if you need the ```latest version```.
4551
```bash
46-
git clone https://github.com/PaddlePaddle/FastDeploy
52+
git clone --recursive https://github.com/PaddlePaddle/FastDeploy.git
4753
cd FastDeploy
54+
pip3 install -r requirements_iluvatar.txt -i https://mirrors.aliyun.com/pypi/simple/
4855
bash build.sh
4956
```
5057

@@ -451,9 +458,9 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
451458
### 4.3 PaddleOCR-VL series
452459
#### 4.3.1 PaddleOCR-VL-0.9B
453460

454-
- (Optional) Install paddleocr
461+
- (Optional) Build and install paddleocr from source
455462

456-
To install the latest `paddleocr`, you can compile it from source. The image contains a compilation and installation based on source code `39128c2c7fd40be44d8f33498cabd4ec10f1bfcd`.
463+
To install the latest `paddleocr`, you can compile it from source. The version in the image is `3.3.2`.
457464

458465
```bash
459466
git clone -b main https://github.com/PaddlePaddle/PaddleOCR.git
@@ -515,7 +522,7 @@ import os
515522
from paddleocr import PaddleOCRVL
516523

517524
input_path = "./images"
518-
pipeline = PaddleOCRVL(vl_rec_backend="fastdeploy-server", vl_rec_server_url="http://127.0.0.1:8180/v1")
525+
pipeline = PaddleOCRVL(vl_rec_backend="fastdeploy-server", vl_rec_server_url="http://127.0.0.1:8180/v1", device="iluvatar_gpu")
519526
file_list = os.listdir(input_path)
520527
for file_name in file_list:
521528
file_path = os.path.join(input_path, file_name)

docs/zh/get_started/installation/iluvatar_gpu.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,24 @@ docker exec -it paddle_infer bash
3434
### 3.2 安装paddle
3535

3636
```bash
37-
pip3 install paddlepaddle-iluvatar==3.4.0.dev20260326 -i https://www.paddlepaddle.org.cn/packages/nightly/ixuca/
37+
pip3 install paddlepaddle-iluvatar==3.4.0.dev20260326 -i https://www.paddlepaddle.org.cn/packages/nightly/ixuca/ --extra-index-url https://mirrors.aliyun.com/pypi/simple/
3838
```
3939

4040
### 3.3 安装fastdeploy
41+
42+
以下两种方式安装均可以:
43+
44+
- pip安装
4145
```bash
4246
pip3 install fastdeploy_iluvatar_gpu==2.5.0.dev0 -i https://www.paddlepaddle.org.cn/packages/stable/ixuca/ --extra-index-url https://mirrors.aliyun.com/pypi/simple/
4347
```
44-
可以按如下步骤编译FastDeploy,,得到```最新版本```
48+
49+
- 源码编译
50+
可以按如下步骤编译FastDeploy得到```最新版本```
4551
```bash
46-
git clone https://github.com/PaddlePaddle/FastDeploy
52+
git clone --recursive https://github.com/PaddlePaddle/FastDeploy.git
4753
cd FastDeploy
54+
pip3 install -r requirements_iluvatar.txt -i https://mirrors.aliyun.com/pypi/simple/
4855
bash build.sh
4956
```
5057

@@ -451,9 +458,9 @@ curl -X POST "http://0.0.0.0:8180/v1/chat/completions" \
451458
### 4.3 PaddleOCR-VL系列
452459
#### 4.3.1 PaddleOCR-VL-0.9B
453460
454-
- (可选) 安装 paddleocr
461+
- (可选) 源码编译安装 paddleocr
455462
456-
如果想要安装最新的`paddleocr`,可以源码编译。镜像里是基于`39128c2c7fd40be44d8f33498cabd4ec10f1bfcd`源码编译安装的
463+
如果想要安装最新的`paddleocr`,可以源码编译。镜像里的版本是`3.3.2`
457464
458465
```bash
459466
git clone -b main https://github.com/PaddlePaddle/PaddleOCR.git
@@ -512,7 +519,7 @@ import os
512519
from paddleocr import PaddleOCRVL
513520
514521
input_path = "./images"
515-
pipeline = PaddleOCRVL(vl_rec_backend="fastdeploy-server", vl_rec_server_url="http://127.0.0.1:8180/v1")
522+
pipeline = PaddleOCRVL(vl_rec_backend="fastdeploy-server", vl_rec_server_url="http://127.0.0.1:8180/v1", device="iluvatar_gpu")
516523
file_list = os.listdir(input_path)
517524
for file_name in file_list:
518525
file_path = os.path.join(input_path, file_name)

fastdeploy/model_executor/layers/backends/iluvatar/moe/fuse_moe_cutlass_iluvatar_backend.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,18 @@ def apply_tp(
124124
x: paddle.Tensor,
125125
gate: nn.Layer,
126126
topk_ids_hookfunc: Callable = None,
127+
fc1_latent_proj: nn.Layer = None,
128+
fc2_latent_proj: nn.Layer = None,
127129
) -> paddle.Tensor:
128130
"""
129131
Paddle Cutlass compute Fused MoE.
130132
"""
131133
gate_out = gate(x)
132134
gate_out = gate_out.cast("float32")
135+
136+
if fc1_latent_proj is not None:
137+
x = fc1_latent_proj(x)
138+
133139
if layer.topk_method == "noaux_tc":
134140
gate_out, topk_weights, topk_idx = get_moe_scores(
135141
gate_out,
@@ -206,6 +212,9 @@ def apply_tp(
206212
routed_scaling_factor=1.0,
207213
)
208214

215+
if fc2_latent_proj is not None:
216+
fused_moe_out = fc2_latent_proj(fused_moe_out)
217+
209218
return fused_moe_out
210219

211220

requirements_iluvatar.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ msgspec
4343
safetensors>=0.7.0
4444
py-cpuinfo
4545
transformers>=4.55.1,<5.0.0
46+
paddleocr[doc-parser]==3.3.2

0 commit comments

Comments
 (0)