Hey folks, today is a Mindblowing Monday ๐Ÿคฏ!

Today I want to tell you about Language Models, a type of machine learning techniques that are behind most of the recent hype in natural language processing.

โ“ Want to know more about them?

๐Ÿงต๐Ÿ‘‡ 1/15

A language model is a computational representation of human language that models which sentences are more likely to appear in a given language.

๐ŸŽฉ Formally, a language model is a probability distribution over the sentences in a language.

โ“ What are they used for?

๐Ÿ‘‡ 2/15
โš™๏ธ Language models allow computers to understand and manipulate language at least to some degree. They are used in machine translation, speech to text, optical character recognition, text generation, and many more applications!

They come in many flavors:

๐Ÿ‘‡ 3/15
โญ The simplest language model is the *unigram model*, also called a *bag of words* (BOW).

In BOW, each word is assigned a probability Pi, and the probability of a sentence is computed assuming all words are independent. But of course, this isn' true.

๐Ÿ‘‡ 4/15
For example, "water" is a more commonly used word than "philosophy", but the phrase "philosophy is the mother of science" is arguably much more likely than the phrase "water is the mother of science".

๐Ÿ’ก The likelihood of a phrase depends upon all its words.

๐Ÿ‘‡ 5/15
โญ This dependency can be modelled with an *n-gram model*, in which the likelihood of a word is computed w.r.t. the words before in a given phrase.

๐Ÿ’ก If we start a phrase with "philosophy", is more likely to see the word "science" than "shark".

๐Ÿ‘‡ 6/15
โ˜๏ธ The problem with n-gram models is that the total number of parameters you need to store grows exponentially with n.

If you want to capture phrases of length n=10, you need N^10 numbers, where N is the number of words in the language!

๐Ÿ‘‡ 7/15
โญ Neural language models (aka continuous space models) are a solution to this exponential explosion.

They try to learn jointly a vectorial representation for all words (aka an embedding) and some mathematical operation among them that approximates the likelihood.

๐Ÿ‘‡ 8/15
โš™๏ธ Neural language models are built by training a neural network to predict some relationships between words and the phrases in which they appear.

The most popular neural language model is *word2vec*, trained in predicting a word given a small window around it.

๐Ÿ‘‡ 9/15
๐Ÿ‘‰ Modern neural language models have more complex neural network architectures.

Popular examples are BERT and the family of GPT models, of which GPT-3 recently took the Internet by surprise with its ability to speak nonstop about anything, often without much sense.

๐Ÿ‘‡ 10/15
๐Ÿ˜‡ The nice thing about language models is that they can be trained independently of any NLP problem and then used inside specific applications with a little fine-tunning.

๐Ÿ‘‡ 11/15
๐Ÿ˜‡ They also improve efficiency. A big company (like OpenAI or Google) can train a big language model and then the rest of us mortals can use them without having to pay millions in GPU training time.

โš ๏ธ But they don't come without issues!

๐Ÿ‘‡ 12/15
๐Ÿค” Language models encode "common" language use, so all human bias is implicitly stored in them.

For example, the phrase "boy is a programmer" may be considered more likely than "girl is a programmer", simply because the Internet has more examples of the first.

๐Ÿ‘‡ 13/15
โ˜๏ธ If used without care, these language models will introduce subtle biases in your application that are very hard to discover and debug. Understanding and fixing these biases is one of the most exciting and important issues in AI safety!

๐Ÿ‘‡ 14/15
๐Ÿ‘‹ And that's it for today.

If you'd like to talk about language models, reply in this thread or @ me at any time.

Feel free to โค๏ธ like and ๐Ÿ” retweet if you think someone else could benefit from knowing this stuff.

โš“ 15/15

More from All

You May Also Like

Great article from @AsheSchow. I lived thru the 'Satanic Panic' of the 1980's/early 1990's asking myself "Has eveyrbody lost their GODDAMN MINDS?!"


The 3 big things that made the 1980's/early 1990's surreal for me.

1) Satanic Panic - satanism in the day cares ahhhh!

2) "Repressed memory" syndrome

3) Facilitated Communication [FC]

All 3 led to massive abuse.

"Therapists" -and I use the term to describe these quacks loosely - would hypnotize people & convince they they were 'reliving' past memories of Mom & Dad killing babies in Satanic rituals in the basement while they were growing up.

Other 'therapists' would badger kids until they invented stories about watching alligators eat babies dropped into a lake from a hot air balloon. Kids would deny anything happened for hours until the therapist 'broke through' and 'found' the 'truth'.

FC was a movement that started with the claim severely handicapped individuals were able to 'type' legible sentences & communicate if a 'helper' guided their hands over a keyboard.
Moderna CEO Stephane Bancel was previously CEO of bioMerieux in France from 07-10.

Alain Merieux, who owns bioMerieux, was instrumental in the creation of the Wuhan Institute of Virology P4 Lab.

The same people who helped create the virus, also helped to create the vaccines...


Moderna partnered with French Pasteur Institute in 2015 to develop mRNA vaccine technology.

Pasteur Institute partnered with the Wuhan P4 Laboratory in 2017 along with the Merieux Foundation to study emerging viruses...
https://t.co/yFsHwrNYaK
https://t.co/9M5lydBKhM


Nobel prize winning scientist Luc Montagnier asserts that Sars-Cov-2 is man-made and originated from the Wuhan Institute of Virology.

Montagnier did extensive work with the Pasteur Institute in France which was partnered with the Wuhan P4.

Merieux Foundation & the Chinese government have worked together since 1965, and partnered to study emerging pathogens in Africa in 2015.

Their research included "PATHOGENS CARRIED BY BATS" that provoke respiratory diseases.

๐Ÿšจ๐Ÿšจ๐Ÿšจ
https://t.co/gVwpT0ssqI