Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/L0/G1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Linux 基础知识

2 changes: 2 additions & 0 deletions docs/L0/G2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Linux 基础知识

2 changes: 2 additions & 0 deletions docs/L0/G3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Linux 基础知识

2 changes: 2 additions & 0 deletions docs/L0/G4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Linux 基础知识

23 changes: 23 additions & 0 deletions docs/L1/G1-书生大模型全链路开源体系.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 书生大模型全链路开源体系

在这个信息爆炸的时代,人工智能的每一次进步都如同星辰般璀璨,引领着科技的前沿。今天,我有幸观看了一段关于“书生普语大模型全链路开源体系”的详细介绍视频,这不仅是一次技术的深度剖析,更是一场对未来智能世界无限遐想的启航。

浦语的大模型体系视频:[书生·浦语大模型开源开放体系_哔哩哔哩_bilibili](https://www.bilibili.com/video/BV1CkSUYGE1v/?vd_source=38d5f9fdf2bab5cd87beccf4240f04e8)

![1731490938669](image/1731490938669.png)

## 视频的简要介绍

这段视频以深入浅出的方式,为我们揭开了书生普语大模型的神秘面纱。它并非传统意义上的影视剧或娱乐节目,而是一场科技盛宴的直播或教学视频,聚焦于人工智能领域的前沿技术——大模型的全链路开源体系。视频中,主讲人以饱满的热情和清晰的逻辑,引领我们穿梭于复杂的技术概念之间,让我们对书生浦语大模型有了全面而深刻的认识。

## 视频主要内容

视频内容丰富多彩,涵盖了书生普语大模型从语音识别、图像分类到多模态预训练语料库、升级版对话模型等多个方面。特别值得一提的是,书生普语不仅提供了全免费商用的7b开源模型,还构建了全链条的工具体系,支持从数据预处理到模型部署、评测的完整流程。这种全方位的开源策略,无疑为人工智能的普及和应用提供了强有力的支撑。此外,视频还展示了模型在推理数学代码、创作剧情、绘制行业趋势图等方面的强大能力,让人不禁感叹于人工智能的无限可能。

## 主题探讨

书生浦语大模型全链路开源体系的推出,不仅是对人工智能技术的一次重大贡献,更是对科技创新生态的一次深刻重塑。它打破了技术壁垒,降低了人工智能应用的门槛,使得更多的开发者、研究者能够参与到人工智能的浪潮中来。这种开放共享的精神,正是推动科技进步和社会发展的重要力量。同时,视频中也提到了人工智能在人文关怀、社会应用等方面的潜力,这让我们看到了人工智能不仅仅是冷冰冰的技术工具,更是能够温暖人心、服务社会的智慧伙伴。

## 总体评价和推荐

总的来说,这段关于书生浦语大模型全链路开源体系的视频给我留下了深刻的印象。它不仅让我对人工智能的前沿技术有了更深入的了解,还激发了我对未来智能世界的无限憧憬。视频内容充实、逻辑清晰、讲解生动,是一部不可多得的科技教育佳作。因此,我强烈推荐给所有对人工智能感兴趣的朋友观看学习。如果要用一个分数来评价的话,我愿意给出9分的高分(满分10分),因为它几乎完美地完成了知识的传递和思想的启迪。
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 基础任务

### MindSearch 试玩

![1732008672340](image/1732008672340.png)

### 书生·浦语 试玩

![1732008443838](image/1732008443838.png)

### 书生·万象 试玩

![1732009041347](image/1732009041347.png)

## 进阶任务

回复链接如下:

最近大火的中国 3A 大作《黑神话·悟空》里有什么让你难忘的精彩故事情节? - 早睡早起的回答 - 知乎
https://www.zhihu.com/question/1915582405/answer/35508710761
34 changes: 34 additions & 0 deletions docs/L1/G3-浦语提示词工程实践.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## 提示工程(Prompt Engineering)介绍

### 什么是Prompt(提示词)

Prompt是一种用于指导以大语言模型为代表的**生成式人工智能**生成内容(文本、图像、视频等)的输入方式。它通常是一个简短的文本或问题,用于描述任务和要求。

Prompt可以包含一些特定的关键词或短语,用于引导模型生成符合特定主题或风格的内容。例如,如果我们要生成一篇关于“人工智能”的文章,我们可以使用“人工智能”作为Prompt,让模型生成一篇关于人工智能的介绍、应用、发展等方面的文章。

Prompt还可以包含一些特定的指令或要求,用于控制生成文本的语气、风格、长度等方面。例如,我们可以使用“请用幽默的语气描述人工智能的发展历程”作为Prompt,让模型生成一篇幽默风趣的文章。

总之,Prompt是一种灵活、多样化的输入方式,可以用于指导大语言模型生成各种类型的内容。

### 什么是提示工程

提示工程是一种通过设计和调整输入(Prompts)来改善模型性能或控制其输出结果的技术。

在模型回复的过程中,首先获取用户输入的文本,然后处理文本特征并根据输入文本特征预测之后的文本,原理为**next token prediction**,类似我们日常使用的输入法。

提示工程是模型性能优化的基石,有以下六大基本原则:

- 指令要清晰
- 提供参考内容
- 复杂的任务拆分成子任务
- 给 LLM“思考”时间(给出过程)
- 使用外部工具
- 系统性测试变化

在提示工程中,第一点给出清晰的指令是至关重要的。一个有效的指令通常包含以下要素:背景、任务、要求、限制条件、示例、输出格式和目标。通过提供这些详细信息,我们可以引导模型生成更符合我们期望的文本。

## 基础任务

利用对提示词的精确设计,引导语言模型正确回答出“strawberry”中有几个字母“r”。

![1732010795968](image/1732010795968.png)
96 changes: 96 additions & 0 deletions docs/L1/G4-LlamaIndex+InternLM RAG 实践.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
## 1. 前置知识

正式介绍检索增强生成(Retrieval Augmented Generation,RAG)技术以前,大家不妨想想为什么会出现这样一个技术。 给模型注入新知识的方式,可以简单分为两种方式,一种是内部的,即更新模型的权重,另一个就是外部的方式,给模型注入格外的上下文或者说外部信息,不改变它的的权重。 第一种方式,改变了模型的权重即进行模型训练,这是一件代价比较大的事情,大语言模型具体的训练过程,可以参考[InternLM2技术报告](https://arxiv.org/abs/2403.17297)。 第二种方式,并不改变模型的权重,只是给模型引入格外的信息。

类比人类编程的过程,第一种方式相当于你记住了某个函数的用法,第二种方式相当于你阅读函数文档然后短暂的记住了某个函数的用法。

对比两种注入知识方式,第二种更容易实现。RAG 正是这种方式。它能够让基础模型实现非参数知识更新,无需训练就可以掌握新领域的知识。本次课程选用了 LlamaIndex 框架。LlamaIndex 是一个上下文增强的 LLM 框架,旨在通过将其与特定上下文数据集集成,增强大型语言模型(LLMs)的能力。它允许您构建应用程序,既利用 LLMs 的优势,又融入您的私有或领域特定信息。

## 2. 开发机启动

重新启动开发机,并使用vscode远程连接

![1732091367452](image/1732091367452.png)

## 3.环境配置

进入开发机后,创建新的conda环境,命名为 `llamaindex`,在命令行模式下运行:

```
conda create -n llamaindex python=3.10
```

复制完成后,在本地查看环境。

```
conda env list
```

结果如下所示。

```
# conda environments:
#
base * /root/.conda
llamaindex /root/.conda/envs/llamaindex
```

运行 `conda` 命令,激活 `llamaindex` 然后安装相关基础依赖 **python** 虚拟环境:

```
conda activate llamaindex
```

**安装python 依赖包**

```
pip install einops==0.7.0 protobuf==5.26.1
```

**安装 Llamaindex和相关的包**

```
conda activate llamaindex
pip install llama-index==0.11.20
pip install llama-index-llms-replicate==0.3.0
pip install llama-index-llms-openai-like==0.2.0
pip install llama-index-embeddings-huggingface==0.3.1
pip install llama-index-embeddings-instructor==0.2.1
pip install torch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 --index-url https://download.pytorch.org/whl/cu121
```

### 下载 Sentence Transformer 模型

源词向量模型 [Sentence Transformer](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2):(我们也可以选用别的开源词向量模型来进行 Embedding,目前选用这个模型是相对轻量、支持中文且效果较好的)

![1732092282460](image/1732092282460.png)

### 下载 NLTK 相关资源

我们在使用开源词向量模型构建开源词向量的时候,需要用到第三方库 `nltk` 的一些资源。正常情况下,其会自动从互联网上下载,但可能由于网络原因会导致下载中断,此处我们可以从国内仓库镜像地址下载相关资源,保存到服务器上。

![1732092302563](image/1732092302563.png)



## 3. 是否使用 LlamaIndex 前后对比

### 不使用 LlamaIndex RAG(仅API)

![1732092370027](image/1732092370027.png)

回答的效果并不好,并不是我们想要的xtuner。

### 使用 API+LlamaIndex

![1732094212986](image/1732094212986.png)

回答的效果非常的给力☆( ̄▽ ̄)/$:*



## 4. LlamaIndex web

![1732095313825](image/1732095313825.png)

回答也很正确哦!!!
Binary file added docs/L1/image/1731490938669.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 docs/L1/image/1732008443838.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 docs/L1/image/1732008672340.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 docs/L1/image/1732009041347.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 docs/L1/image/1732010141570.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 docs/L1/image/1732010795968.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 docs/L1/image/1732091367452.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 docs/L1/image/1732092282460.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 docs/L1/image/1732092302563.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 docs/L1/image/1732092370027.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 docs/L1/image/1732094212986.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 docs/L1/image/1732095313825.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/L2/G4-InternVL 多模态模型部署微调实践.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 开发机创建和使用

### 开发机创建

![1732007796954](image/1732007796954.png)

### 开发机远程使用

使用vscode远程开发机,远程后界面如下:

![1732007867509](image/1732007867509.png)
Binary file added docs/L2/image/1732007796954.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 docs/L2/image/1732007867509.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 0 additions & 51 deletions 入门课/L0-Git 基础.md

This file was deleted.

41 changes: 0 additions & 41 deletions 入门课/L0-Linux 基础知识.md

This file was deleted.

47 changes: 0 additions & 47 deletions 入门课/L0-Python 基础.md

This file was deleted.

10 changes: 0 additions & 10 deletions 入门课/camp3_1363.md

This file was deleted.

Binary file not shown.
Binary file removed 入门课/img/561895fd65bab1655209274aba573979.png
Binary file not shown.
Binary file removed 入门课/img/acdd900a5e7821b5c48f33da9e35e939.png
Binary file not shown.
Binary file removed 入门课/img/debug断点调试.png
Binary file not shown.
Binary file removed 入门课/img/image-1.png
Binary file not shown.
Binary file removed 入门课/img/image-2.png
Binary file not shown.
Binary file removed 入门课/img/image.png
Binary file not shown.
Binary file removed 入门课/img/wordcount执行结果.png
Binary file not shown.
Binary file removed 入门课/img/运行调试.png
Binary file not shown.
Loading