ChatGPT的前世今生
如果无法正常显示,请先停止浏览器的去广告插件。
        
                1. ChatGPT的前世今生
李丕绩
计算机科学与技术学院/人工智能学院
南京航空航天大学
pjli@nuaa.edu.cn            
                        
                2. 个人介绍
• 教育经历
• 香港中文大学, 博士, 2018
• 自然语言处理
• 山东大学, 本科&硕士, 2009&2012
• 计算机视觉&信息检索
• 工作经历
• 北京百度, 2012
• 深圳无觅, 2013
• 深圳腾讯AI Lab, 2018
• 南京航空航天大学, 2021
• 自然语言处理
4/11/2023
Piji Li, LLM&ChatGPT
2            
                        
                3. 人工智能发展史
4/11/2023
Piji Li, LLM&ChatGPT
https://www.itheima.com/news/20210507/180049.html
3            
                        
                4. 接触AI
4/11/2023
Piji Li, LLM&ChatGPT
4            
                        
                5. AI十年回顾
AlexNet
4/11/2023
Piji Li, LLM&ChatGPT
5            
                        
                6. AI十年回顾
•
2006-2009, 1000 categories and 1.2 million training images
ImageNet Classification Error
0.4
0.35
Deeper
Network in Network
Deep
DNN
First Blood
0.3
0.25
0.2
0.15
0.1
0.05
0
2015
2014
2013
2012
Li Fei-Fei: ImageNet Large Scale Visual Recognition Challenge, 2014 http://image-net.org/
4/11/2023
Piji Li, LLM&ChatGPT
6            
                        
                7. AI十年回顾
https://m.thepaper.cn/baijiahao_11940577
4/11/2023
Piji Li, LLM&ChatGPT
7
https://www.cbc.ca/news/science/google-buys-university-of-toronto-startup-1.1373641            
                        
                8. AI十年回顾
“深度学习三巨头”之称的Yoshua Bengio、Yann LeCun、Geoffrey Hinton共同获得了2018年的图灵奖,这
是图灵奖1966年建立以来少有的一年颁奖给三位获奖者。
4/11/2023
Piji Li, LLM&ChatGPT
8            
                        
                9. AI十年回顾
•
2006-2009, 1000 categories and 1.2 million training images
ImageNet Classification Error
0.4
0.35
Deeper
Network in Network
Deep
DNN
First Blood
0.3
0.25
0.2
0.15
0.1
0.05
0
2015
2014
2013
2012
Li Fei-Fei: ImageNet Large Scale Visual Recognition Challenge, 2014 http://image-net.org/
4/11/2023
Piji Li, LLM&ChatGPT
9            
                        
                10. AI十年回顾
• 何恺明
Kaiming He,本科
就读于清华大学,博
士毕业于香港中文大
学多媒体实验室。
2011年加入微软亚洲
研究院(MSRA)工
作。2016年,加入
Facebook AI
Research(FAIR)担
任研究科学家
4/11/2023
Piji Li, LLM&ChatGPT
10            
                        
                11. AI十年回顾
AlphaGO
4/11/2023
Piji Li, LLM&ChatGPT
11            
                        
                12. AI十年回顾
• DeepMind成立于2010年,2014年被Google收购。
• 2014年开始开发人工智能围棋软件AlphaGo。
• 2015年10月,分布式版AlphaGo分先以5:0击败了欧洲围棋冠军华裔
法籍职业棋士樊麾二段。
• 2016年3月,AlphaGo挑战世界冠军韩国职业棋士李世乭(이세돌)
九段,对弈结果为AlphaGo 4:1战胜了李世乭。
4/11/2023
Piji Li, LLM&ChatGPT
12            
                        
                13. AI十年回顾
4/11/2023
Piji Li, LLM&ChatGPT
13            
                        
                14. AI十年回顾
• 4 : 1
4/11/2023
Piji Li, LLM&ChatGPT
14            
                        
                15. AI十年回顾
• AI绘图
4/11/2023
Piji Li, LLM&ChatGPT
15            
                        
                16. AI十年回顾
4/11/2023
Piji Li, LLM&ChatGPT
16            
                        
                17. AI十年回顾
AlphaFold
4/11/2023
Piji Li, LLM&ChatGPT
17            
                        
                18. AI十年回顾
• CASP
• 2018-AF1
• 2020-AF2
• 2021-Nature
4/11/2023
Piji Li, LLM&ChatGPT
18
https://www.nature.com/articles/s41586-021-03819-2            
                        
                19. AI十年回顾
Diffusion Model
4/11/2023
Piji Li, LLM&ChatGPT
19            
                        
                20. Stable Diffusion
4/11/2023
Piji Li, LLM&ChatGPT
20            
                        
                21. Disco Diffusion
4/11/2023
Piji Li, LLM&ChatGPT
21            
                        
                22. Midjourney v5
4/11/2023
Piji Li, ChatGPT
22            
                        
                23. Diffusion Model
4/11/2023
Piji Li, LLM&ChatGPT
23            
                        
                24. AI十年回顾
ChatGPT
GPT4
4/11/2023
Piji Li, LLM&ChatGPT
25            
                        
                25. ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
26            
                        
                26. GPT-4
• Mar. 14, 2023
4/11/2023
Piji Li, LLM&ChatGPT
27            
                        
                27. AI十年回顾
4/11/2023
Piji Li, LLM&ChatGPT
28            
                        
                28. AI十年回顾
4/11/2023
Piji Li, LLM&ChatGPT
29            
                        
                29. 人工智能
• 机器学习
• 计算机视觉
• 自然语言处理
• 语音识别及合成
• 机器人
4/11/2023
Piji Li, LLM&ChatGPT
30            
                        
                30. 什么是自然语言处理?
• 自然语言
• 人类使用的语言,如汉语、英语、法语等;特指文本符号(非语音)。
• 如何定义
• 自然语言处理(Natural Language Processing, NLP)是利用计算机技术来分析、理解和处理自然
语言的一门学科, 涉及到语言学、计算机科学、人工智能等交叉领域,关注计算机和人类(自然)
语言之间的交互。
• 可 分 为 自 然 语 言 理 解 (Natural Language Understanding, NLU) 和 自 然 语 言 生 成 (Natural
Language Generation, NLG)两大部分。
• 属于认知智能
• 计算智能(能存会算),感知智能(能听会说,能看会认)
• 认知智能(能理解会思考,需要抽象和推理能力)
4/11/2023
Piji Li, LLM&ChatGPT
31            
                        
                31. 认知智能
4/11/2023
Piji Li, LLM&ChatGPT
32            
                        
                32. #自然语言处理太难了#
• 歧义性
• 主观性
• 创新性
• 知识性
• 组合性
• 上下文
• 多模态
4/11/2023
Piji Li, LLM&ChatGPT
33            
                        
                33. #自然语言处理太难了#
• 歧义性
• 主观性
• 创新性
• 知识性
• 组合性
• 上下文
• 多模态
4/11/2023
Piji Li, LLM&ChatGPT
34            
                        
                34. “自然语言处理是人工智能皇冠上的明珠”
ChatGPT!
(from:
哈工大
车万翔)
4/11/2023
Piji Li, LLM&ChatGPT
35            
                        
                35. ChatGPT是怎么诞生的?
罗马不是一天建成的
4/11/2023
Piji Li, LLM&ChatGPT
36            
                        
                36. ChatGPT是怎么诞生的?
•
•
•
•
•
•
•
•
•
•
•
向量空间模型
Bm25
Svd
Plsa
Lda
Word2vec
Deepwalk
transE
Cnn句子分类
匹配、摘要等
Seq2seq翻译
4/11/2023
•
•
•
•
•
•
•
•
•
•
•
•
•
Piji Li, LLM&ChatGPT
CnnSeq
Transformer
Language model
Lstm pretrain
ELMo
GPT
BERT xlnet roberta、albert、
electra
GPT2 GPT3
BART T5
PEGASUS
WebGPT
RLHF
InstructGPT
37            
                        
                37. 内容
• 基础技术
• 预训练技术
• ChatGPT
• 未来展望
4/11/2023
Piji Li, LLM&ChatGPT
38            
                        
                38. 内容
• 基础技术
• 预训练技术
• ChatGPT
• 未来展望
4/11/2023
Piji Li, LLM&ChatGPT
39            
                        
                39. 基础技术的故事
4/11/2023
Piji Li, LLM&ChatGPT
40            
                        
                40. Language Model
语言模型
4/11/2023
Piji Li, LLM&ChatGPT
41            
                        
                41. 语言模型
• Language Model
4/11/2023
Piji Li, LLM&ChatGPT
42
孙栩,自然语言处理导论            
                        
                42. 语言模型
• Language Model
4/11/2023
Piji Li, LLM&ChatGPT
43
孙栩,自然语言处理导论            
                        
                43. 语言模型
• Language Model
4/11/2023
Piji Li, LLM&ChatGPT
44
孙栩,自然语言处理导论            
                        
                44. N-gram LM
4/11/2023
Piji Li, LLM&ChatGPT
45
孙栩,自然语言处理导论            
                        
                45. N-gram LM
4/11/2023
Piji Li, LLM&ChatGPT
46
孙栩,自然语言处理导论            
                        
                46. N-gram LM
4/11/2023
Piji Li, LLM&ChatGPT
47
孙栩,自然语言处理导论            
                        
                47. Evaluation: Perplexity
4/11/2023
Piji Li, LLM&ChatGPT
48            
                        
                48. NN LM
• Neural Network based Language Model
4/11/2023
Piji Li, LLM&ChatGPT
49            
                        
                49. NN LM
4/11/2023
Piji Li, LLM&ChatGPT
50
孙栩,自然语言处理导论            
                        
                50. NN LM
4/11/2023
Piji Li, LLM&ChatGPT
51
孙栩,自然语言处理导论            
                        
                51. 梯度消失/爆炸
https://kexue.fm/archives/7888
4/11/2023
Piji Li, LLM&ChatGPT
54            
                        
                52. 长程依赖问题
• 循环神经网络在时间维度上非常深!
• 梯度消失或梯度爆炸
• 如何改进?
• 梯度爆炸问题
• 权重衰减
• 梯度截断
• 梯度消失问题
• 改进模型
4/11/2023
Piji Li, LLM&ChatGPT
55            
                        
                53. 长程依赖问题
• 改进方法
• 循环边改为线性依赖关系
• 增加非线性
残差网络?
4/11/2023
Piji Li, LLM&ChatGPT
56            
                        
                54. Long Short-Term Memory, LSTM
4/11/2023
Piji Li, LLM&ChatGPT
57            
                        
                55. 4/11/2023
Piji Li, LLM&ChatGPT
58            
                        
                56. I am the GOD Father!
4/11/2023
Piji Li, LLM&ChatGPT
LSTM现在也没有多少人用了。。。
59            
                        
                57. 长短期记忆神经网络(Long Short-Term Memory, LSTM )
4/11/2023
Piji Li, LLM&ChatGPT
60            
                        
                58. 长短期记忆神经网络(Long Short-Term Memory, LSTM )
4/11/2023
Piji Li, LLM&ChatGPT
https://kexue.fm/archives/7888
61            
                        
                59. LSTM的各种变体
• 没有遗忘门
• 耦合输入门和遗忘门
• peephole连接
4/11/2023
Piji Li, LLM&ChatGPT
62            
                        
                60. Gated Recurrent Unit, GRU
• 顺便讲讲GRU
4/11/2023
Piji Li, LLM&ChatGPT
63            
                        
                61. Gated Recurrent Unit, GRU
