Skip to content

Commit

Permalink
docs: add ref architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jun 27, 2023
1 parent 655bcac commit 8e13c8c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ cname = "aigc.phodal.com"

# cargo install mdbook-epub
# mdbook-epub --standalone ./path/to/book/dir
#[output.epub]
[output.epub]

# cargo install mdbook-pdf
#[output.pdf]
[output.pdf]

# cargo install --path .
#[output.count]
[output.count]
Binary file added src/images/llm-reference-arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/llm-arch-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@

TODO

## LLM 参考架构

对于大语言模型应用来说,在设计架构时,除了考虑编排等,还需要考虑到:数据敏感和安全等问题。如下是一个参考架构:

![LLM 参考架构](images/llm-reference-arch.png)

- UI 层:用户界面层,提供给用户与语言模型交互的界面,可以是网页、移动应用、命令行界面等。
- 会话处理层:处理用户与语言模型之间的交互会话,包括对用户输入的解析、对话管理、上下文维护等功能。
- 数据审计/安全:负责对用户数据进行审计和保护,防止数据泄露、滥用或被攻击。这个层次也可以包括对模型的安全性和可信度进行评估。
- 操作编排:这个层级可以管理和协调多个语言模型的运行,比如多个模型之间的调用、结果的融合等。它可以作为一个简单的流程引擎,将多个模型组合成复杂的工作流程。
- LLM 增强层:这个层级可以对语言模型进行额外的优化和增强,比如加速推理速度、提高模型的准确性、支持特定的任务等。这个层级也可以包括对模型解释性和可解释性的增强。
- LLM 层:最底层是语言模型本身,它是整个架构的核心。它可以是一个基于深度学习的模型,比如 LSTM、Transformer 等,也可以是一个基于传统
NLP 技术的模型。在这个层级,模型会接收输入并输出相应的文本结果。

0 comments on commit 8e13c8c

Please sign in to comment.