liveBook · Manning

Model artifact

As explained in Designing Deep Learning Systems: A guide for software engineers

A persisted file containing the data required to reconstruct or execute a trained machine learning model.

A model artifact is a persisted package of files that lets a serving system initialize and execute a trained model. In production, the predictor retrieves artifacts, loads them into memory, caches them, and uses them to answer inference requests. section 7.1.4 section 10.2.5

A deployable artifact commonly separates model execution data from descriptive metadata:

  • model.pth stores the trained model state used when initializing the model graph. section 7.1.4
  • vocab.pth supplies vocabulary data required to preprocess incoming text. section 7.1.4
  • manifest.json records algorithm, framework, versions, model identity, code and model versions, and output-class mappings. section 7.1.4
  • A model manager resolves the model identifier, loads the files, initializes the architecture, and caches the ready model. section 7.1.4

Artifact lookup during inference

A frontend sends a model identifier and document to a gRPC predictor. The predictor loads that model's artifact from shared storage, preprocesses the document, executes the cached model, and returns the prediction. In a larger deployment, a model service queries a metadata and artifacts store for the matching inference container and model file. section 7.1.4 section 10.2.5

├── manifest.json                          #1
├── model.pth                              #2
└── vocab.pth                              #3
 
// A sample manifest.json file 
{
  "Algorithm": "intent-classification",    #4
  "Framework": "Pytorch",
  "FrameworkVersion": "1.9.0",
  "ModelName": "intent",
  "CodeVersion": "80bf0da",
  "ModelVersion": "1.0",
  "classes": {                             #5
    "0": "cancel",
    "1": "ingredients_list",
    "2": "nutrition_info",
    "3": "greeting",
     .. .. ..
}

Inspect a concrete artifact directory and manifest, including framework versions, model identity, and class mappings. section 7.1.4

How Designing Deep Learning Systems: A guide for software engineers covers it

How deep it goes
Descends to file layout, manifest fields, model initialization, caching, and inference lookup, but not artifact-building procedures.
Examples
Uses model.pth, vocab.pth, manifest.json, shared storage, gRPC prediction, and a model manager as concrete artifacts and serving components.
What it assumes
Assumes familiarity with trained models and inference services while teaching artifact contents and loading responsibilities concretely.
What you can do after
Operate/configure a predictor that resolves model identifiers, loads matching artifacts, caches initialized models, and serves inference requests.
How it connects
Connects model serving, model managers, metadata and artifact stores, model registries, reproducibility, and model inference.

Also explained in

Compare how 2 books explain model artifact →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing Deep Learning Systems: A guide for software engineers. The section links point to the parts of the book it draws on.