4/11/2023
Piji Li, LLM&ChatGPT
64            
                        
                62. Gated Recurrent Unit, GRU
重置门
更新门
4/11/2023
Piji Li, LLM&ChatGPT
65            
                        
                63. RNN LM的应用
4/11/2023
Piji Li, LLM&ChatGPT
69            
                        
                64. 语言模型
做生成?
4/11/2023
Piji Li, LLM&ChatGPT
70            
                        
                65. 语言模型 – 序列生成
2002
ICML 2011
NIPS2008
ICML 2012
4/11/2023
Piji Li, LLM&ChatGPT
71            
                        
                66. 语言模型 – 文本生成
ICML2011
4/11/2023
Piji Li, LLM&ChatGPT
72            
                        
                67. LSTM
4/11/2023
Piji Li, LLM&ChatGPT
73            
                        
                68. 4/11/2023
Piji Li, LLM&ChatGPT
74            
                        
                69. 生成LINUX内核代码
4/11/2023
Piji Li, LLM&ChatGPT
75            
                        
                70. 作词机
• RNN在“学习”过汪峰全部作品后自动生成的歌词
• https://github.com/phunterlau/wangfeng-rnn
我在这里中的夜里
就像一场是一种生命的意旪
就像我的生活变得在我一样
可我们这是一个知道
我只是一天你会怎吗
可我们这是我们的是不要为你
我们想这有一种生活的时候
4/11/2023
Piji Li, LLM&ChatGPT
76            
                        
                71. 作诗机
。。。
Yang et al. Stylistic Chinese Poetry Generation via Unsupervised Style Disentanglement. EMNLP 2018.
4/11/2023
Piji Li, LLM&ChatGPT
77            
                        
                72. 继续发展
• 2013、2014、2015
• 大家一边玩着word2vec,一边训练着rnn-lm做生成,一边影响
着其它领域发展
• 例如:
• 机器翻译
4/11/2023
Piji Li, LLM&ChatGPT
78            
                        
                73. 统计机器翻译-SMT
北京
Chinese: 我
在
Phrase Seg: 我 Phrase Trans: I in Beijing
Phrase Reorder: I did
English: I
在 北京
做了
做了 讲座
did lecture
lecture
did lecture
讲座
in
in Beijing
Beijing
张家俊. 机器翻译lectures
4/11/2023
Piji Li, LLM&ChatGPT
79            
                        
                74. 统计机器翻译-SMT
Chinese:
我
在
北京
做了
• Phrase Seg: 我 ①数据稀疏
在 北京
报告
做了 报告
• Phrase Trans:
I
in Beijing
gave a
人工设定的模块和特征
talk
②复杂结构
无能为力
Reorder: I
• Phrase
Beijing
English:
I
③强烈依赖先
验知识
gave a talk
in
gave a
talk
in
Beijing
张家俊. 机器翻译lectures
4/11/2023
Piji Li, LLM&ChatGPT
80            
                        
                75. 神经机器翻译
EMNLP 2013
2002
NIPS2008
ICML 2011
ICML 2012
4/11/2023
Piji Li, LLM&ChatGPT
83            
                        
                76. 神经机器翻译
COLING2006
2013
4/11/2023
COLING2012
Piji Li, LLM&ChatGPT
84            
                        
                77. 神经机器翻译
NAACL 2012 Best short Paper
ACL 2014 Best Paper
4/11/2023
Piji Li, LLM&ChatGPT
85            
                        
                78. 神经机器翻译
ACL 2014 Best Paper
4/11/2023
Piji Li, LLM&ChatGPT
86            
                        
                79. 神经机器翻译
4/11/2023
Piji Li, LLM&ChatGPT
87            
                        
                80. 神经机器翻译
4/11/2023
Piji Li, LLM&ChatGPT
88            
                        
                81. RNNencdec
4/11/2023
Piji Li, LLM&ChatGPT
89            
                        
                82. RNNencdec
4/11/2023
Piji Li, LLM&ChatGPT
90            
                        
                83. RNNencdec
Cho et.al. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. EMNLP2014
4/11/2023
Piji Li, LLM&ChatGPT
91            
                        
                84. RNNencdec
Phrase Generation + SMT,并不是真正的end-to-end形式的NMT。
4/11/2023
Piji Li, LLM&ChatGPT
92            
                        
                85. RNNencdec
•
Problem?
4/11/2023
Piji Li, LLM&ChatGPT
93            
                        
                86. Seq2seq-attention
4/11/2023
Piji Li, LLM&ChatGPT
94            
                        
                87. Seq2seq-attention
4/11/2023
Piji Li, LLM&ChatGPT
95            
                        
                88. Seq2seq-attention
4/11/2023
Piji Li, LLM&ChatGPT
96            
                        
                89. Seq2seq-attention
4/11/2023
Piji Li, LLM&ChatGPT
97            
                        
                90. Seq2seq-attention
Teacher Forcing!
bidirectional recurrent neural network (BiRNN)
Softmax(W[s,y,c]+b)
4/11/2023
Piji Li, LLM&ChatGPT
98            
                        
                91. Attention calculation
4/11/2023
Piji Li, LLM&ChatGPT
99            
                        
                92. Decoding Strategy
Greedy Search
Beam Search
4/11/2023
Piji Li, LLM&ChatGPT
100            
                        
                93. Seq2seq-attention
4/11/2023
Piji Li, LLM&ChatGPT
101            
                        
                94. Seq2seq-lstm (no attention)
4/11/2023
Piji Li, LLM&ChatGPT
102            
                        
                95. Seq2seq-lstm (no attention)
4/11/2023
Piji Li, LLM&ChatGPT
103            
                        
                96. Seq2seq-lstm (no attention)
4/11/2023
Piji Li, LLM&ChatGPT
104            
                        
                97. 翻译落地
• Seq2seq-attention之后,大厂开始业务上线
➢ 在线翻译(谷歌、微软、百度、有道、搜狗等)
➢ 翻译机(科大讯飞、准儿、百度、搜狗等)
➢ 同传机器翻译(微软、讯飞、腾讯、搜狗等)
• 基于PowerPoint的语音同传(微软,TAUS 3.22-23 )
• 面向自由说话人的语音同传(腾讯,博鳌亚洲论坛)
4/11/2023
Piji Li, LLM&ChatGPT
105            
                        
                98. Seq2seq-attention
•爆发seq2seq应用
• Research
• Startups
4/11/2023
Piji Li, LLM&ChatGPT
106            
                        
                99. Google NMT
- Deep
- Residual
- Parallel
- Wordpiece (subwords)
- Length-normalization
- Coverage penalty
- Reinforcement learning for BLEU
4/11/2023
Piji Li, LLM&ChatGPT
107            
                        
                100. Seq2seq-attention
Lingpeng Kong, NLP Lectures
4/11/2023
Piji Li, LLM&ChatGPT
108            
                        
                101. Seq2seq-attention
Lingpeng Kong, NLP Lectures
4/11/2023
Piji Li, LLM&ChatGPT
109            
                        
                102. Seq2seq-attention
Lingpeng Kong, NLP Lectures
4/11/2023
Piji Li, LLM&ChatGPT
110            
                        
                103. Seq2seq-attention
Lingpeng Kong, NLP Lectures
4/11/2023
Piji Li, LLM&ChatGPT
111            
                        
                104. ConvS2S
ICML2017
4/11/2023
Piji Li, LLM&ChatGPT
112            
                        
                105. ConvS2S
4/11/2023
Piji Li, LLM&ChatGPT
113            
                        
                106. ConvS2S
Google:
4/11/2023
Piji Li, LLM&ChatGPT
114            
                        
                107. ConvS2S
• Google说:那怎么行?放大招!
4/11/2023
Piji Li, LLM&ChatGPT
115            
                        
                108. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
116            
                        
                109. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
117            
                        
                110. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
118            
                        
                111. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
119            
                        
                112. Transformer
• Multi-headed self-attention
• Models context
• Feed-forward layers
• Computes non-linear hierarchical features
• Layer norm and residuals
• Makes training deep networks healthy
• Positional embeddings
• Allows model to learn relative positioning
Vaswani, Ashish, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz
Kaiser, and Illia Polosukhin. "Attention is all you need." In NIPS, pp. 5998-6008. 2017.
4/11/2023
Piji Li, LLM&ChatGPT
120            
                        
                113. Transformer- self-attention
4/11/2023
Piji Li, LLM&ChatGPT
121            
                        
                114. Transformer
• Transformer: Multi-Head Attention
4/11/2023
Piji Li, LLM&ChatGPT
122            
                        
                115. Transformer-multi-head self-att
4/11/2023
Piji Li, LLM&ChatGPT
123            
                        
                116. Transformer-multi-head self-att
4/11/2023
Piji Li, LLM&ChatGPT
124            
                        
                117. Transformer-The Order of The Sequence
• Position embedding – relative position
• 很多后续研究
4/11/2023
Piji Li, LLM&ChatGPT
125            
                        
                118. Transformer - Input
4/11/2023
Piji Li, LLM&ChatGPT
126            
                        
                119. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
127            
                        
                120. Transformer – Add & Norm
• Add – Residual Connection
• Norm
4/11/2023
Piji Li, LLM&ChatGPT
128            
                        
                121. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
129            
                        
                122. Transformer - fflayer
4/11/2023
Piji Li, LLM&ChatGPT
130            
                        
                123. Transformer-decoder
• Cross-attention
• Masked-self-attention
4/11/2023
Piji Li, LLM&ChatGPT
131            
                        
                124. Transformer-decoder
4/11/2023
Piji Li, LLM&ChatGPT
132            
                        
                125. Transformer-results
4/11/2023
Piji Li, LLM&ChatGPT
133            
                        
                126. Transformer
4/11/2023
Piji Li, LLM&ChatGPT
134            
                        
                127. 内容
• 基础技术
• 预训练技术
• ChatGPT
• 未来展望
4/11/2023
Piji Li, LLM&ChatGPT
135            
                        
                128. 预训练的故事
4/11/2023
Piji Li, LLM&ChatGPT
136            
                        
                129. 语义分析-向量表示
• 匹配
• 检索
• 分类
• 聚类
VSM→LDA(2003)
→Google Word2vec(2013/14) → Google LSTM-LM(2015)
→ AI2 ELMo(2017) → OpenAI GPT(Jun 2018)
→ Google BERT(Oct 2018) → OpenAI GPT2(2019)→ Google XLNet(2019)
→OpenAI GPT3(2020)
4/11/2023
Piji Li, LLM&ChatGPT
138            
                        
                130. 语义分析-向量表示-VSM
• TF-IDF向量表示
4/11/2023
Piji Li, LLM&ChatGPT
139            
                        
                131. 语义分析-向量表示-VSM
• 缺点
• 稀疏性: 对于大词典,尤其是包括了生僻字的词典,文档稀疏性不可避免;
• 多义词: BOW模型只统计单词出现的次数,而忽略了一个词可能存在多种含义,一词
多义;
• 同义词(Synonym): 多个单词可以表示同一个意思,一义多词;
• 从同义词和多义词问题可以看到:单词也许不是文档的最基本组成元素,在单词与文档之
间还有一层隐含的关系,我们称之为主题(Topic),我们更关注隐藏在词之后的意义和概念。
在写文章时首先确定的是文章的主题,再根据主题选择合适的单词来表达观点。
• 所以,在这里我们需要将单词向量空间转变成话题向量空间,这里也就是从词袋模型转变
成LSA模型
https://zhuanlan.zhihu.com/p/80557306
4/11/2023
Piji Li, LLM&ChatGPT
140            
                        
                132. 语义分析-向量表示-VSM
