Skip to content

Commit

Permalink
deploy: 5cb3a99
Browse files Browse the repository at this point in the history
  • Loading branch information
FFFrog committed Sep 19, 2024
0 parents commit 0214c0a
Show file tree
Hide file tree
Showing 238 changed files with 26,241 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 2532dc496ecb9cf839ae3000eed071f7
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/Diffusers/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/Diffusers/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/Diffusers/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/accelerate/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/accelerate/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/accelerate/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/ascend/quick_install.doctree
Binary file not shown.
Binary file added .doctrees/sources/deepspeed/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/deepspeed/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/deepspeed/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/llamafactory/example.doctree
Binary file not shown.
Binary file added .doctrees/sources/llamafactory/faq.doctree
Binary file not shown.
Binary file added .doctrees/sources/llamafactory/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/llamafactory/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/llamafactory/multi_npu.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/sources/lm_evaluation/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/lm_evaluation/install.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/sources/onnxruntime/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/onnxruntime/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/onnxruntime/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/open_clip/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/open_clip/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/open_clip/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/opencv/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/opencv/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/opencv/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/api_doc.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/examples.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/faq.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/pytorch/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/sd_webui/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/sd_webui/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/sd_webui/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/timm/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/timm/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/timm/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/transformers/fine-tune.doctree
Binary file not shown.
Binary file added .doctrees/sources/transformers/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/transformers/inference.doctree
Binary file not shown.
Binary file added .doctrees/sources/transformers/install.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/sources/wenet/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/wenet/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/wenet/quick_start.doctree
Binary file not shown.
Binary file added .doctrees/sources/whisper_cpp/index.doctree
Binary file not shown.
Binary file added .doctrees/sources/whisper_cpp/install.doctree
Binary file not shown.
Binary file added .doctrees/sources/whisper_cpp/quick_start.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/CLIP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/catwearhat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/chat-llamafactory.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/downloadmodel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/mainparameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/moreparameters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/opencv_cannop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/pytorch_wechat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/sft-chat.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/webchat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
267 changes: 267 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
昇腾开源
============

.. -----------------------------------------
.. Page TOC
.. -----------------------------------------
.. toctree::
:maxdepth: 2
:hidden:
:includehidden:
:caption: 开始使用

sources/ascend/quick_install.rst

.. toctree::
:maxdepth: 2
:hidden:
:includehidden:
:caption: 原生支持的AI项目

sources/pytorch/index.rst
sources/llamafactory/index.rst
sources/accelerate/index.rst
sources/transformers/index.rst
sources/deepspeed/index.rst
sources/onnxruntime/index.rst
sources/open_clip/index.rst
sources/timm/index.rst
sources/Diffusers/index.rst
sources/opencv/index.rst
sources/sd_webui/index.rst
sources/lm_evaluation/index.rst
sources/wenet/index.rst
sources/whisper_cpp/index.rst

.. warning::

文档仍在开发中,内容可能存在错误,内容可能会随时更新,请勿将其用于生产环境。

选择您的偏好,并按照 :doc:`快速安装昇腾环境<sources/ascend/quick_install>` 的安装指导进行操作。

安装成功后,请参考各项目的快速开始和样例来开始使用昇腾AI处理器。

.. raw:: html

