LLM (Large Language Model)
A large language model (LLM) is a machine learning model trained on large amounts of text to understand and generate natural language.
A large language model is a neural network with billions of parameters, usually based on the transformer architecture. It is trained on very large collections of text, and often code, from many sources. During training, the model learns to predict the next token in a sequence. A token is a word or a part of a word.
To generate text, the model takes a prompt and predicts one token at a time. Each new token is added to the input, and the model predicts the next one. After pretraining, most models receive further training to follow instructions and to give safer answers. This step often uses human feedback or reinforcement learning. The amount of text a model can consider at once is called its context window.
LLMs power chat assistants, translation, summarization, search and code generation. When given tools, an LLM can act as an agent that plans steps, calls functions and reads the results. Code written by such agents usually runs in a sandbox, so that mistakes or harmful actions stay isolated from other systems. Training and running large models requires large amounts of GPU compute.
Related posts