Fortune Telling Collection - Comprehensive fortune-telling - Deep language model -GPT
Deep language model -GPT
GPT is put forward on the basis of transformer, but it is slightly different:
The embedding vector of each word in a sentence
It is a single transformer, and the output of the last layer is H L.
According to the output of the last layer, connect a matrix W to generate the dimension of 1, and then calculate the probability of each word by softmax to maximize the probability. The loss L 1 (C) is obtained. Note here that when calculating P(u), the embedding vector W e of dictionary words is used, which is also a common skill in language model.
Given Text 1SEPText2, the normal transformer only keeps the decoder that masks self-attention, so that every position in the last layer can output a probability; Then use the corresponding next word to calculate the loss.
Use a small amount of marking data to fine-tune model parameters.
Take the output h l of the last word in the previous step as the input of downstream supervised learning.
According to the supervision label, calculate the loss and get L 2 (C).
The sum of L 2 (C) and L 2 (C) is the loss after doing it, as shown in the following figure:
One-way converter, cannot use the semantics of the words after the current word. But the translated scene seems useless, just don't know what the word is. Is that really the case?
- Previous article:What was your life when you were born on the 25th of the lunar calendar 1 1 month?
- Next article:Huaan insurance Heilongjiang branch
- Related articles
- In the name of people: Divorced from Gao. Why do they pretend that husband and wife live together?
- Aunt and nephew fortune telling _ As the saying goes, aunt and nephew
- 1988 China lunar calendar April 23rd, eight-character fortune telling.
- Take the screen name by last name.
- Brother Bing's Fortune Telling _ Private Fortune Telling Video
- Luck fortune teller
- Where is the fortune-telling place in Hengyang _ Where is the fortune-telling place in Hengyang?
- Yunmeng fortune teller _ Yunmeng fortune teller
- Does Jiang Ziya really exist in history? Why didn't he deify himself?
- Fortune-telling: When I was born in June of the lunar calendar (1977+00), that is, when I was born on the sixth day of the solar calendar (1977+0 16), please ask the master to calculate my horoscope a