Skip to content
Rabin Poudyal
Rabin Poudyal
All writing
AI / MLSeptember 27, 202615 min read

8 AI Model Types Explained: LLM, MoE, VLM, SLM and More

What LLM, MLM, SLM, LCM, MoE, VLM, SAM and LAM actually mean, how they differ, and why the eight names collapse into four design decisions.

Abstract network of connected nodes, representing the eight model architectures compared in this article

Eight acronyms get passed around as though they named eight kinds of model: LLM (large language model), MLM (masked language model), SLM (small language model), LCM (large concept model), MoE (mixture of experts), VLM (vision-language model), SAM (Segment Anything Model) and LAM (large action model). I have sat in enough architecture reviews to know how that list gets used: as a menu, one item per system, chosen early and then designed around. It is a bad menu, because the items are not alternatives to one another.

Check the vocabulary against the models people actually deploy. DeepSeek-V3 is an LLM and an MoE at the same time. Phi-3-mini is an SLM that is also, unambiguously, an LLM. LLaVA is a VLM built by bolting a vision encoder onto a pretrained LLM. Meanwhile MLM names a training objective, SLM names a deployment budget, SAM names a task domain, and LAM names something closer to an aspiration than a settled architecture. Eight names, at least four different ways of dividing things up, and nothing in the vocabulary that tells you which is which.

A set of terms earns its keep by sorting cleanly: the categories should not overlap, and they should all split along the same line. These do neither, and the way they fail is more useful than the list itself. What follows reads the eight against the papers that introduced them and recovers the axes they actually vary along. There are four of them, they combine freely, and once you can name the axis a term sits on, the term stops being something to choose and becomes a consequence of a decision you already made.

The token predictors

Three of the eight, LLM, MLM and SLM, are the same substrate under different constraints. Telling them apart means separating the training objective from the scale.

LLM: the causal baseline

The modern large language model rests on two results. The first is architectural: Vaswani et al. (2017) dropped recurrence in favour of self-attention, which made sequence modelling easy to parallelise and therefore easy to scale. The second is empirical: Brown et al. (2020) trained a 175-billion-parameter autoregressive model and showed that task competence could be drawn out "without any gradient updates or fine-tuning, with tasks and few-shot demonstrations specified purely via text interaction." On that showing, capability was not something you fine-tuned into a model. It was something that fell out of scale.

LLM: causal next-token prediction Context tokens are embedded, passed through a stack of causal-masked transformer blocks, and turned into a distribution over the next token, which is sampled and appended before the whole loop runs again. Encode Compute Emit Context tokens w1 … wt Embedding token + position Transformer stack N blocks, causal mask Output projection logits over vocab Token distribution p(w t+1) over vocab Sample a token greedy or stochastic append, then predict again
Generation is a loop: every emitted token re-enters the context and the whole stack runs again.

Tokenize, embed, run the stack, project to logits: that pipeline is what most descriptions of an LLM amount to, and it is accurate as far as it goes. It says nothing about the harder question, which is how to spend a compute budget. Kaplan et al. (2020) established that loss falls as a power law in parameters, data, and compute. Hoffmann et al. (2022) then corrected how that budget should be split: training over 400 models from 70M to 16B parameters on 5B to 500B tokens, they found that parameters and tokens should grow in roughly equal proportion. Their 70B Chinchilla, trained on 1.4T tokens, beat the much larger Gopher and reached 67.5% on MMLU (Massive Multitask Language Understanding, a 57-subject exam benchmark), a gain of more than seven points. The field had been building models too large and feeding them too little.

That correction is the hinge on which SLM turns.

MLM: the bidirectional counter-tradition

Masked language modelling is not a smaller or older species of LLM. It is a different objective with a different theory of what a representation is for. Devlin et al. (2018) trained BERT "to pre-train deep bidirectional representations from unlabeled text by jointly conditioning on both left and right context in all layers," pushing GLUE (General Language Understanding Evaluation) to 80.5%, a 7.7-point absolute improvement, and setting new results on eleven tasks.

The trade is explicit and permanent. Reading both directions gives representations better suited to classification, retrieval, and extraction. Giving up left-to-right order rules out generation.

