AI, explained plainly
Concepts, models, methods and products, each in a single plain-language version. No jargon walls, no hype: read it and you can follow it, judge it and put it to use.
FlashAttention is an IO-aware exact attention algorithm that reduces GPU memory bandwidth pressure by reordering the order of computation. It does not change the mathematical result, yet it makes attention several times faster in practice and cuts memory usage from quadratic to linear, and it has become the default component in nearly all large-model training and inference stacks today.
Models and algorithms23 views Grouped-Query Attention GQAGrouped-query attention is a variant that sits between multi-head attention and multi-query attention, letting several query heads share the same group of key-value heads. It compresses the key-value cache at inference time by a large margin with almost no loss of quality, and it is the standard compromise of contemporary mainstream large models, as well as a concept that cannot be avoided when understanding the inference cost of large models.
Models and algorithms23 views Rotary Position Embedding RoPERotary position embedding is a method that encodes positional information by rotating vectors, so that attention scores naturally depend only on relative distance. Because it is concise, needs no extra parameters and is easy to adjust for extrapolation, it has become the most widely used position encoding scheme in today's mainstream large language models, almost as common as grouped-query attention.
Models and algorithms30 views Long-Context TechnologyLong-context technology is a set of algorithms and engineering practices that let a model use information effectively far beyond its training length, covering position extrapolation, attention sparsification, memory compression and system optimization. It determines whether a large model can truly process a whole book, an entire code base or one very long meeting, and it has been one of the most concentrated battlegrounds of model capability competition in the past two years.
Models and algorithms25 views Graph Neural Network GNNA graph neural network is a class of models that perform representation learning directly on graph structures, whose core idea is to let nodes update their own representations by exchanging information with neighbors. It extends the expressive power of deep learning from regular grids to arbitrary topologies, and it is the standard tool for relational data and a piece of infrastructure in recommendation, risk control and scientific computing.
Models and algorithms28 views Sparse AttentionSparse attention is an attention mechanism that computes only part of the elements in the attention matrix instead of all pairwise interactions, reducing the computation that grows quadratically with sequence length in standard attention. With large models now routinely carrying long-context demands, it is one of the fundamental retrofits that make attention affordable on long sequences.
Models and algorithms21 views Model ParallelismModel parallelism is a distributed training strategy that places different parts of a neural network on different devices, mainly to solve the difficulty that a single accelerator cannot hold the whole model in memory. It is the other main axis of large-model training, complementary to data parallelism.
Models and algorithms26 views Data ParallelismData parallelism is the most mainstream form of distributed training: each accelerator holds a complete copy of the model, processes a different sub-batch of the data, and then brings the gradients into agreement through communication. It buys near-linear throughput scaling with the simplest implementation, and it is the default starting point for large-scale training.
Models and algorithms27 views ZeRO OptimizationZeRO is a family of memory optimization techniques proposed by DeepSpeed whose core idea is to partition model states among the replicas of data parallelism instead of keeping a full copy on every device. It makes data parallelism scalable in memory and is infrastructure that contemporary large-model training cannot do without.
Models and algorithms25 views Speculative DecodingSpeculative decoding is a decoding strategy that accelerates autoregressive text generation: a small, fast draft model guesses several tokens in a row, and the target large model then verifies these guesses in a single pass, keeping as much of the correct part as possible. The key is that it does not change the output distribution mathematically, making it an almost lossless acceleration method.
Models and algorithms24 views KV CacheKV Cache is the mechanism in autoregressive generation that caches the key and value vectors of historical positions, avoiding recomputation of the entire context each time a new token is generated. It is the precondition that makes an inference engine practical, and also the main source of memory pressure in long-context serving.
Models and algorithms27 views Attention MechanismThe attention mechanism is a computational method that lets a model dynamically allocate weights by importance when processing information, assigning each position in a sequence a learnable importance score and then aggregating information weighted by those scores. It is one of the most central building blocks of modern deep learning, and Transformer, BERT, GPT and almost all large language models are built on it.
Core concepts20 views Encoder and DecoderThe encoder and the decoder are a pair of basic components in sequence-to-sequence modeling: the encoder compresses the raw input into an internal representation, and the decoder then generates the output step by step from that representation. Together they form the backbone of mainstream architectures from machine translation to dialogue generation, and they are also the key coordinate for understanding the different variants of the Transformer family.
Core concepts21 views Latent SpaceLatent space is a class of low-dimensional or abstract feature spaces used inside a model to represent data; once data is mapped into this space, its originally high-dimensional, redundant and hard-to-use form is compressed into more compact vectors with more semantic structure. It is a core concept that recurs in autoencoders, generative models, representation learning and even recommender systems, and understanding latent space means understanding how a model understands data.
Core concepts22 views Feature EngineeringFeature engineering is the process of using domain knowledge and data transformation techniques to construct, from raw data, input features that better express the essence of the problem and are easier for a model to learn from. For a long time it was the most time-consuming and most decisive step in machine learning projects; although the rise of deep learning has weakened its visible role in some fields, it has not replaced it.
Core concepts24 views Curse of DimensionalityThe curse of dimensionality is the collective name for a series of phenomena in which, as the feature dimension rises, the volume of the data space expands sharply, so that samples become extremely sparse, distance metrics lose their discriminative power, and compute and storage costs rise quickly. It explains why modeling high-dimensional data must rely on dimensionality reduction, regularization or representation learning rather than merely adding features.
Core concepts19 views Model Evaluation and SelectionModel evaluation and selection is the process of using reasonable metrics and validation schemes to judge which of several candidate models or hyperparameter configurations performs better on unseen data and to adopt it. It determines the quality of what a machine learning project ultimately delivers and, to a large extent, the real performance of the model after deployment, and its importance is no less than that of modeling itself.
Core concepts24 views Softmax FunctionThe softmax function is a normalization function that maps a set of arbitrary real numbers into a probability distribution, with all output components positive and summing to one. It appears in the final layer of almost every multi-class neural network; it is the bridge between the raw scores a model outputs and interpretable class probabilities, and the standard component that pairs naturally with cross-entropy loss.
Core concepts26 views Loss FunctionA loss function is a differentiable scalar function that measures the gap between a model's predictions and the true target; training is essentially the continual adjustment of parameters to make it smaller. It is the key step that translates a business objective into a mathematical optimization objective, and choosing the wrong loss function sends the model in the wrong direction, which is why it is often called the first cornerstone of model design.
Core concepts29 views OptimizerAn optimizer is an algorithm that updates model parameters based on gradients; it decides in which direction to move, how large a step to take and whether to carry momentum. The loss function provides the terrain and backpropagation provides the slope, while the optimizer takes the actual step; it is one of the core variables determining whether training converges stably and how well it generalizes, and also the part most sensitive to tuning in practice.
Core concepts28 views Learning Rate SchedulingLearning rate scheduling means dynamically changing the learning rate during training according to a predefined rule instead of using one fixed value throughout. It formalizes the intuition of "large steps for exploration early, small steps for refinement late", directly determines convergence speed, final loss and generalization quality, and is the key element in a training recipe second only to the choice of optimizer.
Core concepts24 views Adam OptimizerAdam is a variant of stochastic gradient descent that combines momentum with adaptive learning rates, its full name being adaptive moment estimation. It maintains exponential moving averages of both the first and second moments of the gradient and scales the step size separately for each parameter; since its proposal around 2014 it has long been the default optimizer for large-model training, and it is also an unavoidable node in understanding modern training recipes.
Core concepts21 views Vanishing and Exploding GradientsVanishing and exploding gradients are two typical numerical pathologies of backpropagation in deep networks: the former leaves shallow layers with almost no effective parameter updates, while the latter makes update steps so large that training diverges. Together they reveal that depth is not a free lunch, and they are a necessary prerequisite for understanding residual connections, normalization, activation function choice and gradient clipping.
Core concepts27 views Data MixtureData mixture refers to setting sampling weights for data from different sources, domains and languages within a pretraining corpus, thereby determining the model's knowledge recipe. It is one of the cheapest yet most sensitive levers in large-model training: with the same total amount of data, simply changing the weights markedly shifts the distribution of the model's downstream capabilities.
Techniques28 views Corpus Quality FilteringCorpus quality filtering is the process of removing low-quality text with rules, models and statistical methods before pretraining or building a retrieval corpus. It determines what books the model grows up reading; under the same token budget, filtering often improves results more than simply adding data.
Techniques28 views Negative SamplingNegative sampling is an efficient approximation that rewrites the multi-class problem of picking the correct item from a huge number of candidates into several true-or-false binary judgments. It is the common foundation of Word2Vec, graph embeddings and two-tower retrieval training, and one of the most central steps in contemporary vector retrieval training pipelines.
Techniques25 views HNSW Graph IndexHNSW (Hierarchical Navigable Small World graph) is currently the most widely used graph index for approximate nearest neighbor search, proposed by Malkov and Yashunin. It has almost become the default index option for vector databases and is implemented by mainstream systems such as Milvus, Qdrant, Weaviate, pgvector and Faiss, long holding an advantage along the high-recall, low-latency axis.
Techniques19 views Query RewritingQuery rewriting is the practice of reconstructing a user's original question into a query better suited to the retrieval engine, using rules or a large model, before retrieval. It addresses the mismatch between the way people speak and the way a vector store or inverted index matches, and is one of the most cost-effective optimization steps in a RAG system.
Techniques24 views Small-to-Big RetrievalSmall-to-Big is a two-level chunking strategy: small chunks are used for vector retrieval to keep semantics focused, and once a hit is found, the large chunk to which it belongs is returned as context. It directly answers the fundamental tension in RAG that retrieval wants small chunks while generation wants large chunks, and is one of the most important engineering techniques in the chunking step.
Techniques25 views Multi-Channel RecallMulti-channel recall is the engineering practice of running several different retrieval channels in parallel at the retrieval stage, each independently fetching candidate documents, and then merging them into a unified candidate pool. It is first-class infrastructure in modern retrieval-augmented generation systems, because a single path inevitably has blind spots, and generative models have no way to compensate for missing context.
Techniques28 views ReAct ReasoningReAct is a prompting and execution paradigm that lets a large model alternate between reasoning and acting, its full name being Reasoning and Acting. Proposed by Yao et al. in a 2022 paper, it weaves thinking and doing into a single trajectory and lets the model call external tools while reasoning, and it is one of the most fundamental skeletons of agent architectures.
Techniques21 views Prompt Injection DefensePrompt injection defense is a set of engineering measures that prevent attackers from embedding instructions in input content to hijack model behavior. In an era when agents are heavily connected to external text and tools, it has moved from optional to security infrastructure on par with authentication.
Techniques27 views Context CompressionContext compression refers to techniques that retain as much effective information as possible within a limited window, reducing the number of input tokens by pruning, summarizing, rewriting or encoding. It is the key means by which long-context and multi-turn dialogue systems keep running without collapsing, and also the most direct means of controlling inference cost.
Techniques25 views Long-Text ProcessingLong-text processing refers to systematic methods of chunking, layering and iterating to accomplish understanding, summarization or question answering for inputs beyond what a model can reliably handle in a single pass. It is the core engineering problem of document intelligence, because real-world reports, contracts and code repositories always exceed the window, and the window itself is not necessarily better the larger it is.
Techniques24 views Structured Output JSON ModeStructured output is the ability to constrain a large model to generate content in a predetermined format, most commonly JSON, of which JSON Mode is the most typical kind. It turns the model's free text into data that downstream programs can parse directly, and is the key interface layer through which the model moves from chat to a system component.
Techniques18 views Reranker Model BGE-RerankerBGE-Reranker is a family of reranking models released by the Beijing Academy of Artificial Intelligence (BAAI), designed for fine-grained scoring of recall results in the second stage of a retrieval-augmented generation (RAG) pipeline. It does not perform retrieval itself but steps in after coarse ranking, reordering candidate documents by relevance to the question, and is the most direct and most effective link in improving retrieval quality.
Techniques16 views