File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 213213
214214 2. 使用DeepSpeed多卡并行训练
215215-------------------------------
216- 以下代码使用了cifar10数据集,使用DeepSpeed训练模型在多张NPU卡上进行模型训练(来自 `DeepSpeed Examples <https://github.com/microsoft/DeepSpeedExamples/blob/master/training/cifar/cifar10_deepspeed.py >`_),自DeepSpeed v0.12.6之后,代码无需任何修改,即可自动检测NPU并进行训练 。
216+ 以下代码使用了cifar10数据集,使用DeepSpeed训练模型在多张NPU卡上进行模型训练(来自 `DeepSpeed Examples <https://github.com/microsoft/DeepSpeedExamples/blob/master/training/cifar/cifar10_deepspeed.py >`_),使用最新 Release 的 DeepSpeed 则代码无需修改,即可自动检测NPU并进行 。
217217
218218.. rli :: https://raw.githubusercontent.com/microsoft/DeepSpeedExamples/master/training/cifar/cifar10_deepspeed.py
219219 :language: python
220220 :linenos:
221221
222222
223- 3. 使用Transforms进行模型微调
223+ 3. 使用Transformers进行模型微调
224224---------------------------------
225- 以下代码使用了Transforms对LLM进行微调 (来自 `transforms examples <https://github.com/huggingface/transformers/blob/main/examples/pytorch/language-modeling/run_clm.py >`_),自transforms xxx版本以及accelerator 0.21.0版本以后,代码无需任何修改 ,即可自动检测NPU并进行。
225+ 以下代码使用了Transformers对LLM进行微调 (来自 `transformers examples <https://github.com/huggingface/transformers/blob/main/examples/pytorch/language-modeling/run_clm.py >`_),使用最新 Release 的 Transformers 和 Accelerator 则代码无需修改 ,即可自动检测NPU并进行。
226226
227227.. rli :: https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/language-modeling/run_clm.py
228228 :language: python
244244
245245 4. 使用Diffusers进行模型微调
246246---------------------------------
247- 以下代码使用了Diffusers对文生图模型进行微调(来自 `diffusers examples <https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py >`_),自diffusers v0.27.0版本以后,代码无需任何修改 ,即可自动检测NPU并进行。
247+ 以下代码使用了Diffusers对文生图模型进行微调(来自 `diffusers examples <https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py >`_),使用最新 Release 的 Diffusers 则代码无需修改 ,即可自动检测NPU并进行。
248248
249249
250250.. rli :: https://raw.githubusercontent.com/huggingface/diffusers/main/examples/text_to_image/train_text_to_image.py
270270 --learning_rate=1e-05 \
271271 --max_grad_norm=1 \
272272 --lr_scheduler=" constant" --lr_warmup_steps=0 \
273- --output_dir=" sd-pokemon-model"
273+ --output_dir=" sd-pokemon-model"
You can’t perform that action at this time.
0 commit comments