MLM: bidirectional masked prediction Left context, a masked position and right context all feed a bidirectional encoder, which both recovers the masked token and produces contextual vectors used for classification and retrieval. Corrupted input Encode Objective Downstream Left context the cat sat Masked position the token to recover Right context the mat Bidirectional encoder attends both ways Prediction head recover the masked token Contextual vectors one per position Downstream use classify, retrieve, embed
Both directions reach the masked position at every layer, and that is exactly what rules out generation.

Two later results complicate the textbook account. The canonical 15% masking rate turns out to be folklore rather than a finding: Wettig et al. (2022) showed that masking 40% outperforms 15% for BERT-large on GLUE and SQuAD (Stanford Question Answering Dataset), and that even 80% masking keeps much of the downstream performance. Their explanation is that the masking rate balances two effects that pull against each other: heavier corruption makes the task harder, but it also yields more predictions per sequence, and larger models, with capacity to spare, do better on the harder task. Clark et al. (2020) attacked the same inefficiency from another direction: ELECTRA replaces masked-token prediction with replaced token detection, a task defined over every input position rather than the masked minority, and matches RoBERTa's quality on roughly a quarter of the compute.

That the encoder tradition is still alive rather than a leftover is the point of Warner et al. (2024). ModernBERT retrofits a decade of decoder-side engineering onto the encoder: 2 trillion training tokens, a native 8,192-token context, the Next-Sentence Prediction objective dropped as "noticeable overhead for no performance improvement," and a 30% masking rate that ratifies Wettig's correction. At 149M and 395M parameters, it is three orders of magnitude smaller than a frontier decoder and still the right tool for a large class of production work. Its main production use is producing embeddings, which brings its own data-engineering problem: see why embeddings break your audit trail.

SLM: a budget, not an architecture

The usual account of an SLM is a list of deployment techniques: compact tokenization, quantization, edge packaging. That is engineering, and it comes after the two mechanisms that actually make a small model worth deploying.

Two mechanisms make small models good rather than merely small. The first is knowledge distillation, where Hinton, Vinyals, and Dean showed that a compact student can inherit the behaviour of a larger teacher by matching its soft output distribution. The second is data curation, and its most forceful demonstration is the Phi-3 technical report: phi-3-mini, at 3.8B parameters trained on 3.3T heavily filtered and synthetic tokens, reaches 69% on MMLU and 8.38 on MT-bench (a multi-turn conversation benchmark), comparable to Mixtral 8x7B and GPT-3.5, while running locally on a phone. That is Chinchilla's lesson pushed past its original conclusion: if tokens can substitute for parameters, a small model trained far beyond compute-optimality buys deployability at a training cost you pay once.

SLM: a deployment budget, not an architecture A frontier teacher supplies soft targets and a curated corpus supplies tokens to a compact student, which is then quantized and deployed to a consumer device to serve narrow, repetitive agent calls. Supervision Train Compress Deploy Frontier teacher soft targets Curated corpus filtered · synthetic Compact student a few billion params Quantization low-precision weights Consumer device narrow, repetitive calls
Distillation and curation, not a different architecture, are what make a small model good.

Belcak et al. (2025) push this into an argument about system design. They define an SLM by what it can do rather than by its size: a model that runs on a common consumer device with latency good enough for a single user. They then argue that agentic systems, which call a model over and over for narrow, repetitive subtasks, are badly served by routing every call to a frontier model. The unit of analysis is the invocation, not the benchmark.

Changing the unit of prediction: LCM

Every architecture above predicts a token. The Large Concept Model asks what happens if the unit of prediction is a concept instead.

The LCM team at Meta (2024) define a concept as a sentence, and represent it in SONAR, a fixed-size embedding space from Duquenne, Schwenk, and Sagot covering 200 languages across text and speech. The model then predicts one sentence at a time: it emits points in a continuous semantic space, and a SONAR decoder turns them back into any supported language or modality.

