How LLMs Work
LLMs (large language models) are trained algorithms that receive text input and output a predicted humanlike text output.
They work the same way autocomplete does at a larger scale.
LLM can be broken down as such:
- Large - meaning the size of the model (lots of data and parameters).
- Language Model - meaning the type of machine learning algorithm (receive and output text).
The goal of most machine learning models is to generalize for whatever task you are trying to accomplish. Since LLMs are focused on generating text (very general problem with a lot of applications), they are very general and preform very well at a lot of tasks. This generalization and performance comes at the cost of the size of these models and computational power (which also means cost). This is why better models cost more.
These models predict the probability that a token (part of a word) follows the input to the model. This new predicted token is added to the original input, then that new string is input to the model for the next token and so on until the model either finishes or runs out of tokens it can output.
Most LLMs use a transformer neural network. You can read a paper on them here for now if you're interested in learning more about them:
There are a few different types of LLMs:
- Pretrained Model - most base models have been trained on large amount of data to predict a missing token (either from inside a sentence or at the end generally).
- Instruction-Tuned LLMs - These Pretrained Models are then often further tuned with instruction answer sets of problems. This includes Q&A pairs typically. This is why LLMs are able to take in a question and generate an answer instead of just working like autocomplete where they continue your sentence.
- Dialogue-Tuned LLMs - These LLMs can be and usually are trained further with full dialogues of user questions, model answers, follow up question etc. This is where LLMs get the ability to use past questions and answers in their responses.
- Fine-Tuned LLMs - Some LLMs are trained even further with specific problems increasing the models answers for those questions at the trade off of some level of generalization.
Here's a great Youtube video if you want to learn more:
6
2 comments
Maximus Meadowcroft
2
How LLMs Work
powered by
skool.com/genai-growth-labs-6038
Stop chatting with AI, start building freedom. Learn how to turn your recurring problems into repeatable AI workflows that get real work done.
Build your own community
Bring people together around your passion and get paid.
Powered by