liveBook · Manning

Deployment

As explained in Domain-Specific Small Language Models

Deployment is the process of making software, models, or other computational systems available to operate in a target environment.

Deployment makes a model available for inference in a target environment. For language models, the choice depends on memory needs, hardware, and where the model will run. section 4.2 section 11.0

Deployment decisions include:

  • Estimate inference memory from the model’s parameter count and chosen precision; the estimate includes an average 20% overhead. section 4.2
  • Choose an environment and serving approach: options include vLLM, FastAPI, and on-device deployment with MLC LLM. section 11.0
  • For private, offline Android deployment, PyTorch alternatives include MLC LLM; the workflow involves model conversion and compilation. section 11.4 section 11.4.1

Memory estimates

A 2.7-billion-parameter GPT-Neo model is estimated at 12.96 GB in FP32 and 5.4 GB in FP16. A Mistral 7B model is estimated at about 33.6 GB in FP32 and 16.2 GB in FP16. section 4.2

An MLC LLM Android deployment proceeds from local build to installation:

  • Install prerequisites, then build the runtime and selected model libraries. section 11.4.1
  • Customize and build the template Android app, bundle it with model weights, and install the APK and weights on the target phone. section 11.4.1
  • Check target hardware, benchmark performance, and optimize the model as needed. section 11.4.1

How Domain-Specific Small Language Models covers it

How deep it goes
Estimates inference memory from parameter count and precision, then outlines MLC build-to-install steps without detailing every serving option.
Examples
Uses GPT-Neo and Mistral 7B memory estimates and an MLC LLM workflow for Android phones.
What it assumes
Requires local build prerequisites, including Android Studio, Rust, the Java Development Kit, and the NDK.
What you can do after
Build and install an Android SLM app with MLC LLM by compiling runtime and model libraries, bundling weights, and installing the APK.
How it connects
Connects inference deployment to GPU memory sizing, precision, model serving, and on-device inference.

Also explained in

Compare how 24 books explain deployment →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Domain-Specific Small Language Models. The section links point to the parts of the book it draws on.