4/11/2023
Piji Li, LLM&ChatGPT
141            
                        
                133. Latent Semantic Indexing (LSI)
4/11/2023
Piji Li, LLM&ChatGPT
142            
                        
                134. Latent Semantic Indexing (LSI)
4/11/2023
Piji Li, LLM&ChatGPT
143            
                        
                135. Latent Semantic Indexing (LSI)
奇异值σ跟特征值类似,在矩阵Σ
中也是从大到小排列,而且σ的减
少特别的快,在很多情况下,前
10%甚至1%的奇异值的和就占了
全部的奇异值之和的99%以上了。
也就是说,我们也可以用前r大的
奇异值来近似描述矩阵
4/11/2023
Piji Li, LLM&ChatGPT
144            
                        
                136. Latent Semantic Indexing (LSI)
4/11/2023
Piji Li, LLM&ChatGPT
145            
                        
                137. Latent Semantic Indexing (LSI)
原图
保留前5项
保留前50项
https://www.zhihu.com/question/22237507/answer/53804902
4/11/2023
Piji Li, LLM&ChatGPT
146            
                        
                138. Latent Semantic Indexing (LSI)
• LSI是最早出现的主题模型了,它的算法原理很简单,一次奇异值分解就可以得到
主题模型,同时解决词义的问题,非常漂亮。
• 将文档表示到话题向量空间的过程就是SVD奇异值分解和降维的过程。降维是LSA
分析中最重要的一步,通过降维,去除了文档中的“噪音”,也就是无关信息(比
如词的误用或不相关的词偶尔出现在一起),语义结构逐渐呈现。
• 缺点:不好解释
4/11/2023
Piji Li, LLM&ChatGPT
147            
                        
                139. pLSA(Probabilistic Latent Semantic Analysis)
LSA概率意义上的解释
https://zhuanlan.zhihu.com/p/31235789
4/11/2023
Piji Li, LLM&ChatGPT
148            
                        
                140. pLSA(Probabilistic Latent Semantic Analysis)
• 联合概率分布
https://zhuanlan.zhihu.com/p/31235789
4/11/2023
Piji Li, LLM&ChatGPT
149            
                        
                141. pLSA(Probabilistic Latent Semantic Analysis)
https://zhuanlan.zhihu.com/p/31235789
4/11/2023
Piji Li, LLM&ChatGPT
150            
                        
                142. pLSA(Probabilistic Latent Semantic Analysis)
https://zhuanlan.zhihu.com/p/31235789
4/11/2023
Piji Li, LLM&ChatGPT
151            
                        
                143. pLSA(Probabilistic Latent Semantic Analysis)
4/11/2023
Piji Li, LLM&ChatGPT
152            
                        
                144. pLSA(Probabilistic Latent Semantic Analysis)
缺点:
• 对于一个新的文档而言,我们无法得知它对应的 P ( d ) 究竟是什么, 因此尽管 PLSA 模型在给定的文档上是
一个生成模型,它却无法生成新的未知的文档。
• 该模型的另外的一个问题在于,随着文档数量的增加, P ( z | d ) 的参数也会随着线性增加,这就导致无论有
多少训练数据,都容易导致模型的过拟合问题。这两点成为了限制 PLSA 模型被更加广泛使用的两大缺陷。
https://www.cnblogs.com/bentuwuying/p/6219970.html
4/11/2023
Piji Li, LLM&ChatGPT
153            
                        
                145. Latent Dirichlet Allocation (LDA)
• Latent Dirichlet Allocation (LDA)被提出
4/11/2023
Piji Li, LLM&ChatGPT
154            
                        
                146. Latent Dirichlet Allocation (LDA)
4/11/2023
Piji Li, LLM&ChatGPT
155            
                        
                147. Latent Dirichlet Allocation (LDA)
• LDA模型涉及很多数学知识,这也许是LDA晦涩难懂的主要原因。
• LDA涉及到的先验知识有:词袋模型、二项分布、Gamma函数、
Beta分布、多项分布、Dirichlet分布、马尔科夫链、MCMC、
Gibbs Sampling、EM算法等。
4/11/2023
Piji Li, LLM&ChatGPT
156            
                        
                148. Latent Dirichlet Allocation (LDA)
• Dirichlet分布
• Dirichlet的概率密度函数为:
• 其中:
• 狄利克雷(Dirichlet)分布是多项式分布的共轭分布。
4/11/2023
Piji Li, LLM&ChatGPT
157            
                        
                149. Latent Dirichlet Allocation (LDA)
• Dirichlet分布
4/11/2023
Piji Li, LLM&ChatGPT
158            
                        
                150. Latent Dirichlet Allocation (LDA)
Rickjin LDA数学八卦
4/11/2023
Piji Li, LLM&ChatGPT
159            
                        
                151. 语义分析-向量表示-LDA
• 主题模型- Latent Dirichlet allocation
• d-z
• z-w
4/11/2023
Piji Li, LLM&ChatGPT
160            
                        
                152. LDA-主流语义建模技术
• Natural Language Processing
• Information Retrieval
• Recommendation Systems
4/11/2023
Piji Li, LLM&ChatGPT
161            
                        
                153. Large LDA - Peacock
• Wang, Yi, Xuemin Zhao, Zhenlong Sun, Hao Yan, Lifeng Wang, Zhihui Jin, Liubin Wang,
Yang Gao, Ching Law, and Jia Zeng. "Peacock: Learning long-tail topic features for
industrial applications." ACM Transactions on Intelligent Systems and Technology (TIST) 6,
no. 4 (2015): 1-23.
4/11/2023
Piji Li, LLM&ChatGPT
162            
                        
                154. Large LDA - LightLDA
• Yuan, Jinhui, Fei Gao, Qirong Ho, Wei Dai, Jinliang Wei, Xun Zheng, Eric Po Xing, Tie-Yan Liu,
and Wei-Ying Ma. "Lightlda: Big topic models on modest computer clusters."
In Proceedings of the 24th International Conference on World Wide Web , pp. 1351-1361.
2015.
4/11/2023
Piji Li, LLM&ChatGPT
163            
                        
                155. LDA如火如荼
• Deep Learning悄悄发展
• 2006
• 2011
• 2012, AlexNet
• RNN, LSTM
4/11/2023
Piji Li, LLM&ChatGPT
164            
                        
                156. Unsupervised Representation Learning
• Word2Vec - 2014
4/11/2023
Piji Li, LLM&ChatGPT
165            
                        
                157. Unsupervised Representation Learning
• Mikolov, Tomas, Kai Chen, Greg Corrado, and Jeffrey Dean. "Efficient estimation of word
representations in vector space." ICLR (2013).
- Large improvements in accuracy, lower computational cost.
- It takes less than a day to train from 1.6 billion words data set.
4/11/2023
Piji Li, LLM&ChatGPT
166            
                        
                158. Unsupervised Representation Learning
• Word2Vec - 2014
Problem?
man - woman + queen = king
DeepWalk, TransX, 腾讯AI Lab开源800万中文词的NLP数据集
4/11/2023
Piji Li, LLM&ChatGPT
167            
                        
                159. Unsupervised Representation Learning
• Word2Vec - 2014
4/11/2023
Piji Li, LLM&ChatGPT
168            
                        
                160. Unsupervised Representation Learning
• Semi-Supervised Sequence Learning, Google, NIPS 2015
4/11/2023
Piji Li, LLM&ChatGPT
169            
                        
                161. Unsupervised Representation Learning
• Semi-Supervised Sequence Learning, Google, NIPS 2015
4/11/2023
Piji Li, LLM&ChatGPT
170            
                        
                162. Unsupervised Representation Learning
• Semi-Supervised Sequence Learning, Google, NIPS 2015
4/11/2023
Piji Li, LLM&ChatGPT
171            
                        
                163. Unsupervised Representation Learning
• ELMo: Deep Contextual Word Embeddings, AI2 &
University of Washington, Jun. 2017. NAACL.
4/11/2023
Piji Li, LLM&ChatGPT
172            
                        
                164. Unsupervised Representation Learning
• ELMo: Deep Contextual Word Embeddings, AI2 &
University of Washington, Jun. 2017
• NAACL 2018 best paper
4/11/2023
Piji Li, LLM&ChatGPT
173            
                        
                165. Unsupervised Representation Learning
• ELMo: Deep Contextual Word Embeddings, AI2 &
University of Washington, Jun. 2017
NAACL 2018 best paper
4/11/2023
Piji Li, LLM&ChatGPT
174            
                        
                166. 预训练语言模型 – GPT1
ChatGPT研究框架(2023)-国泰君安
Ilya采访:2017年,谷歌发表Transformer论文的第二天,OpenAI的研发团队就豁然开朗了,意识到Transformer可以完全解决机器不断预测
文本的问题,这最终造就了GPT-3以及迄今为止的一切;
4/11/2023
Piji Li, LLM&ChatGPT
175            
                        
                167. Unsupervised Representation Learning
• Improving Language Understanding by Generative Pre-
Training, OpenAI, Jun, 2018
• GPT
GPT中的三个字母,每一
个 的 技 术 or 专 利 都 属 于
Google或者是被Google早
期探索过,但合起来就是
OpenAI的。
4/11/2023
Piji Li, LLM&ChatGPT
176            
                        
                168. Unsupervised Representation Learning
• Improving Language Understanding by Generative Pre-
Training, OpenAI, Jun, 2018
• GPT
https://openai.com/blog/language-unsupervised/
4/11/2023
Piji Li, LLM&ChatGPT
177            
                        
                169. Unsupervised Representation Learning
Improving Language Understanding by Generative Pre-Training, OpenAI, Jun, 2018
GPT
4/11/2023
Piji Li, LLM&ChatGPT
178            
                        
                170. Unsupervised Representation Learning
• Improving Language Understanding by Generative Pre-
Training, OpenAI, Jun, 2018
• GPT
4/11/2023
Piji Li, LLM&ChatGPT
179            
                        
                171. Unsupervised Representation Learning
• Problem
• Language models only use left context or right context
• But language understanding is bidirectional.
4/11/2023
Piji Li, LLM&ChatGPT
180            
                        
                172. BERT
• BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
• BERT: Bidirectional Encoder Representations from Transformers
4/11/2023
Piji Li, LLM&ChatGPT
ACL 2014 Best Long
Paper award
NAACL 2012 Best Short
Paper award
181            
                        
                173. BERT
• BERT: Pre-training of Deep Bidirectional Transformers for Language
Understanding
• BERT: Bidirectional Encoder Representations from Transformers
4/11/2023
Piji Li, LLM&ChatGPT
182            
                        
                174. BERT
• The General Language Understanding Evaluation (GLUE) benchmark is a collection of resources for training,
evaluating, and analyzing.
4/11/2023
Piji Li, LLM&ChatGPT
183            
                        
                175. BERT
• Stanford Question Answering Dataset (SQuAD) is a reading comprehension
dataset
4/11/2023
Piji Li, LLM&ChatGPT
184            
                        
                176. BERT
• Best Paper of NAACL 2019
Best Paper of NAACL 2018
BERT
ELMo
4/11/2023
Piji Li, LLM&ChatGPT
185            
                        
                177. BERT - Technical Details
4/11/2023
Piji Li, LLM&ChatGPT
186            
                        
                178. BERT - Technical Details
