README.md 2.92 KB
Newer Older
raojy's avatar
raojy committed
1
# LLaDA2.0-Uni
raojy's avatar
raojy committed
2
3
4
5
6
7
8
## 论文
[LLaDA2.0-Uni](https://arxiv.org/abs/2604.20796)

## 模型简介
由 Inclusion AI 推出的160 亿参数 MoE 混合专家统一扩散大语言模型,基于掩码词预测范式打通多模态理解与生成全能力,依托 SigLIP-VQ 视觉分词器实现高效视觉编码,搭配蒸馏扩散解码器仅需 8 步即可完成高清图像生成;支持文生图、图文理解、指令式图像编辑、带思维推理生成等功能,还搭载 SPRINT 推理加速方案大幅提升运行速度,开源协议为 Apache2.0,仅需加载完整模型权重即可实现多模态全场景任务,是兼顾理解与创作的全能型多模态大模型。

<div align=center>
raojy's avatar
raojy committed
9
    <img src="./doc/333.png"/>
raojy's avatar
raojy committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</div>

## 环境依赖
| 软件 |                    版本                     |
| :------: |:-----------------------------------------:|
| DTK |                   26.04                   |
| Python |                  3.10.12                  |
| Transformers |            5.3.0               |
| Torch |   2.9.0+das.opt1.dtk2604.2605091832.g21362a   |


推荐使用镜像: harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm018-ubuntu22.04-dtk26.04-qwen3.6-20260423

```bash
docker run -it \
    --shm-size 256g \
    --network=host \
    --name LLaDA2.0 \
    --privileged \
    --device=/dev/kfd \
    --device=/dev/dri \
    --device=/dev/mkfd \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    -u root \
    -v /opt/hyhal/:/opt/hyhal/:ro \
    -v /path/your_code_data/:/path/your_code_data/ \
    harbor.sourcefind.cn:5443/dcu/admin/base/custom:vllm018-ubuntu22.04-dtk26.04-qwen3.6-20260423 bash
```
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。

关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.sourcefind.cn/tool/)开发者社区下载安装。
raojy's avatar
raojy committed
43
```
raojy's avatar
raojy committed
44
pip install -r requirements.txt
raojy's avatar
raojy committed
45
```
raojy's avatar
raojy committed
46
47
48
## 预训练权重
|  模型名称  | 权重大小 | 数据类型 |支持的DCU型号  | 最低卡数需求 |         下载地址          |
|:------:|:----:|:----:|:----------:|:------:|:---------------------:|
raojy's avatar
raojy committed
49
| LLaDA2.0-Uni	 | 16B | BF16 | BW1000 |   2   | [HuggingFace](https://huggingface.co/inclusionAI/LLaDA2.0-Uni) |
raojy's avatar
raojy committed
50
51
52
53
54
55
56
57
58
59
60
61

## 数据集
暂无

## 训练
暂无

## 推理
### Transformers
#### 单机推理
##### 文生图
```
raojy's avatar
raojy committed
62
cd LLaDA2.0
raojy's avatar
raojy committed
63
64
65
66
67
68
69
70
python run_Transformers_t2i.py
```
##### 文生图((思考模式)
```
python run_Transformers_t2i.py
```
##### 图像理解
```
raojy's avatar
raojy committed
71
python run_Transformers_imgunderstand.py
raojy's avatar
raojy committed
72
73
74
75
76
77
78
79
80
81
82
83
```

## 效果展示
<div align=center>
    <img src="./doc/output_thinking.png"/>
</div>
<div align=center>
    <img src="./doc/output11.png"/>
</div>
<div align=center>
    <img src="./doc/33.png"/>
</div>
raojy's avatar
raojy committed
84

raojy's avatar
raojy committed
85
86
87
88
89
90
91
92
### 精度
DCU与GPU精度一致,推理框架:pytorch。

## 源码仓库及问题反馈
- https://developer.sourcefind.cn/codes/modelzoo/llada2.0-uni

## 参考资料
- https://github.com/inclusionAI/LLaDA2.0-Uni
raojy's avatar
raojy committed
93