LCM: prediction in a sentence embedding space Source text is segmented into sentences, encoded into fixed-size SONAR concept embeddings, predicted autoregressively in that embedding space, and decoded back into any supported language or modality. Text Segment Embed Predict Source text any supported language Segmentation one concept per sentence SONAR encoder 200 languages, + speech Concept prediction regression, not softmax SONAR decoder embedding to surface Any language or any modality
The unit of prediction changes from a token to a sentence embedding, turning generation into regression.

Predicting a point in a continuous space is regression, not classification over a vocabulary, so the paper works through three families of solution: MSE (mean squared error) regression, diffusion-based generation, and modelling over a quantized SONAR space, at 1.6B parameters on 1.3T tokens and 7B on roughly 2.7T. Evaluated on summarization and a new summary-expansion task, the models generalise well zero-shot across languages, beating same-size LLMs.

Abstraction is where the interesting claim sits. A token-level model has to hold the shape of an argument implicitly in its activations while emitting one subword at a time. A model whose atoms are sentences plans at the level at which people actually organise an argument. Whether that advantage survives contact with the enormous engineering surface built up around token-level modelling is still open, and the paper is refreshingly candid in calling itself a feasibility study rather than a replacement.

Changing the allocation of compute: MoE

Mixture-of-Experts is the clearest case of a term that does not belong in the same list as its neighbours. It is not a kind of model. It is a way of spending parameters, and it combines with almost every other term here.

The idea long predates the transformer. Jacobs, Jordan, Nowlan, and Hinton (1991), writing in Neural Computation, proposed training several networks alongside a gate that hands each case to some of them, so that experts specialise rather than get in each other's way. Shazeer et al. (2017) made it a deep-learning primitive, inserting a sparsely-gated layer of up to thousands of feed-forward subnetworks between LSTM (long short-term memory) layers and reporting capacity gains exceeding 1000× at minor cost in efficiency.

The governing insight is the split between total and active parameters. Knowledge scales with the total; inference cost scales with what actually runs.

MoE: sparse routing decouples knowledge from cost A router scores every expert and executes only the top-k, leaving the rest dormant, so total parameters carry the knowledge while inference costs only the experts actually activated. Expert pool Token one representation Router softmax over experts Expert 1 executed Expert 2 dormant Expert 3 executed Expert 4 dormant Weighted combine paid for: k of 4
Total parameters carry the knowledge; only the routed experts are paid for at inference.
def moe_layer(x, experts, router, k=2):
    # Router scores every expert; only the top-k ever run.
    scores = softmax(router(x))               # [n_experts]
    idx, w = top_k(scores, k)                 # sparse selection
    return sum(w[i] * experts[j](x) for i, j in enumerate(idx))

Sparsity is not free, and the literature is largely a record of paying for it. Fedus, Zoph, and Shazeer (2021) simplified routing to a single expert per token, trained in bfloat16, and reported up to 7× faster pre-training than a comparable T5. Zoph et al. (2022) took on the instabilities of sparse training and introduced the router z-loss, which penalises large logits going into the router's softmax and so damps the loss spikes that derail large sparse runs; their 269B-parameter ST-MoE-32B, at the compute of a 32B dense model, reached 91.2 on SuperGLUE, the harder successor to GLUE.

Two production systems show where the technique has arrived. Mixtral 8x7B places eight feed-forward experts at every layer and routes each token to two, so that 47B total parameters resolve to roughly 13B active per token. DeepSeek-V3 scales the same deal to 671B total and 37B active, and replaces the usual auxiliary load-balancing loss, which improves balance at some cost to the language-modelling objective, with an auxiliary-loss-free strategy, alongside multi-head latent attention and a multi-token prediction objective. It was pre-trained on 14.8T tokens for 2.788M H800 GPU-hours.

Notice what that does to the vocabulary. DeepSeek-V3 is an MoE and an LLM at once, and there is no contradiction in it: one word answers a question about routing, the other about objective and scale.

Changing the modality: VLM

Vision-language models are likewise better understood as a way of combining parts than as a separate lineage, and the literature reads as a steady reduction in what has to be trained.