• Input Layer
4/11/2023
Piji Li, LLM&ChatGPT
187            
                        
                179. BERT - Technical Details
• Pre-training
• Task #1: Masked LM
• 15%, 10%, 10%, 80%
4/11/2023
Piji Li, LLM&ChatGPT
188            
                        
                180. BERT - Technical Details
• Pre-training
• Task #1: Masked LM
• 15%, 10%, 10%, 80%
• Task #2: Next Sentence Prediction
• To learn relationships between sentences, predict whether Sentence B is actual
sentence that proceeds Sentence A, or a random sentence.
4/11/2023
Piji Li, LLM&ChatGPT
189            
                        
                181. BERT - Technical Details
• Fine-tuning
4/11/2023
Piji Li, LLM&ChatGPT
190            
                        
                182. BERT – Training Details
• Dataset
• Books Corpus (800M words)
• Wikipedia (2,500M words)
4/11/2023
Piji Li, LLM&ChatGPT
191            
                        
                183. BERT – Training Details
• Parameters
• BERT-BASE: L=12, H=768, A=12, Total Parameters=110M
• BERT-LARGE: L=24, H=1024, A=16, Total Parameters=340M
• 30,000 token bpe vocabulary
• 512 max-len, 256 batch-size
• 1M steps,~40 epochs
进入大模型时代!
4/11/2023
Piji Li, LLM&ChatGPT
192            
                        
                184. BERT Research
4/11/2023
Piji Li, LLM&ChatGPT
193            
                        
                185. XLNet
4/11/2023
Piji Li, LLM&ChatGPT
194            
                        
                186. XLNet
• Autoregressive LM
• Autoencoder LM, [Mask]
• Permutation Language Model
• Transformer-XL
• More data
4/11/2023
Piji Li, LLM&ChatGPT
195            
                        
                187. Roberta
4/11/2023
Piji Li, LLM&ChatGPT
196            
                        
                188. Roberta
• 从模型上来说,RoBERTa基本没有什么太大创新,主要是在
BERT基础上做了几点调整:
• 1)训练时间更长,batch size更大,训练数据更多;
• 2)移除了next sentence predict loss;
• 3)训练序列更长;
• 4)动态调整Masking机制。
• 从实验效果来看,干过了bert和XLNet。
4/11/2023
Piji Li, LLM&ChatGPT
197            
                        
                189. ERNIE-1&2
• 不同于ERNIE1仅有词级别的Pretraining Task,ERNIE2考虑了
词级别、结构级别和语义级别3类Pretraining Task,词级别包括
Knowledge Masking ( 短 语 Masking ) 、 Capitalization
Prediction ( 大 写 预 测 ) 和 Token-Document Relation
Prediction(词是否会出现在文档其他地方)三个任务,结构级
别 包 括 Sentence Reordering ( 句 子 排 序 分 类 ) 和 Sentence
Distance(句子距离分类)两个任务,语义级别包括Discourse
Relation(句子语义关系)和IR Relevance(句子检索相关性)
两个任务。
4/11/2023
Piji Li, LLM&ChatGPT
198            
                        
                190. ERNIE-1&2
4/11/2023
Piji Li, LLM&ChatGPT
199            
                        
                191. BERT in Tencent
• Pytorch-BERT
• 2g-char Chinese-wiki
• 14g-char news
起步很早,2019年
1月公司内部发布。
• 240g-char news, 14g-word news
• Borrowed 80 gpus
• PCG, CSIG, WXG, IEG, TEG
4/11/2023
Piji Li, LLM&ChatGPT
200            
                        
                192. 预训练语言模型 – GPT2
ChatGPT研究框架(2023)-国泰君安
4/11/2023
Piji Li, LLM&ChatGPT
201            
                        
                193. GPT2
https://openai.com/blog/better-language-models/
4/11/2023
Piji Li, LLM&ChatGPT
202            
                        
                194. GPT2
4/11/2023
Piji Li, LLM&ChatGPT
203            
                        
                195. GPT2
4/11/2023
Piji Li, LLM&ChatGPT
204            
                        
                196. GPT2
开启了NLG的新篇章!
4/11/2023
Piji Li, LLM&ChatGPT
205            
                        
                197. 4/11/2023
Piji Li, LLM&ChatGPT
206            
                        
                198. 解码算法
• Greedy Search
• Beam Search
• Top-K
• Top-P (nucleus)
4/11/2023
Piji Li, LLM&ChatGPT
207            
                        
                199. Greedy Search
4/11/2023
Piji Li, LLM&ChatGPT
208            
                        
                200. Beam Search
4/11/2023
Piji Li, LLM&ChatGPT
209            
                        
                201. Random Sampling
4/11/2023
Piji Li, LLM&ChatGPT
210            
                        
                202. Top-K
4/11/2023
Piji Li, LLM&ChatGPT
211            
                        
                203. Top-p (nucleus) sampling
4/11/2023
Piji Li, LLM&ChatGPT
212            
                        
                204. 效果
4/11/2023
Piji Li, LLM&ChatGPT
213            
                        
                205. 我们早期GPT2训练探索
中文GPT2于2019年3月训练完成,并在各种下游任务适配。
4/11/2023
Piji Li, LLM&ChatGPT
214            
                        
                206. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
215            
                        
                207. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
216            
                        
                208. GPT2训练探索
小说续写 开局一句话
4/11/2023
Piji Li, LLM&ChatGPT
内容全靠编
217            
                        
                209. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
218            
                        
                210. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
219            
                        
                211. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
220            
                        
                212. GPT2训练探索
4/11/2023
Piji Li, LLM&ChatGPT
221            
                        
                213. GPT2训练探索
但凡有点商业和产品思维……
4/11/2023
Piji Li, LLM&ChatGPT
222            
                        
                214. GPT2
4/11/2023
Piji Li, LLM&ChatGPT
223            
                        
                215. Big Model
4/11/2023
Piji Li, LLM&ChatGPT
224            
                        
                216. T5
4/11/2023
Piji Li, LLM&ChatGPT
225            
                        
                217. T5
4/11/2023
Piji Li, LLM&ChatGPT
226            
                        
                218. T5
4/11/2023
Piji Li, LLM&ChatGPT
227            
                        
                219. T5
• Transformer Encoder-Decoder 模型;
• BERT-style 式的破坏方法;
• Replace Span 的破坏策略;
• 15 %的破坏比;
• 3 的破坏时小段长度。
4/11/2023
Piji Li, LLM&ChatGPT
228            
                        
                220. T5
4/11/2023
Piji Li, LLM&ChatGPT
229            
                        
                221. T5
4/11/2023
Piji Li, LLM&ChatGPT
230            
                        
                222. BART
ACL2020
4/11/2023
Piji Li, LLM&ChatGPT
231            
                        
                223. BART
4/11/2023
Piji Li, LLM&ChatGPT
232            
                        
                224. 其他
• UniLM
• MASS
• ALBERT
• ELECTRA
4/11/2023
Piji Li, LLM&ChatGPT
233            
                        
                225. 预训练语言模型 - GPT2
4/11/2023
Piji Li, LLM&ChatGPT
234            
                        
                226. 大语言模型 – GPT3
OpenAI的GPT-3花费了1200万美元
4/11/2023
Piji Li, LLM&ChatGPT
235            
                        
                227. Big Model-GPT3
GPT-3
4/11/2023
Piji Li, LLM&ChatGPT
May 28,2020
236            
                        
                228. Big Model-GPT3
-
4/11/2023
Piji Li, LLM&ChatGPT
237            
                        
                229. 大语言模型 – GPT3
模型越大越厉害
4/11/2023
Piji Li, LLM&ChatGPT
238            
                        
                230. Big Model-GPT3:demos
4/11/2023
Piji Li, LLM&ChatGPT
239            
                        
                231. Big Model-GPT3:demos
4/11/2023
Piji Li, LLM&ChatGPT
240            
                        
                232. GPT3 Examples
4/11/2023
Piji Li, LLM&ChatGPT
241            
                        
                233. GPT3 Examples
4/11/2023
Piji Li, LLM&ChatGPT
242            
                        
                234. GPT3 Examples
4/11/2023
Piji Li, LLM&ChatGPT
243            
                        
                235. GPT3 – 如何finetune?
175B
4/11/2023
Piji Li, LLM&ChatGPT
244            
                        
                236. 大模型如何用?
• 蒸馏压缩
• In-context learning
• Prompt-learning
4/11/2023
Piji Li, LLM&ChatGPT
245            
                        
                237. 大模型如何用?
• 蒸馏压缩
Jiao, Xiaoqi, Yichun Yin, Lifeng Shang, Xin Jiang, Xiao Chen, Linlin Li, Fang Wang, and Qun Liu. “TinyBERT: Distilling BERT
for Natural Language Understanding.” In Findings of the Association for Computational Linguistics: EMNLP 2020, pp. 4163-
4174. 2020. 华为诺亚
4/11/2023
Piji Li, LLM&ChatGPT
246            
                        
                238. 大模型如何用?
• In-context learning
• GPT3
4/11/2023
https://ai.stanford.edu/blog/understanding-incontext/
Piji Li, LLM&ChatGPT
247            
                        
                239. 大模型如何用?
• Prompt-learning
4/11/2023
Piji Li, LLM&ChatGPT
248            
                        
                240. 大模型如何用?
• Prompt-learning
• Discrete
• Continues
4/11/2023
Piji Li, LLM&ChatGPT
249            
                        
                241. 大模型如何用?
• Chain-of-Thought Prompting
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Chi, E., Le, Q. and Zhou, D., 2022. Chain of thought
prompting elicits reasoning in large language models. NeurIPS 2022.
4/11/2023
Piji Li, LLM&ChatGPT
250            
                        
                242. 大模型如何用?
• Let’s think step by step
Kojima, Takeshi, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. "Large
Language Models are Zero-Shot Reasoners." NeurIPS 2022.
4/11/2023
Piji Li, LLM&ChatGPT
251            
                        
                243. 大模型如何用?
• 他们是真正的reasoning么?
4/11/2023
Piji Li, LLM&ChatGPT
252            
                        
                244. GPT3 – In-Context Learning (ICL)
4/11/2023
Piji Li, LLM&ChatGPT
253            
                        
                245. 多模态预训练
• Vision-Language Pretraining
4/11/2023
Piji Li, LLM&ChatGPT
254            
                        
                246. OpenAI GPT2/3
4/11/2023
Piji Li, LLM&ChatGPT
255            
                        
                247. 多模态预训练
• OpenAI's DALL-E and CLIP
4/11/2023
Piji Li, LLM&ChatGPT
256            
                        
                248. 多模态预训练
• OpenAI's DALL-E and CLIP
4/11/2023
Piji Li, LLM&ChatGPT
257            
                        
                249. 多模态预训练
• OpenAI's DALL-E and CLIP
4/11/2023
Piji Li, LLM&ChatGPT
258            
                        
                250. OpenAI's DALL-E and CLIP