<div class="container bg-white flex flex-col items-center">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- Card 1 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/llama-factory.png')"></div>
<div>
<h2 class="text-lg font-semibold">LLaMA-Factory</h2>
<p class="text-gray-600 desc">便捷高效的大模型微调工具。V0.7.1版本起支持昇腾。</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/hiyouga/LLaMA-Factory">官方链接</a>
<span class="split">|</span>
<a href="sources/llamafactory/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/llamafactory/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 2 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/pytorch.png')"></div>
<div>
<h2 class="text-lg font-semibold">PyTorch</h2>
<p class="text-gray-600 desc">PyTorch AI框架 2.1版本官方支持昇腾</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://pytorch.org">官方链接</a>
<span class="split">|</span>
<a href="sources/pytorch/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/pytorch/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 3 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/onnxruntime.png')"></div>
<div>
<h2 class="text-lg font-semibold">ONNX Runtime</h2>
<p class="text-gray-600 desc">跨平台、高性能 ML 推理和训练加速器。v1.13.1版本起原生支持昇腾</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/microsoft/onnxruntime">官方链接</a>
<span class="split">|</span>
<a href="sources/onnxruntime/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/onnxruntime/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 4 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/deepspeed.png')"></div>
<div>
<h2 class="text-lg font-semibold">DeepSpeed</h2>
<p class="text-gray-600 desc">深度学习优化库,使得分布式训练和推理变得简单、高效、有效。
V0.10.1版本起支持昇腾。</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/microsoft/DeepSpeed">官方链接</a>
<span class="split">|</span>
<a href="sources/deepspeed/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/deepspeed/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 5 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/opencv.png')"></div>
<div>
<h2 class="text-lg font-semibold">OpenCV</h2>
<p class="text-gray-600 desc">开源计算机视觉库</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/opencv/opencv">官方链接</a>
<span class="split">|</span>
<a href="sources/opencv/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/opencv/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 6 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/sd-webui.png')"></div>
<div>
<h2 class="text-lg font-semibold">Stable Diffusion web UI</h2>
<p class="text-gray-600 desc">Stable diffusion可视化工具链</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui">官方链接</a>
<span class="split">|</span>
<a href="sources/sd_webui/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/sd_webui/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 7 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/huggingface.png')"></div>
<div>
<h2 class="text-lg font-semibold">Transformers</h2>
<p class="text-gray-600 desc">适用于 Pytorch、TensorFlow 和 JAX 先进的机器学习库
v4.32.0起支持昇腾</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://huggingface.co/docs/transformers/index">官方链接</a>
<span class="split">|</span>
<a href="href=sources/transformers/install.html">安装指南</a>
<span class="split">|</span>
<a href="href=sources/transformers/fine-tune.html">快速上手</a>
</div>
</div>
<!-- Card 8 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/diffusers.png')"></div>
<div>
<h2 class="text-lg font-semibold">Diffusers</h2>
<p class="text-gray-600 desc">图像和音频生成等扩散模型工具链</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/huggingface/diffusers">官方链接</a>
<span class="split">|</span>
<a href="sources/Diffusers/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/Diffusers/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 9 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/huggingface.png')"></div>
<div>
<h2 class="text-lg font-semibold">Accelerate</h2>
<p class="text-gray-600 desc">适用于Pytorch的多GPUs训练工具链</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/huggingface/accelerate">官方链接</a>
<span class="split">|</span>
<a href="sources/accelerate/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/accelerate/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 10 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/wenet.png')"></div>
<div>
<h2 class="text-lg font-semibold">WeNet</h2>
<p class="text-gray-600 desc">端到端的语音识别工具包</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/wenet-e2e/wenet">官方链接</a>
<span class="split">|</span>
<a href="sources/wenet/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/wenet/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 11 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/lm-evalution.png')"></div>
<div>
<h2 class="text-lg font-semibold">LM-Evalution-Harness</h2>
<p class="text-gray-600 desc">语言模型评估工具</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/EleutherAI/lm-evaluation-harness">官方链接</a>
<span class="split">|</span>
<a href="sources/lm_evaluation/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/lm_evaluation/quick_start.html">快速上手</a>
</div>
</div>
<!-- Card 12 -->
<div class="box rounded-lg p-4 flex flex-col items-center">
<div class="flex items-center mb-4">
<div class="img w-16 h-16 rounded-md mr-4" style="background-image: url('_static/images/whisper_cpp.png')"></div>
<div>
<h2 class="text-lg font-semibold">Whisper.cpp</h2>
<p class="text-gray-600 desc">Whisper 模型高性能推理语音识别框架</p>
</div>
</div>
<div class="flex-grow"></div>
<div class="flex space-x-4 text-blue-600">
<a href="https://github.com/ggerganov/whisper.cpp">官方链接</a>
<span class="split">|</span>
<a href="sources/whisper_cpp/install.html">安装指南</a>
<span class="split">|</span>
<a href="sources/whisper_cpp/quick_start.html">快速上手</a>
</div>
</div>
</div>
</div>
8 changes: 8 additions & 0 deletions _sources/sources/Diffusers/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Diffusers
===========

.. toctree::
:maxdepth: 2

install.rst
quick_start.rst
52 changes: 52 additions & 0 deletions _sources/sources/Diffusers/install.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
安装指南
==============

本教程面向使用 Diffusers & 昇腾开发者,帮助完成昇腾环境下 Diffusers 的安装。

昇腾环境安装
------------

请根据已有昇腾产品型号及CPU架构等按照 :doc:`快速安装昇腾环境指引 <../ascend/quick_install>` 进行昇腾环境安装,或直接获取对应产品的昇腾环境镜像 `cosdt/cann <https://hub.docker.com/r/cosdt/cann/tags>`_ 。

.. warning::
CANN 最低版本为 8.0.rc1,安装 CANN 时,请同时安装 Kernel 算子包。

Diffusers 安装
------------------

Python 环境创建
------------------

.. code-block:: shell
:linenos:
# 创建名为 diffusers 的 python 3.10 的虚拟环境
conda create -y -n diffusers python=3.10
# 激活虚拟环境
conda activate diffusers
pip 安装
------------------

通过以下指令安装 Diffusers 及 torch-npu:

.. code-block:: shell
:linenos:
pip install diffusers torch==2.2.0 torch-npu==2.2.0 torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
安装校验
------------------

执行以下代码,若无任何报错,仅打印模型下载过程,即说明安装成功:

.. code-block:: python
:linenos:
from diffusers import DiffusionPipeline
import torch
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
pipeline.to("npu")
Loading

0 comments on commit 0214c0a

Please sign in to comment.