Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ conda create -n paddlemix python=3.10 -y
conda activate paddlemix
```
### 3. 安装PaddlePaddle
#### 方法 1: 一键安装(推荐)

#### 方法 1: 一键安装(GPU/CPU推荐)

- CUDA 11.x或12.3
- PaddlePaddle 3.0.0b1
```
Expand All @@ -77,6 +79,30 @@ sh build_paddle_env.sh
#### 方法 2: 手动安装
关于PaddlePaddle安装的详细教程请查看[Installation](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/develop/install/pip/linux-pip.html)。

#### 方法 3:昇腾环境安装

当前 PaddleMIX 支持昇腾 910B 芯片(更多型号还在支持中,如果您有其他型号的相关需求,请提交issue告知我们),昇腾驱动版本为 23.0.3。考虑到环境差异性,我们推荐使用飞桨官方提供的标准镜像完成环境准备。

* 参考如下命令启动容器,ASCEND_RT_VISIBLE_DEVICES 指定可见的 NPU 卡号

```shell
docker run -it --name paddle-npu-dev -v $(pwd):/work \
--privileged --network=host --shm-size=128G -w=/work \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/dcmi:/usr/local/dcmi \
-e ASCEND_RT_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" \
registry.baidubce.com/device/paddle-npu:cann80T13-ubuntu20-$(uname -m)-gcc84-py39 /bin/bash
```

* 在容器内安装飞桨

```shell
# 注意需要先安装飞桨 cpu 版本
python3.9 -m pip install paddlepaddle==3.0.0.dev20240520 -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
python3.9 -m pip install paddle_custom_npu==3.0.0.dev20240719 -i https://www.paddlepaddle.org.cn/packages/nightly/npu/
```


### 4. 安装依赖

Expand Down Expand Up @@ -211,6 +237,8 @@ sh build_env.sh

更多模型能力,可参考[模型能力矩阵](./paddlemix/examples/README.md)

昇腾910B支持的模型列表,可参考[昇腾模型列表](./docs/hardware_support/npu_model_list.md)

## 社区交流

- 微信扫描二维码并填写问卷,即可加入交流群与众多社区开发者以及官方团队深度交流。
Expand Down
30 changes: 28 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ https://github.com/PaddlePaddle/PaddleMIX/assets/29787866/8d32722a-e307-46cb-a8c



## Installation
## Installation
### 1. Clone the PaddleMIX repository
```
git clone https://github.com/PaddlePaddle/PaddleMIX
Expand All @@ -73,7 +73,7 @@ For detailed instructions on installing PaddlePaddle, please refer to [Installat

### 4. Install dependencies

#### Method 1: One-click installation (recommended)
#### Method 1: One-click installation (recommended on GPU / CPU)

Run the following command to automatically install all necessary dependencies:
```
Expand All @@ -88,6 +88,29 @@ Detailed [installation]((https://www.paddlepaddle.org.cn/install/quick?docurl=/d

> If you wish to train and infer using **bf16**, please use a GPU that supports **bf16**, such as the A100.

#### Method 3: For Ascend 910B

PaddleMIX currently supports the Ascend 910B chip (more chip types are still being supported. If you have related needs for other chip types, please submit a question and let us know). Our recommended driver version is 23.0.3. Considering the differences in environments, we recommend using docker image provided by PaddlePaddle to complete the environment preparation.

* Refer to the following command to start the container, ASCEND_RT_VISIBLE_DEVICES specifies the visible NPU card number

```shell
docker run -it --name paddle-npu-dev -v $(pwd):/work \
--privileged --network=host --shm-size=128G -w=/work \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
-v /usr/local/dcmi:/usr/local/dcmi \
-e ASCEND_RT_VISIBLE_DEVICES="0,1,2,3,4,5,6,7" \
registry.baidubce.com/device/paddle-npu:cann80T13-ubuntu20-$(uname -m)-gcc84-py39 /bin/bash
```

* Install PaddlePaddle in the container

```shell
python3.9 -m pip install paddlepaddle==3.0.0.dev20240520 -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
python3.9 -m pip install paddle_custom_npu==3.0.0.dev20240719 -i https://www.paddlepaddle.org.cn/packages/nightly/npu/
```


## Tutorial

Expand Down Expand Up @@ -184,6 +207,9 @@ Detailed [installation]((https://www.paddlepaddle.org.cn/install/quick?docurl=/d
</table>

For more information on additional model capabilities, please refer to the [Model Capability Matrix](./paddlemix/examples/README.md).

For the list of models supported on Ascend 910B, please refer to [Ascend Model List](./docs/hardware_support/npu_model_list_en.md)

## LICENSE

This repository is licensed under the [Apache 2.0 license](LICENSE)
34 changes: 34 additions & 0 deletions docs/hardware_support/npu_model_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# PaddleMIX模型列表(昇腾)

<table align="center">
<tbody>
<tr align="center" valign="center">
<td>
<b>多模态理解</b>
</td>
<td>
<b>多模态生成</b>
</td>
</tr>
<tr valign="top">
<td>
<ul>
</ul>
<li><b>图文预训练</b></li>
<ul>
<li><a href="../../paddlemix/examples/llava">LLaVA-1.6</a></li>
<li><a href="../../paddlemix/examples/internvl2">InternVL2</a></li>
</ul>
</td>
<td>
<ul>
</ul>
<li><b>文生图</b></li>
<ul>
<li><a href="../../ppdiffusers/examples/stable_diffusion">Stable Diffusion</a></li>
<li><a href="../../ppdiffusers/examples/dreambooth/README_sd3.md">Stable Diffusion 3 (SD3)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
34 changes: 34 additions & 0 deletions docs/hardware_support/npu_model_list_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# PaddleMIX model list(Ascend)

<table align="center">
<tbody>
<tr align="center" valign="center">
<td>
<b>Multi-modal Large Language Models</b>
</td>
<td>
<b>Diffusion-based Models</b>
</td>
</tr>
<tr valign="top">
<td>
<ul>
</ul>
<li><b>Image-Text Pre-training</b></li>
<ul>
<li><a href="../../paddlemix/examples/llava">LLaVA-1.6</a></li>
<li><a href="../../paddlemix/examples/internvl2">InternVL2</a></li>
</ul>
</td>
<td>
<ul>
</ul>
<li><b>Text-to-Image</b></li>
<ul>
<li><a href="../../ppdiffusers/examples/stable_diffusion">Stable Diffusion</a></li>
<li><a href="../../ppdiffusers/examples/dreambooth/README_sd3.md">Stable Diffusion 3 (SD3)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>