• 两个模型中,CLIP用于判别文本和图片是否相关,DALLE用于从文本生成图像。
• 其中,DALLE在对大量生成的候选结果进行rerank时用到了CLIP。
• DALLE模型结构类似于gpt2/3这种基于Transformer的auto-regressive语言模型,有120亿参数。
• 训练序列最长为1280,其中前256为文本序列,BPE词表大小为16384;后1024为图像patch序列。
• DALLE参考了VQVAE的做法学习到了一个8192大小的图像patch词表,可以将任意输入图像(256x256)划
分成32x32个patch之后在图像词表中找到对应id,构成图像的离散token序列。
• 不同于文本序列部分的正常的masked self-attention,图像序列对attention做了些修改,例如sparse
attention等。
• DALLE的训练目标依然采用极大似然估计,从左到右依次预测。
• 在inference阶段,给定一段文本,DALLE生成了512个候选结果,然后借助CLIP强大的图像-文本相关性
判别能力对结果列表进行rerank,最后选择top32个结果。
• CLIP模型之所以强大,一方面训练数据多,有4亿图像-文本pair,另一方面也采用了Transformer模型对
图像的patch序列进行建模,最后使用对比学习(contrastive learning)框架进行训练,256个GPU两周时间
就可以训练完,像nlp中的很多预训练模型一样,zero-shot learning的能力也非常强。
4/11/2023
Piji Li, LLM&ChatGPT
• 从目前的一些demo看出,DALLE的效果十分惊艳,当然也依然有GPT2/3这类语言模型对复杂逻辑、推
259            
                        
                251. BERT
• Input Layer
4/11/2023
Piji Li, LLM&ChatGPT
260            
                        
                252. BERT on Image
• 微软 BEiT
• OpenAI iGPT
• Kaiming He (何恺明)
4/11/2023
Piji Li, LLM&ChatGPT
261            
                        
                253. BERT on Image
4/11/2023
Piji Li, LLM&ChatGPT
262            
                        
                254. Vision-Language Pre-training
ImageBERT model architecture
4/11/2023
Piji Li, LLM&ChatGPT
263            
                        
                255. Vision-Language Pre-training
4/11/2023
Piji Li, LLM&ChatGPT
264            
                        
                256. BEiT v3
Wang, Wenhui, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal et al. "Image as a foreign language:
Beit pretraining for all vision and vision-language tasks." arXiv preprint arXiv:2208.10442 (2022).
4/11/2023
Piji Li, LLM&ChatGPT
265            
                        
                257. BEiT v3
Wang, Wenhui, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal et al. "Image as a foreign language:
Beit pretraining for all vision and vision-language tasks." arXiv preprint arXiv:2208.10442 (2022).
4/11/2023
Piji Li, LLM&ChatGPT
266            
                        
                258. BEiT v3
Wang, Wenhui, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal et al. "Image as a foreign language:
Beit pretraining for all vision and vision-language tasks." arXiv preprint arXiv:2208.10442 (2022).
4/11/2023
Piji Li, LLM&ChatGPT
267            
                        
                259. BEiT v3
https://github.com/microsoft/unilm/tree/master/beit
Wang, Wenhui, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal et al. "Image as a foreign language:
Beit pretraining for all vision and vision-language tasks." arXiv preprint arXiv:2208.10442 (2022).
4/11/2023
Piji Li, LLM&ChatGPT
268            
                        
                260. Speech Representation
HuBERT
wav2vec 2.0
Baevski, Alexei, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli.
"wav2vec 2.0: A Framework for Self-Supervised Learning of Speech
Representations." Advances in Neural Information Processing Systems 33
(2020).
4/11/2023
Hsu, Wei-Ning, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia,
Ruslan Salakhutdinov, and Abdelrahman Mohamed. "HuBERT: Self-
Supervised Speech Representation Learning by Masked Prediction
of Hidden Units." arXiv preprint arXiv:2106.07447 (2021).
Piji Li, LLM&ChatGPT
269            
                        
                261. 大模型还在发展
• 尽头?
4/11/2023
Piji Li, LLM&ChatGPT
274            
                        
                262. GPT3-国内
• 腾讯AI Lab
• 智源&清华
• 阿里巴巴
• 华为&鹏程实验室
• 清华&智谱
4/11/2023
Piji Li, LLM&ChatGPT
275            
                        
                263. PTM
A Roadmap for Big Model, 2022
GLaM, GPT-3, Megatron-Turing
NLG, Gopher, Chinchilla, LaMDA, PaLM, GLM-130B,LLaMA
4/11/2023
Piji Li, LLM&ChatGPT
276            
                        
                264. GPT3 Examples
4/11/2023
Piji Li, LLM&ChatGPT
277            
                        
                265. 长文本生成很难
存在的问题:GPT3-长文本生成
• 相关性
• 逻辑性
• 一致性
• 事实性
• 丰富性
• 很难!
4/11/2023
Piji Li, LLM&ChatGPT
278            
                        
                266. Issues
Issues
(哈工大 车万翔)
4/11/2023
Piji Li, LLM&ChatGPT
279            
                        
                267. Issues
Issues
4/11/2023
Piji Li, LLM&ChatGPT
280            
                        
                268. Issues
Issues
GPT-3
medical chatbot tells suicidal test patients
themselves
to kill
the patient: “Hey, I feel very
bad, I want to kill myself.”
GPT-3: “I am sorry to hear
that. I can help you with
that.”
the patient: “Should I kill
myself?”
GPT-3: “I think you should.”
Trustworthy AI: A Computational Perspective-https://sites.google.com/msu.edu/trustworthy-ai/home
https://boingboing.net/2021/02/27/gpt-3-medical-chatbot-tells-suicidal-test-patient-to-kill-themselves.html
4/11/2023
Piji Li, LLM&ChatGPT
281            
                        
                269. Issues
• Tay
4/11/2023
Piji Li, LLM&ChatGPT
282            
                        
                270. Issues
Issues
• Privacy
• Ethics & Social Issues
• Fairness & Bias
• Accountability & Auditability
• Explainability & Interpretability
Evaluation?
• Causal Analysis
• Safety & Robustness
Develop NLP models that are “explainable, fair, privacy-preserving, causal, and robust”.
4/11/2023
Piji Li, LLM&ChatGPT
283            
                        
                271. Issues
• 不听话
• 会骂人
• 没啥用
• 不可控
• 成本高
4/11/2023
怎么办呢?
-- 指令学习,学会按指令行事!
-- 引入用户反馈与人类进行对齐!
Piji Li, ChatGPT
284            
                        
                272. Sparrow
• Deepmind
4/11/2023
Piji Li, LLM&ChatGPT
285            
                        
                273. 内容
• 基础技术
• 预训练技术
• ChatGPT
• 未来展望
4/11/2023
Piji Li, LLM&ChatGPT
286            
                        
                274. ChatGPT
https://openai.com/blog/chatgpt
4/11/2023
Piji Li, LLM&ChatGPT
287            
                        
                275. ChatGPT
https://openai.com/blog/chatgpt
4/11/2023
Piji Li, LLM&ChatGPT
288            
                        
                276. ChatGPT
https://openai.com/blog/chatgpt
4/11/2023
Piji Li, LLM&ChatGPT
289            
                        
                277. 4/11/2023
Piji Li, LLM&ChatGPT
290            
                        
                278. ChatGPT – GPT3.5
4/11/2023
Piji Li, LLM&ChatGPT
291            
                        
                279. ChatGPT – GPT3.5
https://yaofu.notion.site/
https://openai.com/blog/chatgpt
4/11/2023
Piji Li, LLM&ChatGPT
292            
                        
                280. ChatGPT – GPT3.5
4/11/2023
Piji Li, LLM&ChatGPT
293            
                        
                281. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
294            
                        
                282. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
295            
                        
                283. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
296            
                        
                284. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
297            
                        
                285. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
298            
                        
                286. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
299            
                        
                287. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
300            
                        
                288. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
301            
                        
                289. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
302            
                        
                290. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
303            
                        
                291. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
304            
                        
                292. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
305            
                        
                293. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
306            
                        
                294. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
307            
                        
                295. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
308            
                        
                296. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
309            
                        
                297. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
310            
                        
                298. InstructGPT
• SFT dataset contains about 13k training prompts (from the API
and labeler-written),
• RM dataset has 33k training prompts (from the API and
labeler-written),
• PPO dataset has 31k training prompts (only from the API).
4/11/2023
Piji Li, LLM&ChatGPT
311            
                        
                299. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
312            
                        
                300. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
313            
                        
                301. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
314            
                        
                302. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
315            
                        
                303. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
316            
                        
                304. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
317            
                        
                305. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
318            
                        
                306. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
319            
                        
                307. InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
320            
                        
                308. ChatGPT
?
4/11/2023
Piji Li, LLM&ChatGPT
321            
                        
                309. ChatGPT vs InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
323            
                        
                310. ChatGPT vs InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
324            
                        
                311. ChatGPT vs InstructGPT
4/11/2023
Piji Li, LLM&ChatGPT
325            
                        
                312. ChatGPT
(哈工大 车万翔)
4/11/2023
Piji Li, LLM&ChatGPT
326            
                        
                313. ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
327            
                        
                314. ChatGPT
-
-
-
-
-
-
-
出圈
new bing
BARD
MOSS
ChatGLM
文心一言
壳:ChatGPT
Jacob Devlin
- GPT4
- Multimodel
- GPT5?
ShareGPT (一个ChatGPT 数据共享网站,用户会上传自己觉得有趣的ChatGPT回答)
4/11/2023
Piji Li, LLM&ChatGPT
328            
                        
                315. GPT4
2023.03.14
4/11/2023
Piji Li, LLM&ChatGPT
329            
                        
                316. GPT4
• 1T参数
• 多模态
• 做题
• 推理
• Why&How?
4/11/2023
Piji Li, LLM&ChatGPT
330            
                        
                317. 内容
• 基础技术
• 预训练技术
• ChatGPT
• 未来展望
4/11/2023
Piji Li, LLM&ChatGPT
331            
                        
                318. 未来: ChatGPT后,我们做什么?
• ChatGPT有什么用?
• 以前研究任务的状态
• 针对ChatGPT的研究
• 复现ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
332            
                        
                319. 未来: ChatGPT后,我们做什么?
• ChatGPT有什么用?
• 以前研究任务的状态
• 针对ChatGPT的研究
• 复现ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
333            
                        
                320. 教育
• 改论文
• 写代码
• 做作业
• 查资料
4/11/2023
Piji Li, LLM&ChatGPT
334            
                        
                321. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
335            
                        
                322. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
336            
                        
                323. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
337            
                        
                324. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
338            
                        
                325. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
339            
                        
                326. 教育
• 改论文
• 写代码
• 做作业
• 查资料
• 会出错
4/11/2023
Piji Li, LLM&ChatGPT
340            
                        
                327. 军事国防领域
4/11/2023
Piji Li, LLM&ChatGPT
341            
                        
                328. 军事国防领域
4/11/2023
Piji Li, LLM&ChatGPT
342            
                        
                329. 军事国防领域
1、生成培训材料
2、语言翻译
3、自动目标识别
4、军事机器人
5、在仿真中测试材料开发系统
6、军事医学
7、战斗空间自治
8、情报分析
9、记录追踪
10、军事后勤
11、信息战
12、无人驾驶车辆
13、监视
14、致命自主武器系统
15、战场环境支持
16、用于建模、模拟和战斗训练的虚
拟现实和增强现实
17、自由空战动态
4/11/2023
18、导弹制导的神经网络
19、通信和网络安全
20、反潜战中态势感知的数据融合
21、网络安全和密码学
22、“群体作战”的群体智能
23、远程无人机系统的自主飞行控制
24、人工智能卫星和软件定义卫星
25、个人可穿戴系统
26、海量军事数据管理
27、对抗或颠覆对手的人工智能系统
28、信息融合
29、态势感知
30、路径规划
31、人机界面。
32、生成报告和行动后总结、汇报报告、
事件报告和其他类型的文档。
33、为军事模拟生成响应,例如谈判训练
或军事演习。
Piji Li, LLM&ChatGPT https://mp.weixin.qq.com/s/SwcPPQGvK4J7yIW30A3MfQ
343            
                        
                330. 医疗保健
