Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Jianliang Shen <[email protected]>
  • Loading branch information
Jianliang-Shen committed Jun 30, 2024
1 parent 558441e commit 238be2e
Show file tree
Hide file tree
Showing 5 changed files with 542 additions and 515 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: AGI Startup
title: GPU Computing Startup
date: 2024-06-24 23:46:14
index_img: /img/post_pics/ai/AGI.jpeg
tags:
Expand All @@ -23,6 +23,7 @@ categories:
- [Pytorch](#pytorch)
- [Cuda](#cuda)
- [Jetson 嵌入式AI](#jetson-嵌入式ai)
- [GPU driver](#gpu-driver)
- [Github 资源](#github-资源)
- [PyTorch 知识点整理](#pytorch-知识点整理)
- [安装 Pytorch 1.6 环境(CPU版本)](#安装-pytorch-16-环境cpu版本)
Expand All @@ -44,8 +45,8 @@ categories:
| [Pytorch 官方文档教程仓库](https://github.com/pytorch/tutorials) | PyTorch tutorials。有点占地方,里面和文档内容对应,有直接可运行的脚本 |
| [Pytorch 安装指引](https://pytorch.org/get-started/locally/)| 安装CPU/CUDA版本 |
| [Pytorch 官方文档翻译版](https://github.com/apachecn/pytorch-doc-zh)| Pytorch 中文文档,缺点,广告太多 |
| [Pytorch Examples](https://github.com/pytorch/examples)| A set of examples around pytorch in Vision, Text, Reinforcement Learning, etc. |
| [Pytorch 源码仓库](https://github.com/pytorch/pytorch)| Tensors and Dynamic neural networks in Python with strong GPU acceleration |
| [Pytorch Examples](https://github.com/pytorch/examples)| 围绕 pytorch 的视觉、文本、强化学习等方面的一组示例。 |
| [Pytorch 源码仓库](https://github.com/pytorch/pytorch)| 具有强大 GPU 加速的 Python 张量和动态神经网络。 |

### Cuda

Expand All @@ -54,9 +55,15 @@ categories:
[CUDA Samples](https://github.com/NVIDIA/cuda-samples)

### Jetson 嵌入式AI

[NVIDIA Jetson-projects](https://developer.nvidia.com/embedded/community/jetson-projects)
[Yahboom官方教程 提取码lguu](https://www.yahboom.com/study/Jetson-Orin-NANO)

### GPU driver

[Nvidia KMD driver](https://github.com/NVIDIA/open-gpu-kernel-modules)
[AMD KMD driver](https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/amd/amdgpu)

### Github 资源

<details>
Expand All @@ -66,7 +73,7 @@ categories:
| --------------------------------------- | ------------------ |
| **1. AI/AGI/AIoT** | |
| [**HuggingFace/Transformers<br />★★★★★**](https://github.com/huggingface/transformers) | 著名论文[Attention Is All You Need](https://arxiv.org/abs/1706.03762) 提出的 Transformers 提供数千个预训练模型,用于执行不同模态(例如文本、视觉和音频)的任务。这些模型可应用于:<br />1. 📝 文本,用于 100 多种语言的文本分类、信息提取、问答、摘要、翻译和文本生成等任务。<br />2. 🖼️ 图像,用于图像分类、对象检测和分割等任务。<br />3. 🗣️ 音频,用于语音识别和音频分类等任务。<br />Transformers 模型还可以执行多种模态组合的任务,例如表格问答、光学字符识别、从扫描文档中提取信息、视频分类和视觉问答。 |
| [**Karpathy/llm.c<br />★★★★★**](https://github.com/karpathy/llm.c)| 简单、纯 C/CUDA 的 LLM,无需 245MB 的 PyTorch 或 107MB 的 cPython。当前重点是预训练,特别是重现 GPT-2 和 GPT-3 迷你剧,以及 train_gpt2.py 中的并行 PyTorch 参考实现。|
| [**Karpathy/llm.c<br />★★★★★**](https://github.com/karpathy/llm.c)| 简单、纯 C/CUDA 的 LLM,无需 245MB 的 PyTorch 或 107MB 的 cPython。当前重点是预训练,特别是重现 GPT-2 和 GPT-3 迷你剧,以及 train_gpt2.py 中的并行 PyTorch 参考实现。测试见:[llm.c](http://jianliang-shen.cn/2024/04/28/llm.c/) |
| [**Google/Vision Transformer<br />★★★★★**](https://github.com/google-research/vision_transformer) |在这个存储库中,我们发布了论文中的模型<br />一张图片胜过 16x16 个单词:用于大规模图像识别的 Transformers<br />MLP-Mixer:用于视觉的全 MLP 架构<br />如何训练你的 ViT?视觉 Transformers 中的数据、增强和正则化<br />当视觉 Transformers 在没有预训练或强大的数据增强的情况下胜过 ResNets 时<br />LiT:使用锁定图像文本调整的零样本传输<br />替代间隙最小化改进了清晰度感知训练<br />这些模型在 ImageNet 和 ImageNet-21k 数据集上进行了预训练。我们在 JAX/Flax 中提供了用于微调已发布模型的代码。<br />|
| [**Ultralytics/Yolov5<br />★★★★★**](https://github.com/ultralytics/yolov5)| YOLOv5🚀是世界上最受欢迎的视觉 AI,代表了 Ultralytics 对未来视觉 AI 方法的开源研究,融合了数千小时研发过程中获得的经验教训和最佳实践。|
| [**Dusty-nv/Jetson Inference<br />★★★★★**](https://github.com/dusty-nv/jetson-inference)| 该项目使用 TensorRT 在 C++ 或 Python 的 GPU 上运行优化网络,并使用 PyTorch 训练模型。支持的 DNN 视觉基元包括用于图像分类的 imageNet、用于对象检测的 detectNet、用于语义分割的 segNet、用于姿势估计的 poseNet 和用于动作识别的 actionNet。提供了从实时摄像头源进行流式传输、使用 WebRTC 制作 Web 应用程序以及对 ROS/ROS2 的支持的示例。 |
Expand All @@ -78,9 +85,9 @@ categories:
| [Stability-AI/Generative Models<br />★](https://github.com/Stability-AI/generative-models)| Generative Models by Stability AI |
| [Stability-AI/Stable Diffusion<br />★](https://github.com/Stability-AI/stablediffusion) | 此存储库包含从头开始训练的 Stable Diffusion 模型,并将使用新的检查点不断更新。 |
| [TensorFlow<br />★](https://github.com/tensorflow/tensorflow) | An Open Source Machine Learning Framework for Everyone |
| [TensorFlow Models<br />★](https://github.com/tensorflow/models) | Models and examples built with TensorFlow |
| [TensorFlow Models<br />★](https://github.com/tensorflow/models) | Models and examples built with TensorFlow |
| [Ultralytics/ultralytics<br />★](https://github.com/ultralytics/ultralytics) | Ultralytics YOLOv8 是一款尖端的、最先进的 (SOTA) 模型,它以之前 YOLO 版本的成功为基础,并引入了新功能和改进,以进一步提高性能和灵活性。YOLOv8 旨在快速、准确且易于使用,使其成为各种对象检测和跟踪、实例分割、图像分类和姿势估计任务的绝佳选择。 |
| [Karpathy/llama2.c<br />★](https://github.com/karpathy/llama2.c)| 在 PyTorch 中训练 Llama 2 LLM 架构,然后使用一个简单的 700 行 C 文件 (run.c) 进行推理。|
| [Karpathy/llama2.c<br />★](https://github.com/karpathy/llama2.c)| 在 PyTorch 中训练 Llama 2 LLM 架构,然后使用一个简单的 700 行 C 文件 (run.c) 进行推理。|
| [GPT2-Chinese<br />★](https://github.com/Morizeyao/GPT2-Chinese)|中文的GPT2训练代码,使用BERT的Tokenizer或Sentencepiece的BPE model |
| [openai-cookbook<br />★★](https://github.com/openai/openai-cookbook)|使用 OpenAI API 完成常见任务的示例代码和指南。 |
| [ONNX<br />★★★](https://github.com/onnx/onnx)|开放神经网络交换(ONNX)是一个开放的生态系统,使人工智能开发人员能够随着项目的发展选择合适的工具。ONNX为人工智能模型提供了一种开源格式,包括深度学习和传统ML,它定义了一个可扩展的计算图模型,以及内置运算符和标准数据类型的定义。目前我们专注于推理(评分)所需的功能。 |
Expand All @@ -98,7 +105,7 @@ categories:
| [**GitHub中文开源仓库排行榜<br />★★★★★**](https://github.com/GrowingGit/GitHub-Chinese-Top-Charts)| GitHub中文排行榜,帮助你发现优秀中文项目,可以无语言障碍地、更高效地吸收优秀经验成果 |
| [**free-programming-books<br />★★★★★**](https://github.com/EbookFoundation/free-programming-books)| 多种语言的免费学习资源列表 |
| [CS EBook<br />★★★](https://github.com/forthespada/CS-Books)| 超过1000本的计算机经典书籍分享,解压密码:a123654 |
| [CS EBook<br />★★★](https://github.com/lining808/CS-Ebook) | 本储存库是一些高质量的计算机科学与技术书籍推荐书单,需要学习的可以按照此书单进行学习进阶,包含了计算机大多数软件相关方向。而且敢承诺一直更新。 |
| [CS EBook<br />★★★](https://github.com/lining808/CS-Ebook) | 本储存库是一些高质量的计算机科学与技术书籍推荐书单,需要学习的可以按照此书单进行学习进阶,包含了计算机大多数软件相关方向。而且敢承诺一直更新。 |

</details>

Expand Down Expand Up @@ -152,16 +159,18 @@ PyTorch内部实现了神经网络中绝大多数的layer,这些layer都继承

图像nn包括,卷积层(Conv)、池化层(Pool),池化方式又分为平均池化(AvgPool)、最大值池化(MaxPool)、自适应池化(AdaptiveAvgPool)等。而卷积层除了常用的前向卷积之外,还有逆卷积(TransposeConv)。卷积神经网络的本质就是卷积层、池化层、激活层以及其他层的叠加。池化层可以看作是一种特殊的卷积层,其主要用于下采样,增加池化层可以在保留主要特征的同时降低参数量,从而一定程度上防止了过拟合。池化层没有可学习参数,它的weight是固定的。在`torch.nn`工具箱中封装好了各种池化层,常见的有最大池化(MaxPool)和平均池化(AvgPool)。

</details>

## 安装 Pytorch 1.6 环境(CPU版本)

https://pytorch.org/get-started/previous-versions/
<https://pytorch.org/get-started/previous-versions/>

<details>
<summary>点击此处查看步骤</summary>

![](/img/post_pics/ai/Pytorch.png)

**安装 Anaconda. 下载地址:** https://www.anaconda.com/download
**安装 Anaconda. 下载地址:** <https://www.anaconda.com/download>

```bash
# For example, Ubuntu
Expand All @@ -188,7 +197,7 @@ $ conda config --set show_channel_urls yes
**创建Pytorch虚拟环境**

```bash
$ conda create -n torch-1.6 python=3.6.13
conda create -n torch-1.6 python=3.6.13
```

<details>
Expand Down Expand Up @@ -273,13 +282,13 @@ Executing transaction: done
**激活环境**

```bash
$ conda activate torch-1.6
conda activate torch-1.6
```

**安装Pytorch 1.6**

```bash
$ conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch
conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch
```

<details>
Expand Down Expand Up @@ -388,11 +397,11 @@ $ conda env remove -p /home/shenjianliang/anaconda3/envs/torch-1.6
**不用Anaconda,使用python虚拟env**

```bash
$ sudo apt-get install python3-venv
$ python3.6 -m venv myenv
$ source myenv/bin/activate
sudo apt-get install python3-venv
python3.6 -m venv myenv
source myenv/bin/activate

$ pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
```

</details>
Expand Down Expand Up @@ -473,7 +482,7 @@ conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightl
conda activate torch-gpu
```

**安装cuDNN:https://developer.nvidia.com/cudnn-downloads**
**安装cuDNN:<https://developer.nvidia.com/cudnn-downloads>**

```bash
wget https://developer.download.nvidia.com/compute/cudnn/9.2.0/local_installers/cudnn-local-repo-ubuntu2004-9.2.0_1.0-1_amd64.deb
Expand Down
Loading

0 comments on commit 238be2e

Please sign in to comment.