What you will learn in How Large Language Models Work
Chapter by chapter
Concepts explained in this book
- language modelA machine-learning model trained on very large text collections to understand and generate human language or other sequential content such as source code.
- tokenizationTokenization is the process of converting an input into discrete units or a sequence of numeric representations for model processing.
- tokenA token is a discrete symbolic unit that represents a subword through a unique numeric identifier for processing by a language model.
- embeddingA vector is an ordered numerical quantity that represents magnitude and direction or encodes data in a multidimensional space.
- transformer architectureA transformer is a neural-network architecture that uses attention mechanisms to process relationships among elements in a sequence.
- fine-tuningFine-tuning is an additional training stage that adapts a pretrained model to a particular task or behavior using a smaller, task-relevant dataset.
- tokenizerA tokenizer is a software component or algorithm that converts text into tokens according to a vocabulary and tokenization procedure.
- normalizationText normalization is the transformation of text into a standardized representation, such as by harmonizing character case or encoding.
- vocabularyA language-model vocabulary is the collection of unique tokens and their identifiers observed or defined for the model.
- reinforcement learning with human feedbackReinforcement learning from human feedback is a technique that optimizes a model's behavior using human evaluations as a source of reward or preference information.
- training datasetTraining data is the collection of examples used to build or optimize a machine-learning model.
- generative modelingGenerative AI/ML is the area of artificial intelligence and machine learning concerned with producing new content or outputs.
- prompt engineeringPrompt engineering is the practice of designing and modifying input text to influence a language model's behavior or output.
- machine learningMachine learning is the field of building computational systems that improve their performance on tasks by deriving patterns or rules from data rather than receiving all rules explicitly.
- self-improvementSelf-improvement is the process by which a system develops better capabilities or performance through its own analysis, learning, or modifications.
- byte pair encodingA byte-pair encoding tokenizer segments text by repeatedly merging frequent adjacent symbol pairs into tokens.
- subword tokenizationA subword is a word fragment that lies between a complete word and an individual character and can carry part of a word's meaning.
- foundational modelA foundation model is a broadly trained model that can be adapted or used as a basis for many applications.
- embedding layerAn embedding layer is a neural-network layer that converts discrete token identities and positions into vector representations.
- retrieval-augmented generationRetrieval-augmented generation is a language-generation approach that retrieves relevant documents and supplies them to a language model when producing an answer.
- gradient descentGradient descent is an iterative optimization algorithm that adjusts parameters in the direction that reduces a differentiable objective function.
- outlier detectionOutlier detection is the identification of observations that are unusual relative to the prevailing pattern in data.
- computer visionComputer vision is the field concerned with enabling computational systems to analyze and interpret visual data.
- document segmentationText segmentation is the process of dividing text into a sequence of discrete substrings such as words or subwords.
- GPT modelGPT is a family of generative pretrained transformer-based language models developed by OpenAI.
- special tokenA special token is a reserved token that conveys control, boundary, error, modality, or other auxiliary information rather than ordinary word content.
- machine translationMachine translation is the automated conversion of text or speech from one human language into another by computational systems.
- Vision TransformerA vision transformer is a transformer-based architecture that processes image data by representing it as a sequence of visual elements.
- biasBias is a systematic skew in information, representation, or model behavior toward particular perspectives, groups, or time periods.
- automation biasAutomation bias is the tendency to over-rely on automated recommendations or decisions instead of independently evaluating them.
- automationAutomation is the use of technology to perform tasks or processes with reduced direct human labor.
- pretrainingPretraining is the initial training of a model on broad data before adapting it to particular tasks or applications.
- next-token predictionAn autoregressive generation strategy that predicts each successive word or token from the preceding context.
- probability theoryA probability is a numerical value representing the likelihood assigned to a possible event or outcome.
- accuracyAccuracy is the proportion of model outputs or predictions that are correct according to the evaluation criterion.
- continuous smooth functionSmoothness is a mathematical property in which a function changes continuously or without abrupt, unstable changes over similar inputs.
- cross entropy lossA cross-entropy loss function measures the discrepancy between a target probability distribution and a model's predicted probability distribution.
- incentive mismatchAn incentive mismatch occurs when the objective optimized by a system differs from the behavior or outcome actually desired.
- proxy problemA proxy problem is an alternative formulation of a task that correlates with the desired solution while being easier or more stable to optimize.
- language acquisitionThe process through which a person develops the ability to understand and use a language through exposure, interaction, and communication.
- data harvestingData harvesting is the large-scale automated collection of information from digital sources for subsequent analysis or model development.
- gradientA gradient is a vector of derivatives indicating how an objective function changes as its parameters change.
- misalignmentMisalignment is a mismatch between a system's optimized objective and the higher-level goal intended by its designer.
- quadratic time complexityQuadratic complexity is a computational growth rate proportional to the square of the input size, denoted O(n^2).
- clusteringA technique that groups data items according to similarities among their features or representations.
- mode collapseMode collapse is a generative-model failure in which outputs become concentrated on a small set of common patterns while rare or diverse patterns are lost.
- intelligence quotient testAn intelligence quotient test is a standardized psychometric assessment intended to estimate cognitive abilities relative to a reference population.
- unembedding layerAn unembedding layer is the final model component that maps a transformer’s numeric representation to scores or probabilities over output tokens.
- ChatGPTA conversational artificial-intelligence service developed by OpenAI that generates responses to natural-language prompts.
- decodeDecoding is the process of converting a model’s internal representation or token distribution into output tokens or text.
- adversarial problemAn adversarial environment is an environment in which other agents intentionally act in ways that oppose or exploit the system's objectives.
- conversational aiA software system that conducts conversational interactions with users through natural-language messages.
- curse of dimensionalityThe curse of dimensionality is the phenomenon in which increasing the number of dimensions causes the space, data requirements, and computational costs to grow substantially.
- semantic spaceA semantic space is a multidimensional space in which vector representations encode relationships between meanings.
- samplingSampling is the computational process of selecting output tokens from a probability distribution over vocabulary items.
- diminishing returnsDiminishing returns is the pattern in which additional investment or effort produces progressively smaller gains in an outcome.
- sigmoidAn S-curve is a growth pattern in which progress accelerates, reaches a transition region, and then approaches a plateau.
- adamAdam is an adaptive stochastic-gradient optimization algorithm that maintains estimates of gradient moments to adjust parameter updates.
- stochastic gradient descentStochastic gradient descent is a gradient-descent technique that estimates parameter updates using a small random subset of training data.
- out-of-vocabulary wordAn unknown token is a reserved token emitted when a tokenizer cannot process an input symbol correctly.
- interpretabilityAn approach to artificial intelligence that produces information intended to make a model's outputs or decision process understandable to people.
- code generationCode generation is the automated production of computer-program source code from prompts, specifications, or other inputs.
- alignment trainingThe alignment problem is the challenge of ensuring that an artificial system's goals and methods remain consistent with the goals and values intended by humans.
- dual-use technologyDual-use technology is technology that can support both beneficial or peaceful applications and harmful or adversarial applications.
- public domainThe public domain is the status of works and data that are not protected by applicable intellectual property rights and may generally be used without permission or compensation.
- complexity classA complexity class is a category containing problems characterized by the computational resources or algorithmic complexity needed to solve them.
- digital watermarkingWatermarking is the process of embedding an identifiable signal or alteration in content to indicate its origin or authenticity.
- npNP is the complexity class associated with problems whose solutions can be verified in polynomial time by a nondeterministic computation.
- pP is the complexity class of problems solvable by deterministic algorithms in polynomial time.
- tc^0TC^0 is a restrictive computational complexity class describing constant-depth threshold circuits with polynomially many gates and bounded fan-in.
- text-to-speech conversionText-to-speech is the conversion of written text into synthesized spoken audio.
- intelligenceIntelligence is the broad and disputed capacity to perform cognitive tasks such as reasoning, learning, and adapting to situations.
- attentionAttention is a transformer mechanism that computes context-dependent relationships by matching queries with keys and combining the corresponding values.
- existential riskExistential risk is the possibility of an event causing the extinction of humanity or permanently and catastrophically reducing humanity's future potential.
- unfalsifiable statementAn unfalsifiable statement is a claim for which no possible observation or test can establish that it is false.
- promptA prompt is an input text or other input provided to a language model to elicit an output.
- top-p filteringNucleus sampling is a token-generation method that samples only from the smallest set of highest-probability tokens whose cumulative probability reaches a selected threshold.
- context windowContext size is the maximum number of tokens a language model can computationally process in one request.
- patchA localized rectangular portion of an image converted into a numerical representation for processing by a model.
- information theoryThe mathematical study of information as a quantifiable resource, including its representation, transmission, and uncertainty.
- Moore's lawMoore's law is the empirical observation that the number of transistors on an integrated circuit historically doubled approximately every 18 to 24 months.
- DSPyDSPy is a programming framework for composing language-model programs while separating model, vectorization, prompt, and task-logic definitions.
- trustConfidence that a system or party is reliable, competent, honest, and aligned with expected interests.
- natural language processingNatural language processing is the field concerned with technology for computers to understand, manipulate, and create human language.
- reliabilityReliability is the degree to which a system consistently produces dependable behavior and results under expected conditions.
- keyAn attention key is a vector representing the attributes against which an attention query is matched.
- queryAn attention query is a vector representing the information sought when an attention operation compares sequence elements.
- copyrightCopyright is a legal protection that grants creators or rights holders control over specified uses of original expressive works for a limited period.
- harmHarm is physical, psychological, social, legal, or economic damage caused to people or other affected entities.
- implicit biasImplicit bias is an unintended or unconscious systematic association or preference that influences judgments or behavior.
- user studyA user study is a structured investigation of how people interact with or are affected by a system.
- decoder-only transformerA decoder-only transformer is a transformer architecture composed of decoder-style layers that generates outputs autoregressively from preceding context.
- token countThe quantity of tokens consumed as input to or produced as output by a language model.
- chain-of-thought promptingA prompting technique that encourages a language model to produce an intermediate sequence of reasoning steps before an answer.
- classifierClassification is the task of assigning an input to one of a set of discrete outcome categories.
- world modelA computational representation of a world’s entities, states, and dynamics that supports reasoning about outcomes without directly acting in that world.
- extrapolationThe process of extending a pattern or method beyond the examples or cases from which it was learned.
- novel taskA task that is sufficiently unlike the examples and structures represented in a model's training data.
- natural languageHuman language is a naturally evolved system of symbolic communication used by people.
- syntaxSyntax is the set of structural rules that determines whether expressions or programs are valid in a language.
- phantom deploymentA deployment approach in which a system operates alongside an existing process so its outputs can be evaluated without controlling live outcomes.
- trial deploymentA trial deployment is a limited release of a system conducted to evaluate its behavior and effects before broader adoption.
- transparencyTransparency is the degree to which an AI system's identity, development, modification, capabilities, and limitations are made discoverable to its users.
- patch combinerA patch combiner is an image-output component that converts vector representations into patches and combines them into a coherent image.
- patch extractorA patch extractor is an image-processing component that divides an image into fixed-size patches and converts those patches into vector representations.
- digital imageAn image is a structured visual representation composed of values that encode colors or other pixel properties.
- capabilityA capability is an ability or functional competence that a system can demonstrate.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