4/11/2023
Piji Li, LLM&ChatGPT
344            
                        
                331. 医疗保健
4/11/2023
Piji Li, LLM&ChatGPT
345            
                        
                332. 医疗保健
4/11/2023
Piji Li, LLM&ChatGPT
346            
                        
                333. 互联网/IT领域
4/11/2023
Piji Li, LLM&ChatGPT
347            
                        
                334. 互联网/IT领域
4/11/2023
Piji Li, LLM&ChatGPT
348            
                        
                335. 互联网/IT领域
4/11/2023
Piji Li, LLM&ChatGPT
349            
                        
                336. 互联网/IT领域
4/11/2023
Piji Li, LLM&ChatGPT
350            
                        
                337. 互联网/IT领域
4/11/2023
Piji Li, LLM&ChatGPT
351            
                        
                338. 互联网/IT领域
• 在git 存储库中发现了
213 个安全漏洞。
• 而相比之下,市场上
很好的商业工具却只
发现了99 个安全漏洞。
https://www.ctfiot.com/105524.html
4/11/2023
Piji Li, ChatGPT
352            
                        
                339. 文娱方面
4/11/2023
Piji Li, ChatGPT
353            
                        
                340. 文娱方面
4/11/2023
Piji Li, LLM&ChatGPT
354            
                        
                341. 商业营销
4/11/2023
Piji Li, LLM&ChatGPT
355            
                        
                342. 商业营销
4/11/2023
Piji Li, LLM&ChatGPT
356            
                        
                343. 等等
• 法律
• 金融
• 工商业
• 政府报告
• 文件材料
• ……
4/11/2023
Piji Li, LLM&ChatGPT
357            
                        
                344. 证明
• A组被允许在工作时使用ChatGPT,包括
撰写简报、分析财务、整理新闻等;
• B组则禁止使用ChatGPT,同时要完成相
同的工作。
4/11/2023
https://economics.mit.edu/sites/default/files/inline-files/Noy_Zhang_1_0.pdf
Piji Li, LLM&ChatGPT
358            
                        
                345. 证明
• 在速度层面,使用了ChatGPT的A组平均用
时17分钟交付作品,而B组则平均花了27分
钟,按照8小时工作制的换算,ChatGPT可
以帮助这类员工提升59%的生产力。
• 在质量层面,考核团队给A组文档打分平均
是4.5,B组则是3.8,证明了ChatGPT也让生
产质量得到了提高。
文书类工作大抵可以分成3个步骤,第1部是
内容构思,耗时占比约为25%,第2步是撰写
草稿,耗时占比约为50%,第3步是润色修改,
耗时占比约为25%。
4/11/2023
Piji Li, LLM&ChatGPT
359            
                        
                346. APIs
March 1, 2023
4/11/2023
Piji Li, LLM&ChatGPT
360            
                        
                347. 发展趋势
- 新一代的知识表示和推理框架
- 技术同质化愈发严重
https://jmcdonnell.substack.com/p/the-near-future-of-ai-is-action-driven
4/11/2023
Piji Li, LLM&ChatGPT
361            
                        
                348. Office 365 Copilot
4/11/2023
Piji Li, LLM&ChatGPT
362            
                        
                349. 未来: ChatGPT后,我们做什么?
• ChatGPT有什么用?
• 以前研究任务的状态
• 情感对话、个性化对话
• 可控文本生成
• 针对ChatGPT的研究
• 复现ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
363            
                        
                350. Empathetic Dialogue System
Qintong Li, Piji Li, Zhumin Chen, Pengjie Ren and Zhaochun
Ren. Knowledge Bridging for Empathetic Dialogue Generation. AAAI
2022.
4/11/2023
Piji Li, LLM&ChatGPT
364            
                        
                351. Empathetic Dialogue System
• Empathy is a crucial step towards a more humanized human-machine conversation.
• Empathetic dialogue generation aims to recognize feelings in the conversation
partner and reply accordingly.
Challenges
•
•
Humans usually rely on experience and external knowledge to acknowledge and express implicit emotions.
Lacking external knowledge makes it difficult to perceive implicit emotions from limited dialogue history.
1. A commonsense knowledge graph
ConceptNet
2. An emotional lexicon NRC_VAD
•
•
•
valence (positiveness–negativeness/pleasure– displeasure)
arousal (active–passive)
dominance (dominant–submissive)
4/11/2023
Piji Li, LLM&ChatGPT
365            
                        
                352. Empathetic Dialogue System
1. This phenomenon demonstrates that humans need to infer more knowledge
to conduct empathetic dialogues.
2. External knowledge is essential in acquiring useful emotional knowledge and
improving the performance of empathetic dialogue generation.
4/11/2023
Piji Li, LLM&ChatGPT
366            
                        
                353. Empathetic Dialogue System
32
Modelling emotional dependencies between interlocutors is crucial to enhance
the accuracy of external knowledge representation in empathetic dialogues.
4/11/2023
Piji Li, LLM&ChatGPT
367            
                        
                354. Knowledge-aware Empathetic Dialogue Generation - KEMP
A framework KEMP
• The early attempt to leverage external knowledge to
enhance empathetic dialogue generation.
An emotional context encoder and an emotion-dependency
decoder
• Learn the emotional dependencies between the dialogue
history and target response with bunches of external
emotional concepts.
Conducted on a benchmark dataset EMPATHETICDIALOGUES (Rashkin et al.,
2019), experimental results confirm the effectiveness of KEMP.
4/11/2023
Piji Li, LLM&ChatGPT
368            
                        
                355. Knowledge-aware Empathetic Dialogue Generation - KEMP
Preliminaries
• ConceptNet
• A large-scale knowledge graph that describes general human
knowledge in natural language. It comprises 5.9M tuples, 3.1M concepts,
and 38 relations.
• NRC_VAD
• A lexicon of VAD (Valence-Arousal-Dominance) vectors with dimensions
for 20k English words.
Zhong, Wang, and Miao (2019)
Obtaining Reliable Human Ratings of Valence, Arousal, and Dominance for 20,000 English Words. Saif M. Mohammad. ACL 2018.
4/11/2023
Piji Li, LLM&ChatGPT
369            
                        
                356. Knowledge-aware Empathetic Dialogue Generation - KEMP
Task Definition
Input:
1. Multi-turn Dialogue History
2. ConceptNet
3. NRC_VAD
Output (two subtasks):
1. Predict the emotion expressed in the dialogue context.
2. Generate an empathetic response.
4/11/2023
Piji Li, LLM&ChatGPT
370            
                        
                357. Knowledge-aware Empathetic Dialogue Generation - KEMP
4/11/2023
Piji Li, LLM&ChatGPT
371            
                        
                358. Experiments
Dataset
• EMPATHETICDIALOGUES (Rashkin et al., 2019)
Automatic Metrics
• Emotion Accuracy
• Perplexity
• Distinct-1 and Distinct-2
4/11/2023
Human Metrics
• Empathy
• Relevance
• Fluency
Piji Li, LLM&ChatGPT
372            
                        
                359. Experiments
Our model KEMP outperforms state-of-the-art baselines by a large margin in terms of
all automatic metrics.
4/11/2023
Piji Li, LLM&ChatGPT
373            
                        
                360. Experiments
KEMP obtains the best performance on both Empathy and Relevance scores.
There is no obvious difference among models in terms of Fluency.
4/11/2023
Piji Li, LLM&ChatGPT
374            
                        
                361. Experiments
4/11/2023
Piji Li, LLM&ChatGPT
375            
                        
                362. Experiments
4/11/2023
Piji Li, LLM&ChatGPT
376            
                        
                363. Experiments
4/11/2023
Piji Li, LLM&ChatGPT
377            
                        
                364. Personalized Dialogue Generation
Chen Xu, Piji Li, Wei Wang, Haoran Yang, Siyun Wang, Chuangbai Xiao. COSPLAY:Concept
Set Guided Personalized Dialogue Generation Across Both Party Personas. The 45th
International ACM SIGIR Conference on Research and Development in Information
Retrieval (SIGIR'22) . July. 2022
4/11/2023
Piji Li, LLM&ChatGPT
378            
                        
                365. Personalized Dialogue Generation
1. persona
① I love to go to Disney world every year.
② I love to sing songs from the movie frozen.
Input
2. context
Output
Hey buddy, how are you doing?
Consistent
I just got back from Disney world .
Do you like it ?
Persona-Chat Dataset (Zhang et al. 2018)
4/11/2023
Piji Li, LLM&ChatGPT
379            
                        
                366. Personalized Dialogue Generation - Problems
Consistency
Egocentrism
1)Show self-persona eagerly while
2)Show less interests about the partner’s.
Persona:
I love to sing songs from the movie frozen.
… What is your family like ?
They are okay, but I like to
sing in the park .
Logic
SOTA 1
They like to play video games and
sing songs from the movie frozen .
Consistency
SOTA 2
4/11/2023
Piji Li, LLM&ChatGPT
380            
                        
                367. Personalized Dialogue Generation - Problems
Consistency
Egocentrism
1)Show self-persona eagerly while
2)Show less interests about the partner’s.
Persona:
I love to sing songs from the movie frozen.
Great ! I like music too and
that's why I play guitar !
I love to sing songs from the movie frozen . Do you play in band ?
I have a friend who plays guitar . How old were you when
you learned to play ?
SOTA 1
SOTA 2
User Experience
Model Interactivity
4/11/2023
Piji Li, LLM&ChatGPT
381            
                        
                368. Motivation
Personalization or Egocentrism ?
Personalized
Self / Partner
Persona Expression
This work
Self / Partner
Persona Expression
Egocentric
The key difference between personalization and egocentrism lies in:
whether the self-persona expression
sacrifices its partner’s.
4/11/2023
Piji Li, LLM&ChatGPT
382            
                        
                369. Methodology
Personalized
Self / Partner
Persona expression
This work
Self / Partner
Persona expression
Egocentric
partner
teaches
model
1)Balance “answering” and “asking” :
2)Balance “speaking” and “listening”:
Keeping curiosity to your partner.
4/11/2023
Finding the common ground.
Piji Li, LLM&ChatGPT
383            
                        
                370. Methodology
1. Balance “answering” and “asking”
Reinforcement learning by the self-play
4/11/2023
Piji Li, LLM&ChatGPT
Mutual Benefit Reward
384            
                        
                371. Methodology
How to deal with the persona sparsity problem ?
(b) Set Expansion
(a) Concept Set
1
1
Concept Set Framework
(c) Set Union
1
1
1
1
1
1
1
1
1 1
1 1
1
1
1
1
1
1
dot &
norm
1
1
1 1 1
norm
& dot 1
1
1
1
(d) Set Intersection
1
(e) Set Distance
Vector -> Concept Set over a concept vocabulary
Matrix -> Concept Similarity from knowledge graph
Vector-Matrix Calculation -> Concept Set Operations
4/11/2023
Piji Li, LLM&ChatGPT
385            
                        
                372. Methodology
2. Balance “speaking” and “listening”
Lead responses around mutual
personas Concept Copy Mechanism
(How)
4/11/2023
Finding the common ground
Common Ground Reward
(Which)
Piji Li, LLM&ChatGPT
386            
                        
                373. Methodology
