Model

Published 2026-08-21

Layer 1: What Is a Model?

Understand the basic building blocks of an AI model from an engineering perspective, and how core concepts such as model, architecture, parameters, weights, configuration, and Tokenizer relate to each other.

Core question: What exactly do we mean by a "model"?

Key concepts: Model, Architecture, Parameters, Weights.

Complete model lifecycle overview:

Definition

Model does not mean exactly the same thing in every context. This article focuses on large language models and multimodal generative models, using model repositories published on Hugging Face as engineering examples.

ContextWhat "model" usually meansExamples
Machine learningA mathematical system trained on data that can compute outputs from inputsClassification model, language model, diffusion model
ArchitectureA computation structure or designTransformer, Decoder-only, Diffusion Transformer
WeightsA concrete set of parameter values from a particular training runWeights of Qwen3.8-27B
EngineeringA complete set of downloadable, loadable, runnable model resourcesA Hugging Face model repository

Sometimes people call "Transformer" a model, sometimes a .safetensors file a model, and sometimes an entire Hugging Face repository a model. These are not all the same layer of meaning.

When this article says "a runnable model," it mainly uses the engineering sense: trained weights at the core, plus architecture implementation, configuration, Tokenizer or Processor, and other supporting resources.

Concepts

Conceptually, or as a mental picture:

  • A model is a mathematical system that can compute outputs from inputs. Its architecture defines how the computation works, while the specific parameter values are obtained through training.
  • Architecture is like a pre-designed computation framework; weights are the large set of numeric values filled in during training. Together they form a model with concrete capabilities.

In abstract terms, a model is a mathematical system that obtains parameters through training and can compute outputs from inputs.

From an engineering implementation perspective:

Architecture implementation
+ Trained weights
+ Model configuration
+ Tokenizer / Processor
+ Inference framework
β‰ˆ A model that can be loaded and run
  • The "model core":
Model core = Architecture + Trained Parameters
  • Runnable model package:
Runnable model package β‰ˆ
Model core
+ Config
+ Tokenizer / Processor
+ Generation Config
+ Chat Template
  • The inference framework is what actually runs the model package, for example:

    • Transformers
    • vLLM
    • llama.cpp
    • ComfyUI
    • Diffusers

Architecture Overview

Model
β”‚
β”œβ”€β”€ Architecture
β”‚   └── Defines which computation modules the model consists of, and how data flows
β”‚
β”œβ”€β”€ Parameters / Weights
β”‚   └── Large numbers of values learned through training
β”‚
β”œβ”€β”€ Input Representation
β”‚   β”œβ”€β”€ Tokenizer (text)
β”‚   └── Processor (image / audio / video)
β”‚
└── Configuration
    β”œβ”€β”€ Model Config (model structure configuration)
    └── Generation Config (generation configuration)

Different states of a model:

Classification dimensionCommon states
By training stagePretrained, Instruction-tuned, Fine-tuned
By numeric / deployment formBF16, FP16, FP8, INT8, INT4, Quantized
By completenessBase, Pruned, Distilled
By use or capabilityText, Vision-Language, Embedding, Reranker

In engineering practice, a "model" is not always a single file; it often appears as a model repository composed of weights, configuration, tokenizer, preprocessing rules, and documentation.

Example

Taking the Qwen3.8 model as an example, its structure includes weight files, structure configuration, Tokenizer, input preprocessing rules, generation configuration, and more.

Where:

  • Architecture configuration and weights determine the model itself;
  • Tokenizer and preprocessing configuration turn inputs into a form the model can accept;
  • Chat Template and Generation Config govern interaction and generation behavior;
  • Model Card and License describe the model's capabilities, usage, and usage boundaries.

Summary

A model is a computation system made of architecture and parameters; it obtains weights through training and converts inputs into outputs. Training results are saved as a set of files in a model repository, and are finally loaded into memory and VRAM by an inference framework to run.

Architecture defines how the model "computes"; weights store what the model "has learned." In engineering, they also need to work together with configuration, Tokenizer, or multimodal Processor resources to be loaded and used correctly.