LESSON 115 / 215·2 min readIntermediate

Local LLMs, API models, and self-hosting

Good to knowConcept lesson
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

API
A way for one piece of software to ask another for data or an action. A claims API might return the current status of a claim.
AI
Software techniques for tasks such as recognizing patterns, understanding language or generating content.
Inference
Using a model that has already been trained to produce an answer or prediction.
More words from this lesson
Throughput
How much work a system can finish in a given amount of time.
Dependency
A library or package that your application relies on. Compatible versions help the application run as expected.
GPU
A processor designed to handle many numerical operations in parallel. It is often used for model training and inference.

🟡 GOOD TO KNOW · 🟢 ADVANCED for high-throughput serving and GPU optimization.

Overview

  • Local or self-hosted models run on infrastructure you control instead of a provider's shared inference API.
  • An API model outsources much of inference operation.
  • Self-hosting can mean a laptop, on-premises servers, or controlled cloud GPU infrastructure.

Why this matters

Some organizations need approved offline operation, specific deployment control, or economics suited to sustained utilization.

An everyday example

Run your own kitchen instead of ordering prepared meals; you gain control but must manage equipment and staffing.

A technical example

Deploy a permitted model behind an internal authenticated endpoint and benchmark it on your claim-extraction dataset.

How it works

  1. Select licensed model
  2. Choose runtime/hardware
  3. Load weights
  4. Expose secured inference
  5. Manage capacity and versions
  6. Evaluate and monitor.

Architecture and flow

Node AI adapter → private inference endpoint → model runtime/GPU → validated response.

The insurance assistant example

A restricted document-processing workload may run inside the insurer's controlled environment if quality and operating capacity meet requirements.

When to use it

Explicit deployment restrictions, offline use, or measured total-cost benefit with an operations team.

When to avoid it

Low traffic, insufficient hardware expertise, or quality gaps often favor an approved hosted provider.

Interview answer

“Self-hosting trades provider convenience for deployment control and operational responsibility. I compare quality and total cost at realistic utilization.”

Benefits, trade-offs, and production considerations

  • Local does not automatically mean private: logs, backups, downloads, remote access, and exposed ports still matter.
  • Check model licenses, patch runtime dependencies, and budget idle capacity, redundancy, and staff time.
PAUSE & RECALL

Can you explain it without the notes?

Local LLMs, API models, and self-hosting

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Local or self-hosted models run on infrastructure you control instead of a provider's shared inference API. An API model outsources much of inference operation. Self-hosting can mean a laptop, on-premises servers, or controlled cloud GPU infrastructure.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Ollama, Hugging Face, and Transformers

Adapted from 13_AI.MD · “Local LLMs, API models, and self-hosting”. Examples are study fragments; framework behavior can depend on your version.