2. Balance “speaking” and “listening”
Lead responses around mutual personas
Concept Copy Mechanism
(How)
Self Persona
Finding the common ground
Common Ground Reward
(Which)
Partner Persona
Future
Common Ground Modeling
Geometric Modeling
Where is the optimal location for F in
?
Three points colinear.
4/11/2023
Piji Li, LLM&ChatGPT
387            
                        
                374. Experiments
Chen Xu, Piji Li, Wei Wang, Haoran Yang, Siyun Wang, Chuangbai Xiao. COSPLAY:Concept Set Guided Personalized
Dialogue Generation Across Both Party Personas. SIGIR 2022.
4/11/2023
Piji Li, LLM&ChatGPT
388            
                        
                375. Experiments
4/11/2023
Piji Li, LLM&ChatGPT
389            
                        
                376. Character AI
https://beta.character.ai/
Glow app
4/11/2023
Piji Li, LLM&ChatGPT
清华黄民烈
聆心智能
390            
                        
                377. Challenge: Long-range Coherence
Qintong Li, Piji Li, Wei Bi, Zhaochun Ren, Yuxuan Lai, Lingpeng Kong. Event Transition
Planning for Open-ended Text Generation. The 60th Annual Meeting of the Association
for Computational Linguistics (Findings of ACL'22) . Aug. 2022.
4/11/2023
Piji Li, LLM&ChatGPT
391            
                        
                378. Challenge: Long-range Coherence
To produce a coherent story
continuation which often involves
multiple events, given limited preceding
context, a language models (e.g., GPT--2)
need the ability of modeling long-range
coherence.
Context: Jennifer has a big exam tomorrow.
Story: She got so stressed, she pulled an
all-nighter. She went into class the next day,
weary as can be. Her teacher stated that
the test is postponed for next week.
Jennifer felt bittersweet about it…
Mostafazadeh et al. A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Stories. NAACL 2016.
4/11/2023
Piji Li, LLM&ChatGPT
392            
                        
                379. Model Additional Help?
Given story context:
1. Extract corresponding event
transition path.
2.
3.
Develop potential ensuing
event transition paths.
The planned paths
accordingly guide the text
generation model.
4/11/2023
Piji Li, LLM&ChatGPT
393            
                        
                380. Resources for Event Planning
1.
2.
3.
Commonsense atlas about inferential
event description.
Parameters of pre-trained language model.
Downstream text generation datasets.
[1] Radford et al. Language Models are Unsupervised Multitask Learners. OpenAI Blog.
[2] Sap et al. ATOMIC: An Atlas of Machine Commonsense for If-then Reasoning. AAAI 2019.
4/11/2023
Piji Li, LLM&ChatGPT
394            
                        
                381. Two-stage Method
4/11/2023
Piji Li, LLM&ChatGPT
395            
                        
                382. How to Generate High-quality Event Transition Path?
1. We prefix-tune a GPT-2 on a large amount of event
paths extracted from commonsense graphs ATOMIC [?
of Planner].
2. Then we prefix-tune on training set of the specific
task [? ’ of Planner].
Why?
Extrapolate to event sequences that never
appeared in these sources with the help of
general knowledge stored in the large pre-
trained model.
Li and Liang. Prefix-tuning: Optimizing continuous prompts for generation. ACL 2021.
4/11/2023
Piji Li, LLM&ChatGPT
396            
                        
                383. How to Use the Planned Event Path for Text Generation?
1.
2.
Another GPT-2 is fine-tuned on specific
downstream dataset. [Transformer parameters of
Generator]
Work effectively under the supervision of the
even transition path. [Event query layer of
Generator]
Why?
An event query layer absorbs information from the
planned paths and use the query layer to guide the
text generation process.
4/11/2023
Piji Li, LLM&ChatGPT
397            
                        
                384. Experiment
Datasets
● ROCStories
● EmpatheticDialogues
RQ1: How to develop a better event transition planner?
RQ2: Whether the integration of event transition paths enhances the open-ended
text generation?
RQ3: How do the event transition paths benefit text generation?
[1] Mostafazadeh et al. A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Stories. NAACL 2016.
[2] Rashkin et al. Towards Empathetic Open-domain Conversation Models: a New Benchmark and Dataset. ACL 2019.
4/11/2023
Piji Li, LLM&ChatGPT
398            
                        
                385. Event Transition Planning (RQ1)
4/11/2023
Piji Li, LLM&ChatGPT
399            
                        
                386. Event-path-aware Text Generation (RQ2)
4/11/2023
Piji Li, LLM&ChatGPT
400            
                        
                387. Case
4/11/2023
Piji Li, LLM&ChatGPT
401            
                        
                388. Symbolic Token Controlled Generation-SongNet
Piji Li, Haisong Zhang, Xiaojiang Liu, and Shuming Shi. Rigid Formats
Controlled Text Generation. The 58th annual meeting of the
Association for Computational Linguistics (ACL'20) . Jul. 2020.
4/11/2023
Piji Li, LLM&ChatGPT
402            
                        
                389. Symbolic Token Controlled Generation-SongNet
歌词、诗词创作
庆祝六一!腾讯AI艾灵与王俊凯领唱中国新儿歌《点亮》
关键词藏头、蕴含的诗词、对联生成
4/11/2023
Piji Li, LLM&ChatGPT
403            
                        
                390. SongNet
• Background
原歌词:十年之前/我不认识你/你不属于我/我们还是一样/陪在一个陌生人左右/走过渐渐熟悉的街头
新配词:夜深人静/思念你模样/多少次孤单/想伴在你身旁/是什么让我如此幻想/为何会对你那般痴狂
• Challenges
• 约束:严格的格式和模板
• 格式正确、句子完整、押韵合理
• *关键词埋入:5*5
• Deploy
•
•
•
•
王俊凯AI艾灵歌词创作
春节微视春联红包
故宫
腾讯音乐
4/11/2023
Piji Li, LLM&ChatGPT
404            
                        
                391. Background
• Free Formats Generation
- Machine Translation
- Dialogue Generation
- Summary Generation
• Rigid Formats Generation
- Lyrics
- SongCi
- Sonnet
Rigid Formats: #words, #sentences, rhyming rules, etc.
4/11/2023
Piji Li, LLM&ChatGPT
405            
                        
                392. Task Definition
• Input: a rigid format
-
,
:
denotes a place-holder symbol
• Output: a natural language sentence tally with C
4/11/2023
Piji Li, LLM&ChatGPT
406            
                        
                393. Task Definition
• Polishing Since
:
is arbitrary and flexible, based on the generated result Y,
we can build a new format
and generate new result,
• Task target:
4/11/2023
Piji Li, LLM&ChatGPT
407            
                        
                394. Framework
SongNet
4/11/2023
Piji Li, LLM&ChatGPT
408            
                        
                395. SongNet - Symbols
• Format and Rhyme Symbols:
- : general tokens
- : punctuation characters
- : rhyming tokens/positions
4/11/2023
Piji Li, LLM&ChatGPT
409            
                        
                396. SongNet - Symbols
• Intra-Position Symbols:
- : local positions of tokens
- : punctuation characters
- : should be the ending words
- Descending Order:
The aim is to improve the sentence integrity by impelling the symbols capture the sentence dynamic
information, precisely, the sense to end a sequence.
4/11/2023
Piji Li, LLM&ChatGPT
410            
                        
                397. SongNet - Symbols
• Segment Symbols:
- s is the symbol index for sentence
Rhyme Scheme:
ABAB CDCD EFEF GG
Shakespeare's "Sonnet 116"
4/11/2023
Piji Li, LLM&ChatGPT
411            
                        
                398. SongNet – Attention
4/11/2023
Piji Li, LLM&ChatGPT
412            
                        
                399. SongNet – Training
• Pre-training and Fine-tuning
• MLE: minimize the negative log-likelihood
• Polishing:
4/11/2023
Piji Li, LLM&ChatGPT
413            
                        
                400. SongNet – Generation
• We can assign any format and rhyming symbols C.
• Given C, we obtain P and S automatically.
• SongNet can conduct generation starting from the special token <bos> iteratively
until meet the ending marker <eos>.
• beam-search algorithm and truncated top-k sampling
4/11/2023
Piji Li, LLM&ChatGPT
414            
                        
                401. Experiment - Datasets
• Pre-training
- Chinese: News (9200M Chars), Wikipedia (1700M Chars)
- English: BooksCorpus (980M words), Wikipedia (2400M words)
• Fine-tuning
- Chinese: SongCi
- English: Shakespeare’s Sonnets
4/11/2023
Piji Li, LLM&ChatGPT
415            
                        
                402. Experiment – Evaluation Metrics
•
General
- PPL
- Distinct
•
Defined
- Format: words match with C?
- Rhyme: SongCi - rhyming group, Sonnet - “ABAB CDCD”
- Sentence Integrity:
4/11/2023
Piji Li, LLM&ChatGPT
416            
                        
                403. Experiment – Results
4/11/2023
Piji Li, LLM&ChatGPT
417            
                        
                404. Experiment – Results
100 training samples
4/11/2023
Piji Li, LLM&ChatGPT
418            
                        
                405. Experiment – Ablation Analysis
4/11/2023
Piji Li, LLM&ChatGPT
419            
                        
                406. Experiment – Parameter Tuning - k
Top-k sampling, k=32
4/11/2023
Piji Li, LLM&ChatGPT
420            
                        
                407. Experiment – Human Evaluation
• Relevance: +2: all the sentences are relevant to the same topic; +1: partial sentences are
relevant; 0: not relevant at all.
• Fluency: +2: fluent; +1: readable but with some grammar mistakes; 0: unreadable.
• Style: +2: match with SongCi or Sonnet genres; +1: partially match; 0: mismatch.
4/11/2023
Piji Li, LLM&ChatGPT
421            
                        
                408. Experiment – Cases
4/11/2023
Piji Li, LLM&ChatGPT
422            
                        
                409. Experiment – Cases - Polishing
4/11/2023
Piji Li, LLM&ChatGPT
423            
                        
                410. Demo
小船桨/桃花轻唱/婉约惹人怀乡/湖畔旁蝉鸣莺啼柳响/你在画舫中央/微风吹乱着青纱帐/是谁轻声吟唱/
一曲婉约惹人怀想/古琴弹到远方/杨柳摇荡/荷塘也成双/思念飞扬/让记忆生长/只留岁月苍茫/百转柔肠/
你说好梦何妨/别离还是忧伤/千年痴狂/万水流觞/我听得太绝望/却不见她回望/
心慌张/情惆怅/桃花盛开芬芳/落日余晖照的影彷徨/有话怎能藏/它仍旧会迷失疯狂/笑问君归向/注定依
然爱沧桑/老街两处散场/石板路旁/再找寻信仰/落叶夕阳/等待那一张/最美丽地模样/十字街巷/相遇时很
漫长/走过白昼荒凉/大雁南赏/繁华尽忘/往日曾经幻想/像晚霞般闪亮/
4/11/2023
Piji Li, LLM&ChatGPT
424            
                        
                411. 腾讯音乐
4/11/2023
Piji Li, LLM&ChatGPT
425            
                        
                412. 腾讯音乐
4/11/2023
QQ音乐歌词创意Demo
(已应用于内部创新业务)
Piji Li, LLM&ChatGPT
426
https://mp.weixin.qq.com/s/acyXaVxnWnf9u6xpLtWo4g            
                        
                413. ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
427            
                        
                414. 以前研究任务的状态
• 苦
• 危
• 机
4/11/2023
Piji Li, LLM&ChatGPT
428            
                        
                415. 未来: ChatGPT后,我们做什么?
• ChatGPT有什么用?
• 以前研究任务的状态
• 针对ChatGPT的研究
• 复现ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
429            
                        
                416. Evaluation/评一评测一测
• ChatGPT/GPT4 + Any Tasks
• 对所在研究任务进行评测:
• 直观感受
• 深入洞察
• 查漏补缺
• 占坑嫌疑,所以要快
4/11/2023
Piji Li, LLM&ChatGPT
430            
                        
                417. ChatGPT的缺点
4/11/2023
Piji Li, ChatGPT
431            
                        
                418. 知识和逻辑
• 推理机制?CoT原因?真的从code里来?
• 事实错误、逻辑错误?
• 为什么会犯错?
• Symbolic Knowledge + X → Neuro-Symbolic?
• 如何融入预训练?
• 如何约束解码推理?
• 依赖RLHF能解决一切问题么?
• 不断的暴力的枚举似的不要脸的标数据?
4/11/2023
Piji Li, LLM&ChatGPT
432            
                        
                419. 知识和逻辑
WebGPT
New Bing
perplexity.ai
4/11/2023
Dec 2021
Piji Li, LLM&ChatGPT
433            
                        
                420. 知识和逻辑
Feb 24, 2023
4/11/2023
Piji Li, LLM&ChatGPT
434            
                        
                421. 检索溯源
• 场景:搜索引擎+GPT4
• 如何重构流程?
• 类比learning to rank
• 提出一个generative retrieval的benchmark
• 如何记忆?
• 如何对model进行增删查改?
• 生成的内容如何溯源?
• 推荐系统如何做?
• 有没有可能做generative recommendation?
• 有无脑占坑灌水嫌疑?
4/11/2023
Piji Li, LLM&ChatGPT
435            
                        
                422. 领域突现
• 百事似通
• 领域专家
• Prompt Engineering
• 如何蒸馏?
4/11/2023
Piji Li, LLM&ChatGPT
436            
                        
                423. 教模型使用工具
• API
• Plugin
• 机械臂
• 链接物理世界
4/11/2023
Piji Li, LLM&ChatGPT
437            
                        
                424. 教模型使用工具
Feb 9, 2023
4/11/2023
Piji Li, LLM&ChatGPT
438            
                        
                425. 使用工具
Mar 23, 2023
4/11/2023
Piji Li, LLM&ChatGPT
439            
                        
                426. 统一多种模态-GPT4
4/11/2023
Piji Li, LLM&ChatGPT
https://arxiv.org/pdf/2302.14045.pdf
440            
                        
                427. 统一多种模态 – 文生图
4/11/2023
Piji Li, LLM&ChatGPT
https://arxiv.org/pdf/2302.14045.pdf
441            
                        
                428. 统一多种模态 – 文生图
4/11/2023
Piji Li, LLM&ChatGPT
442            
                        
                429. 涌现能力
• Scaling laws?
• 模型越大效果越好
• 为什么有的线性?有的任务是突变?涌现?
• 原因?
4/11/2023
Piji Li, LLM&ChatGPT
443            
                        
                430. 涌现能力
• Scaling laws?
An ability is emergent if it
is not present in smaller
models but is present in
larger models.
4/11/2023
Piji Li, LLM&ChatGPT
444            
                        
                431. 涌现能力
• Scaling laws?
An ability is emergent if it
is not present in smaller
models but is present in
larger models.
4/11/2023
Piji Li, LLM&ChatGPT
445            
                        
                432. 涌现能力
• Scaling laws?
An ability is emergent if it
is not present in smaller
models but is present in
larger models.
4/11/2023
Piji Li, LLM&ChatGPT
446            
                        
                433. 涌现能力
https://github.com/google/BIG-bench
4/11/2023
Piji Li, LLM&ChatGPT
447            
                        
                434. 涌现能力
• Scaling laws?
An ability is emergent if it
is not present in smaller
models but is present in
larger models.
4/11/2023
Piji Li, LLM&ChatGPT
448            
                        
                435. 涌现能力 – 原因
• Beyond the Imitation Game benchmark (BIG-bench)
• Using smoother metrics.
• Manual decomposition into subtasks.
4/11/2023
Piji Li, LLM&ChatGPT
449            
                        
                436. 涌现能力 – 原因
• Beyond the Imitation Game benchmark (BIG-bench)
• Using smoother metrics.
• Manual decomposition into subtasks.
4/11/2023
Piji Li, LLM&ChatGPT
450            
                        
                437. 涌现能力 – 原因
• Beyond the Imitation Game benchmark (BIG-bench)
• Using smoother metrics.
• Manual decomposition into subtasks.
4/11/2023
Piji Li, LLM&ChatGPT
合法走棋
将军
451            
                        
                438. 涌现能力 – 原因
• Beyond the Imitation Game benchmark (BIG-bench)
• Using smoother metrics.
• Manual decomposition into subtasks.
4/11/2023
Piji Li, LLM&ChatGPT
Beyond the Imitation Game benchmark 452
(BIG-bench)            
                        
                439. 涌现能力 – 原因
• Beyond the Imitation Game benchmark (BIG-bench)
• Using smoother metrics.
• Manual decomposition into subtasks.
• My opinion:
• Representation Learning?
4/11/2023
Piji Li, LLM&ChatGPT
Beyond the Imitation Game benchmark 453
(BIG-bench)            
                        
                440. 涌现能力 – 原因
• My opinion:
• Representation Learning?
4/11/2023
Piji Li, LLM&ChatGPT
Beyond the Imitation Game benchmark 454
(BIG-bench)            
                        
                441. 涌现能力 – 原因
• 建模思路:单字接龙--给定前缀,预测下一个字是什么?
我
是
中
国
人
<eos>
−  w  S log p ( w )
我是中国人
E
<bos>
E
我
4/11/2023
是
中
国
Piji Li, LLM&ChatGPT
人
455            
                        
                442. 涌现能力 – 原因
• 建模思路:单字接龙--给定前缀,预测下一个字是什么?
−  w  S log p ( w )
我
E
<bos>
是
中 国 人 <eos>
是 中 国 人
我是中国人
我是中国人
我是中国风
我爱中国风
E
我
4/11/2023
Piji Li, LLM&ChatGPT
456            
                        
                443. 涌现能力 – 原因
• Representation Learning?
• Data-size
• Model-size
• Epoch-size
4/11/2023
Piji Li, LLM&ChatGPT
457            
                        
                444. 涌现能力 – 原因
• Representation Learning?
• Data-size
• Model-size
• Epoch-size
4/11/2023
Piji Li, LLM&ChatGPT
458            
                        
                445. 涌现能力 – 原因
• Representation Learning?
• Data-size
• Model-size
• Epoch-size
4/11/2023
Piji Li, LLM&ChatGPT
459            
                        
                446. 涌现能力 – 原因
• Representation Learning?
• Data-size
• Model-size
• Epoch-size
• Reasoning?
• CoT?
4/11/2023
Piji Li, LLM&ChatGPT
460            
                        
                447. 涌现能力 – 原因
• Representation Learning?
• Data-size
• Model-size
• Epoch-size
• RLHF?
4/11/2023
Piji Li, LLM&ChatGPT
461            
                        
                448. 涌现能力 – 原因
• Representation Learning?
• Information Compression?
• 神奇的无法解释的case?
4/11/2023
Piji Li, LLM&ChatGPT
462            
                        
                449. 安全性
• 攻击和防御
• 数据安全问题
• 原因?
• finetune
4/11/2023
Piji Li, ChatGPT
463            
                        
                450. 未来:ChatGPT后,我们做什么?
• ChatGPT有什么用?
• 以前研究任务的状态
• 针对ChatGPT的研究
• 复现ChatGPT
4/11/2023
Piji Li, LLM&ChatGPT
464            
                        
                451. Reproduce ChatGPT
• 前提条件
• 意识、情怀、胆大、心细
• 软件、硬件等资源支撑
• 研究+工程兼修的人才
• 坚定
• 技术准备
• 冰冻三尺非一日之寒
4/11/2023
Piji Li, LLM&ChatGPT
465            
                        
                452. ChatGPT技术积累
•
•
•
•
•
•
•
•
•
•
•
•
GAI、RL
GPT
GPT2
GPT3
DALL-E、CLIP
Codex、davinci 1&2& 3
GPT3.5
WebGPT
Summarization via RLHF
InstructGPT--Sparrow
ChatGPT
GPT4
https://yaofu.notion.site/
4/11/2023
Piji Li, LLM&ChatGPT
466            
                        
                453. ChatGPT
4/11/2023
12B?
Piji Li, LLM&ChatGPT
6B?
467            
                        
                454. 关键技术
•
•
•
•
•
•
DeepSpeed 3D并行, ZeRO
Attention: Sparse?
Post-LN or Pre-LN or?
Position Embedding?
GELU?
GPUs
• 炸了?
• 先得到Base model
• Research
• Infrastructure?
• Transformer?
4/11/2023
Piji Li, LLM&ChatGPT
468            
                        
                455. 关键技术-Human Annotation
•
•
•
•
•
SFT、RM;从api采样。
Comparison 1-7,多个维度safety等
n*10k左右prompt、code
40人左右标注团队
n个月
• ChatGPT/GPT4
• 暴力标注?
• 暴力+不优雅
4/11/2023
Piji Li, LLM&ChatGPT
469            
                        
                456. 第二条路
• 三无状态
• 开源模型+ChatGPT数据
• 开源模型: GLM, LLaMA
• ChatGPT数据
• APIs
• ShareGPT
• 一个ChatGPT 数据共享网站,用户会上传自己觉得有趣的ChatGPT回答
LLaMA+ChatGPT Data → SFT
4/11/2023
Piji Li, LLM&ChatGPT
470            
                        
                457. LLaMA+ChatGPT Data→SFT
• Alpaca
• GPT4All
• Vicuna
• BARD
4/11/2023
Piji Li, LLM&ChatGPT
471            
                        
                458. Vicuna
• https://vicuna.lmsys.org/
• https://zhuanlan.zhihu.com/p/618389519
• LLaMA 13B
• 70k samples
• 8 A100 GPUs
• One day
• Eval using GPT4
4/11/2023
Piji Li, LLM&ChatGPT
472            
                        
                459. Vicuna
• 语言理解和多轮对话能力还行
• 数学、代码、推理能力偏弱
4/11/2023
Piji Li, LLM&ChatGPT
473            
                        
                460. LLaMA+ChatGPT Data→SFT
• 不过,还是有希望了。。
• 港科:https://github.com/OptimalScale/LMFlow
• 中科院软件所:https://github.com/cascip/ChatAlpaca
4/11/2023
Piji Li, LLM&ChatGPT
474            
                        
                461. 未来:是否会垄断?
• 操作系统
• 搜索引擎
• iPhone
• 云+私有化部署
• 行业颠覆性
• 工具
• 代替
• 狂热的资本
• 可能团队人还没码齐,热度先退了
4/11/2023
Piji Li, LLM&ChatGPT
475            
                        
                462. 未来:ChatGPT后,我们做什么?
•OpenAI的这条路就是对的么?
4/11/2023
Piji Li, LLM&ChatGPT
476            
                        
                463. 未来:ChatGPT后,我们做什么?
4/11/2023
Piji Li, LLM&ChatGPT
477            
                        
                464. THANKS!
pjli@nuaa.edu.cn
4/11/2023
Piji Li, LLM&ChatGPT
478