4242
4343### <a href =#多硬件训推一体 > 🔧 多硬件训推一体 </a >
4444
45- 支持英伟达 GPU、昆仑 XPU、昇腾 NPU、燧原 GCU 和海光 DCU 等多个硬件的大模型训练和推理,套件接口支持硬件快速切换,大幅降低硬件切换研发成本。
45+ 支持英伟达 GPU、昆仑 XPU、昇腾 NPU、燧原 GCU 和海光 DCU 等多个硬件的大模型和自然语言理解模型训练和推理,套件接口支持硬件快速切换,大幅降低硬件切换研发成本。
46+ 当前支持的自然语言理解模型:[ 多硬件自然语言理解模型列表] ( ./docs/model_zoo/model_list_multy_device.md )
4647
4748### <a href =#高效易用的预训练 > 🚀 高效易用的预训练 </a >
4849
@@ -127,6 +128,18 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩
127128| Yuan2 | ✅ | ✅ | ✅ | 🚧 | 🚧 | 🚧 | 🚧 | ✅ |
128129------------------------------------------------------------------------------------------
129130
131+ * [ 大模型推理] ( ./llm/docs/predict/inference.md ) 已支持 LLaMA 系列、Qwen 系列、Mistral 系列、ChatGLM 系列、Bloom 系列和 Baichuan 系列,支持 Weight Only INT8及 INT4推理,支持 WAC(权重、激活、Cache KV)进行 INT8、FP8量化的推理,【LLM】模型推理支持列表如下:
132+
133+ | 模型名称/量化类型支持 | FP16/BF16 | WINT8 | WINT4 | INT8-A8W8 | FP8-A8W8 | INT8-A8W8C8 |
134+ | :--------------------------------------------:| :---------:| :-----:| :-----:| :---------:| :--------:| :-----------:|
135+ | [ LLaMA] ( ./llm/docs/predict/llama.md ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
136+ | [ Qwen] ( ./llm/docs/predict/qwen.md ) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
137+ | [ Qwen-Moe] ( ./llm/docs/predict/qwen.md ) | ✅ | ✅ | ✅ | 🚧 | 🚧 | 🚧 |
138+ | [ Mixtral] ( ./llm/docs/predict/mixtral.md ) | ✅ | ✅ | ✅ | 🚧 | 🚧 | 🚧 |
139+ | ChatGLM | ✅ | ✅ | ✅ | 🚧 | 🚧 | 🚧 |
140+ | Bloom | ✅ | ✅ | ✅ | 🚧 | 🚧 | 🚧 |
141+ | BaiChuan | ✅ | ✅ | ✅ | ✅ | ✅ | 🚧 |
142+
130143## 安装
131144
132145### 环境依赖
@@ -137,7 +150,7 @@ Unified Checkpoint 大模型存储格式在模型参数分布上支持动态扩
137150### pip 安装
138151
139152``` shell
140- pip install --upgrade paddlenlp==3.0.0b0
153+ pip install --upgrade paddlenlp==3.0.0b1
141154```
142155
143156或者可通过以下命令安装最新 develop 分支代码:
@@ -162,13 +175,14 @@ PaddleNLP 提供了方便易用的 Auto API,能够快速的加载模型和 Tok
162175>> > model = AutoModelForCausalLM.from_pretrained(" Qwen/Qwen2-0.5B" , dtype = " float16" )
163176>> > input_features = tokenizer(" 你好!请自我介绍一下。" , return_tensors = " pd" )
164177>> > outputs = model.generate(** input_features, max_length = 128 )
165- >> > print (tokenizer.batch_decode(outputs[0 ]))
178+ >> > print (tokenizer.batch_decode(outputs[0 ], skip_special_tokens = True ))
166179[' 我是一个AI语言模型,我可以回答各种问题,包括但不限于:天气、新闻、历史、文化、科学、教育、娱乐等。请问您有什么需要了解的吗?' ]
167180```
168181
169182### 大模型预训练
170183
171184``` shell
185+ git clone https://github.com/PaddlePaddle/PaddleNLP.git && cd PaddleNLP # 如已clone或下载PaddleNLP可跳过
172186mkdir -p llm/data && cd llm/data
173187wget https://bj.bcebos.com/paddlenlp/models/transformers/llama/data/llama_openwebtext_100k.bin
174188wget https://bj.bcebos.com/paddlenlp/models/transformers/llama/data/llama_openwebtext_100k.idx
@@ -179,6 +193,7 @@ python -u -m paddle.distributed.launch --gpus "0,1,2,3,4,5,6,7" run_pretrain.py
179193### 大模型 SFT 精调
180194
181195``` shell
196+ git clone https://github.com/PaddlePaddle/PaddleNLP.git && cd PaddleNLP # 如已clone或下载PaddleNLP可跳过
182197mkdir -p llm/data && cd llm/data
183198wget https://bj.bcebos.com/paddlenlp/datasets/examples/AdvertiseGen.tar.gz && tar -zxvf AdvertiseGen.tar.gz
184199cd .. # change folder to PaddleNLP/llm
0 commit comments