Loading…
Glossary term
Running a trained model so applications can send it requests and receive results.
Serving is running a trained model behind an interface so applications can send it requests and receive results. A serving system handles loading the model, batching requests, scaling across machines and monitoring.
Specialized engines optimize this for large language models.
A minimal model API with FastAPI
from fastapi import FastAPI
app = FastAPI()
@app.post("/predict")
def predict(text: str):
return {"label": model(text)}A great model is useless without reliable, fast and affordable serving.