赞
踩
参考课程GITHUB地址:https://github.com/datawhalechina/so-large-lm
语言模型(LM)的经典定义是一种对令牌序列(token)的概率分布。假设我们有一个令牌集的词汇表 V V V 。语言模型p为每个令牌序列 x 1 , . . . , x L x_{1},...,x_{L} x1,...,xL ∈ V V V 分配一个概率(介于0和1之间的数字):
p ( x 1 , … , x L ) p(x_1, \dots, x_L) p(x1,…,xL)
概率直观地告诉我们一个标记序列有多“好(good)”。例如,如果词汇表为{ate, ball, cheese, mouse, the},语言模型可能会分配以下概率(演示):
p ( the, mouse, ate, the, lcheese ) = 0.02 , p(\text{the, mouse, ate, the, lcheese}) = 0.02, p(the, mouse, ate, the, lcheese)=0.02,
p ( the, cheese ate, the, lcheese ) = 0.02 , p(\text{the, cheese ate, the, lcheese}) = 0.02, p(the, cheese ate, the, lcheese)=0.02,
p ( mouse, the, the, cheese, ate ) = 0.02 , p(\text{mouse, the, the, cheese, ate}) = 0.02, p(mouse, the, the, cheese, ate)=0.02,
从数学上讲,语言模型是一个非常简单而又美妙的对象。但是这种简单是具有欺骗性的:赋予所有序列以(有意义的)概率的能力,该能力要求语言模型具有非凡的(但是隐含的)语言能力和世界知识。
例如,语言模型应该隐含地赋予"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。