CLIP established the substrate. Radford et al. trained image and text encoders contrastively on 400 million pairs collected from the web, producing a shared embedding space in which zero-shot classification becomes a matter of comparing an image against text descriptions of the classes. The model matched the original ResNet-50 on ImageNet "without needing to use any of the 1.28 million training examples it was trained on." Supervision by plain language, rather than by a closed label set, is what buys the open vocabulary.

Flamingo then addressed fusion: Alayrac et al. bridged frozen vision-only and language-only models, handled sequences with images and text interleaved in any order, and thereby inherited the in-context few-shot behaviour of the language model for multimodal tasks. BLIP-2 made the bridge cheaper: a lightweight Querying Transformer sits between a frozen image encoder and a frozen LLM as an information bottleneck, passing on only the visual features the language model can use, and it outperforms Flamingo by 8.7% on zero-shot VQAv2 (visual question answering) with 54× fewer trainable parameters. LLaVA cut the connector down to a linear projection and moved the difficulty into data, using language-only GPT-4 to synthesise 150K visual instruction-following examples; fine-tuned on ScienceQA it reaches 92.53%.

VLM: a trained connector between frozen models A frozen vision encoder and a frozen language model are joined by a trained connector, which converts patch features into visual tokens the language model can consume alongside the text prompt. Frozen Trained Image pixels Vision encoder frozen Connector the only trained part Text prompt the question Language model frozen Grounded answer text patch features become visual tokens the interface keeps shrinking: cross-attention, then a Q-Former, then one projection
Two frozen models and one trained bridge. The bridge is what each generation of the literature shrank.

The trajectory is unmistakable. The interface between modalities has shrunk from a trained cross-attention stack to a single matrix, and the binding constraint has moved from architecture to instruction data.

Changing the domain: SAM

Segment Anything is the one term here that names a task rather than a mechanism, and it earns its place for a reason worth stating plainly: it shows that the promptable-foundation-model recipe carries over outside language.

Kirillov et al. (2023) reframed segmentation as a promptable problem: given a point, box, or mask, return a valid object mask. That makes zero-shot transfer to new data a matter of composing a prompt rather than retraining. The decisive contribution is the method: a data engine in which the model and the annotators improve one another in a loop, yielding SA-1B, over one billion masks on eleven million licensed, privacy-respecting images, and zero-shot performance often competitive with earlier fully supervised results.

SAM 2 extends this to video with the smallest change that works: a streaming memory. Before the mask decoder acts, per-frame embeddings are conditioned, via memory attention, on a FIFO (first in, first out) bank of recent frames and earlier prompts, so an object's identity persists across time and a correction on one frame carries forward. The same engine produced SA-V, 50.9K videos and 642.6K masklets, comprising 35.5M masks. SAM 2 achieves better video accuracy with three times fewer interactions, and is six times faster than SAM on images.

SAM: promptable segmentation and its data engine An image encoder runs once per frame and a prompt encoder handles points, boxes or masks; a lightweight mask decoder combines them, and annotator corrections feed a data engine that retrains the encoder. Input Encode Decode Prompt point, box, or mask Prompt encoder lightweight Image or frame any distribution Image encoder heavy, run once Mask decoder interactive, real time Object mask valid for the prompt Data engine annotators correct it
The data engine is the contribution: the model labels the data that trains the model.

Segmentation is the demonstration; the transferable lesson is that when labels are scarce, the model that labels its own training data is the one that scales.

Changing the output space: LAM

Large Action Model deserves the most scepticism of the eight, and I say that as someone who builds agentic systems for a living. Grounding is the recurring difficulty in that work, and it is the same one that decides which agent patterns improve an answer and which only resample it. It is the only one of these terms whose referent is not yet stable.

The research behind it is real. SayCan supplied the core insight: a language model can propose what is sensible but knows nothing about what is possible, so its proposals have to be weighted by learned affordance functions that know the embodiment. Across 101 real-world kitchen tasks, that grounding nearly doubled performance over ungrounded baselines. ReAct interleaved reasoning traces with actions so that each could correct the other. Toolformer removed the annotation bottleneck by letting the model propose its own API calls, run them, and keep only the ones that demonstrably improved the next token prediction. Wang et al. (2024) pulled these strands into an end-to-end account of how a LAM gets built, covering data collection, training, environment integration, grounding, and evaluation, with a Windows OS agent as the case study.

