-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
99 lines (97 loc) · 5.49 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>ChaosThoughts.com</title>
<link>https://LiuChaoXD.github.io/</link>
<description>Recent content on ChaosThoughts.com</description>
<generator>Hugo -- 0.136.5</generator>
<language>en-us</language>
<lastBuildDate>Mon, 04 Nov 2024 22:30:44 +0800</lastBuildDate>
<atom:link href="https://LiuChaoXD.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Entropy Based Sampling and Parallel CoT Decoding</title>
<link>https://LiuChaoXD.github.io/posts/large-language-models/entropix/</link>
<pubDate>Mon, 04 Nov 2024 22:30:44 +0800</pubDate>
<guid>https://LiuChaoXD.github.io/posts/large-language-models/entropix/</guid>
<description><p>最近比较火的通过另一种采样方法提高LLM的Reasoning ability或者幻觉现象: <strong>Entropix</strong></p>
<h2 id="基本概念">基本概念</h2>
<p>现在大多数流行的LLM架构是基于Transformer architecture的。这种架构通常来讲包含一下几个关键部分:</p>
<ol>
<li>Embedding Layer:用来将输入的token转化为vector</li>
<li>Self-Attention Layers:自注意力层,就是网络自动学习用户输入一段文本中,所有文本之间的关系</li>
<li>Feed-Forward Layers:用来转化自注意力层的输出</li>
<li>Layer Normalization:用来稳定学习</li>
</ol>
<div class="mermaid">%%{init: {'theme': 'base', 'themeVariables': { 'fontFamily': 'arial'}}}%%
graph LR
classDef blue fill:#2374f7,stroke:#000,stroke-width:2px,color:#fff
classDef pink fill:#eb3dd6,stroke:#000,stroke-width:2px,color:#fff
classDef orange fill:#fc822b,stroke:#000,stroke-width:2px,color:#fff
classDef red fill:#ed2633,stroke:#000,stroke-width:2px,color:#fff
classDef green fill:#16b522,stroke:#000,stroke-width:2px,color:#fff
A([Input]) --> G(Embedding):::blue
G --> B(Self-Attention):::pink
B --> C(Layer Norm):::orange
C --> D(Feed Forward):::red
D --> E(Layer Norm):::green
E --> F([Output])</div>
<h3 id="llm如何generate-text或者completion">LLM如何generate text或者completion</h3>
<ul>
<li><strong>step 1:</strong> input processing(输入处理),即将input text先进行tokenization,然后通过embedding将其映射到vector空间中</li>
<li><strong>step 2</strong>:Forward processing(前向处理),即经过embedding后通过self-attention,layer norm,feed-forward 等,最终获得所有下一个可能token的logits</li>
<li><strong>step 3</strong>: Sampling(采样),这里就是该篇文章技术的关注点。回过头来,现在大多数能影响采样结果的参数有temperature(温度系数),top-p,top-k</li>
<li><strong>step 4</strong>: Repeat (重复上述步骤):即当采样好了下一个token后,会将该token添加到input text的末尾,即此时的输入变为了input text + “next token”,然后采样“next next token”</li>
</ul>
<h3 id="logits的作用">Logits的作用</h3>
<p>logits就是概率,主要是通过softmax函数去将最后一层的输出转化为总和为1的概率。即</p></description>
</item>
<item>
<title>Test</title>
<link>https://LiuChaoXD.github.io/posts/others/test-copy/</link>
<pubDate>Mon, 04 Nov 2024 21:57:32 +0800</pubDate>
<guid>https://LiuChaoXD.github.io/posts/others/test-copy/</guid>
<description><p>This is a tester</p></description>
</item>
<item>
<title>Test</title>
<link>https://LiuChaoXD.github.io/posts/others/test/</link>
<pubDate>Mon, 04 Nov 2024 21:57:32 +0800</pubDate>
<guid>https://LiuChaoXD.github.io/posts/others/test/</guid>
<description><p>This is a tester</p></description>
</item>
<item>
<title>About Me</title>
<link>https://LiuChaoXD.github.io/about/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://LiuChaoXD.github.io/about/</guid>
<description><p>学习可以保持年轻&hellip;</p>
<hr>
<ul>
<li>长期在企业内从事research、算法研发、开发相关工作。</li>
<li>研究领域:
<ul>
<li>Large Scale Image Retrieve</li>
<li>Hashing Learning</li>
<li>Compute Vision</li>
<li>Large Language Models</li>
<li>Agent/Workflow development</li>
<li>AI-powered Software development</li>
</ul>
</li>
</ul>
<hr>
<ul>
<li>正在努力追求独立开发的路上&hellip;.</li>
<li>独立开发web app
<ol>
<li><strong>PDF2MindMap</strong>:将sci paper自动解析解构,归纳整理为mindmap的工具</li>
<li><strong>AutoPrompter</strong>:自定义任务,上下文,自动编写高质量prompt的工具</li>
</ol>
</li>
</ul>
<hr>
<p>有关博客内容、合作意向,欢迎联系。</p>
<p>联系方式:[email protected]</p></description>
</item>
</channel>
</rss>