DOU AI Meetup
Roman Kyslyi,
Applied Data Scientist
AI HOUSE IS THE LARGEST AND MOST POWERFUL AI COMMUNITY IN UKRAINE
<Large Language Models (LLM)>
Overview, challenges and future
Language model
Ways of selecting tokens
Greedy Decoding�
The simplest option we have is greedy decoding. This takes our list of potential outputs and the probability distribution already calculated — and chooses the option with the highest probability (argmax).
Random Sampling
Random sampling chooses the next word based on these probabilities — so in our example, we might have the following words and probability distribution:
Beam Search
So whereas greedy decoding and random sampling calculate the best option based on the very next word/token only — beam search checks for multiple word/tokens into the future and assesses the quality of all of these tokens combined.
Yann LeCun perspective
Unsupervised learning: data scraped from the Internet: think clickbait, misinformation, propaganda, conspiracy theories, or attacks against certain demographics.
Supervised learning: higher quality data – think StackOverflow, Quora, or human annotations – which makes it somewhat socially acceptable
RLHF: polished using RL to make it customer-appropriate
Data bottleneck
Today, a language model like GPT-4 uses so much data that there’s a realistic concern that we’ll run out of Internet data in the next few years. It sounds crazy, but it’s happening. To get a sense of how big a trillion token is: a book contains around 50,000 words or 67,000 tokens. 1 trillion tokens are equivalent to 15 million books.
Paper published on 28th of November of 2023 claim that training data can be extracted from the models like GPT: [link]
LLM scaling laws
Performance of LLMs is a smooth, well-behaved, predictable function of:
- N, the number of parameters in the network
- D, the amount of text we train on
�=> We can expect more intelligence “for free” by scaling
Supervised fine tuning (SFT)
How to do that? We know that a model mimics its training data. During SFT, we show our language model examples of how to appropriately respond to prompts of different use cases (e.g. question answering, summarization, translation). The examples follow the format (prompt, response) and are called demonstration data.
OpenAI calls supervised fine tuning behavior cloning: you demonstrate how the model should behave, and the model clones this behavior.
OpenAI’s 40 labelers created around 13,000 (prompt, response) pairs for InstructGPT. Here are a few examples:
Supervised fine tuning (SFT)
Fine Tuning with distillation
https://crfm.stanford.edu/2023/03/13/alpaca.html
Reinforcement learning
Key components of reinforcement learning:
RLHF
The idea: what if we have a scoring function that, if given a prompt and a response, outputs a score for how good that response is? Then we use this scoring function to further train our LLMs towards giving responses with high scores. That’s exactly what RLHF does. RLHF consists of two parts:
Paper: https://arxiv.org/pdf/2203.02155.pdf
Reward model (RM)
Building LLM applications for production
Latency
Additional output
Inconsistency
Hallucinations
Chain of Thoughts
Chain of Thoughts: https://arxiv.org/abs/2201.11903
RAG
Hallucinations
Compressing information (why gzip will not work)
LLM
RDBMS
Data Lake
Keyword search
Vector Search
Prompt
In computer science, ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps.
In computer science, atomicity, consistency, isolation, durability are a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps.
Keyword: ACID
No Keyword: ACID
Source: https://drive.google.com/file/d/1pxx_ZI7O-Nwl7ZLNk5hI3WzAsTLwvNU7/view
<Q&A>