LAM: proposal constrained by affordance A language model proposes candidate actions, affordance scoring filters them to what is possible in the environment, the best action executes, and perception feeds the resulting state back for rescoring. Propose Ground Act Goal in natural language Candidate actions what is sensible Affordance scoring what is possible Execute highest-scoring action Environment desktop, browser, robot Perception read back the state rescore against the new state, then act again
The language model supplies what is sensible; affordance scoring supplies what is possible.

Now the evidence on the other side. OSWorld evaluates agents on 369 tasks in real desktop and web environments. Humans complete over 72.36% of them; the best model at publication managed 12.24%, failing chiefly at GUI (graphical user interface) grounding and operational knowledge. Generation is not the bottleneck. Perception and grounding are.

This is why the tidy pipeline usually drawn for a LAM, perception then intent recognition then task decomposition then action planning then feedback integration, should be read as a research programme rather than a description of something that works. Each stage is a live problem, and setting them out in order makes the sequence look solved when not one of them is.

Four axes, restated

Four axes, and where the eight names sit on them Four axes of variation on the left (unit of prediction, allocation of compute, modality and domain, and output space), each connected to the model families that differ along it, with LAM singled out as the one whose difficulty is grounding rather than generation. The axis that varies What sits on it Unit of prediction token, or concept Compute allocation dense, or routed Modality, domain text, pixels, regions Output space a token, or an action LLM · MLM · SLM ↔ LCM objective and scale, then concepts dense ↔ MoE total params vs active params VLM · SAM encoder bolted to a frozen stack LAM grounding, not generation
Each family on the right is a position on the axis to its left. Read down the left column and the eight names stop looking like eight kinds of thing.

Reorganised by how they divide things up rather than by name, the eight resolve as follows.

AxisQuestion it answersFamilies
Unit of predictionWhat does the model emit?LLM / SLM / MLM (token), LCM (sentence embedding), SAM (mask), LAM (action)
Objective and directionalityWhat is the training signal?Causal (LLM, SLM, LCM), bidirectional (MLM), promptable segmentation (SAM), contrastive (VLM's encoder)
Allocation of computationDo all parameters run on every input?Dense (default), sparse (MoE)
Deployment budgetWhat must it run on?Frontier (LLM), consumer device (SLM)

Read this way, the apparent proliferation contracts. There are far fewer than eight independent ideas in the vocabulary, and the ones that remain combine freely: an MoE can be a VLM, an SLM can be distilled from an LLM, an encoder can be modernised without becoming a decoder.

What the vocabulary gets right

For all the category errors, these eight names carry one idea correctly, and it is the one that matters in practice: the transformer is a substrate, not a product. What varies between these families is the choice of what to predict, how to supervise it, how much computation to spend, and where it must run. Those choices matter enough that treating "use an LLM" as an architectural decision is a category error of its own.

The same discipline applies one level up, at the infrastructure a model runs on, which I set out separately in the four decisions that shape an Amazon Web Services (AWS) AI architecture. There too the useful question is which options a choice rules out, not how many options exist.

The engineering that follows is unglamorous. A classification problem over short documents wants a 395M-parameter bidirectional encoder, not a frontier decoder behind an API. A repetitive agentic subtask wants a model that fits on the machine making the call. A retrieval problem over images wants a contrastively trained joint space, and a retrieval problem over text wants dense and lexical search together because they fail on different queries. Picking the smallest model whose built-in assumptions match the problem is not thrift for its own sake; it is usually also the more accurate choice, though model size is a smaller lever on the bill than most teams expect.

And the questions are still open. The published record says that masking rates were wrong for four years, that model-to-token ratios were wrong for two, that the interface between vision and language could shrink to a single matrix, and that the best desktop agents remain six times worse than the humans they are meant to relieve. A vocabulary that presents any of this as settled is describing the field's habits, not its findings.

#architecture#mixture-of-experts#multimodal#taxonomy#foundation-models