30 LLM Concepts Every Developer Should Know, Explained Visually
1. LLM (Large Language Model)
A large language model is a deep learning model trained on massive text data, capable of understanding and generating natural language. Representative models include GPT, Claude, LLaMA, etc.
2. Transformer
A neural network architecture based on the self-attention mechanism, which is the core foundation of modern LLMs. It processes sequence data in parallel, greatly improving training efficiency.
3. Self-Attention
A mechanism that allows a model to focus on the importance of different positions within an input sequence. It enables the model to capture long-range dependencies.
4. Multi-Head Attention
A mechanism that runs multiple self-attention operations in parallel, allowing the model to focus on information from different representation subspaces simultaneously.
5. Positional Encoding
A technique that injects position information into input embeddings so that the Transformer model can perceive the order of elements in a sequence.
6. Tokenization
The process of splitting text into the smallest units (tokens) that the model can process. Common methods include BPE (Byte Pair Encoding) and WordPiece.
7. Embedding
The process of mapping discrete tokens into a continuous vector space, allowing semantically similar words to be closer in the vector space.
8. Context Window
The maximum length of text (number of tokens) that a model can process at one time. A larger context window can handle longer texts but consumes more computational resources.
9. Pre-training
The process of training a model on large-scale unlabeled data to learn general language representations. This is the most resource-intensive stage of LLM development.
10. Fine-tuning
Further training a pre-trained model on a specific task's labeled dataset to adapt it to a particular application scenario.
11. Prompt
The input text provided to the model to guide it in generating the desired output. Prompt design significantly impacts model performance.
12. Prompt Engineering
The practice of designing and optimizing prompts to improve the quality and accuracy of LLM outputs. It is a key skill for using LLMs.
13. ICL (In-Context Learning)
The ability of a model to learn and perform tasks through a few examples provided in the prompt, without updating model parameters.
14. Few-Shot Prompting
Providing several examples in the prompt to help the model understand the task format and expected output.
15. Zero-Shot Prompting
Directly asking the model to complete a task without providing any examples, relying entirely on the model's pre-trained knowledge.
16. CoT (Chain of Thought)
A prompting technique that guides the model to output intermediate reasoning steps, thereby improving performance on complex reasoning tasks.
17. Hallucination
The phenomenon where a model generates content that is fluent and plausible but factually incorrect or nonsensical. It is a major challenge for LLM applications.
18. RAG (Retrieval-Augmented Generation)
An architecture that combines information retrieval with text generation. It retrieves relevant documents from an external knowledge base to assist the model in generating more accurate answers.
19. Vector Database
A database system specialized in storing and retrieving vector data, widely used in RAG systems for semantic search.
20. Parameters
The internal variables of a model learned during training, determining the model's knowledge and capabilities. The number of parameters is usually measured in billions (B).
21. RLHF (Reinforcement Learning from Human Feedback)
A technique that uses human preference data to train a reward model, then fine-tunes the LLM using reinforcement learning to align its outputs with human values.
22. Alignment
The process of ensuring that a model's behavior and outputs align with human intentions, values, and ethical standards. RLHF is a primary method for achieving alignment.
23. Instruction Tuning
Fine-tuning a model on datasets composed of instructions and their corresponding responses, enhancing the model's ability to follow human commands.
24. Agent
An intelligent system built on LLMs that can perceive its environment, make plans, use tools, and execute complex tasks autonomously.
25. Function Calling
The ability of an LLM to call external functions or APIs based on user input, connecting the model to external systems and data.
26. Temperature
A hyperparameter that controls the randomness of model output. Lower temperatures produce more deterministic results; higher temperatures increase diversity.
27. Top-p (Nucleus Sampling)
A decoding strategy that selects from the smallest set of tokens whose cumulative probability exceeds the threshold p, balancing diversity and quality.
28. Top-k Sampling
A decoding strategy that samples only from the k tokens with the highest probabilities, preventing low-probability tokens from being selected.
29. Beam Search
A search algorithm that maintains multiple candidate sequences at each step of generation, ultimately selecting the sequence with the highest overall score.
30. Quantization
A model compression technique that reduces the precision of model parameters (e.g., from 32-bit floating point to 8-bit integers), decreasing memory usage and inference latency.