AI Models · Tutorial 05
Choose where your AI model should run
Separate model quality from hosting, data access, and operating effort. Turn your comparison results into a practical deployment decision.

0 of 2 complete
Essentials · Step 2 of 2 · View the route
Last checked and updated: November 27, 2026. Editorial and source review; exercises below are authored practice, not reported benchmark runs.
The model that wins your comparison can still leave you with a second job: keeping it running. Choose where it runs by asking which work you want to own after the first good answer. This lesson turns your comparison sheet into a decision about access and hosting.
You will write a short decision record. You do not need to deploy anything to finish it.
Separate three decisions
Quality: Can this model produce an acceptable result on your task?
Access: Will you use a chat app, an API, or downloaded model weights? An API is a way for software to request a model response. Weights are the files that contain a trained model’s parameters.
Operation: Who runs the service, handles updates, and fixes failures?
“Frontier” describes a position near the leading edge of capability; “open-weight” describes access to model weights. They are not opposite ends of a quality scale. An open-weight model may be available through a hosted API as well as for self-managed deployment.
Compare operating arrangements
| Arrangement | What you take on | Check before choosing |
|---|---|---|
| Hosted chat app | Supplying context and reviewing results | Available tools, data policy, limits, and whether you can export your work |
| Hosted model API | Integration, request handling, usage monitoring, and review | Model version, endpoint behavior, data policy, and observed task cost |
| Self-managed model | Hardware, runtime, updates, access controls, monitoring, and review | License, hardware fit, output quality on your setup, and ongoing operating effort |
Use the arrangement that fits the work and the time you can spend maintaining it. Downloadable weights do not guarantee that a model will run usefully on your laptop, and they do not make compute or maintenance free.
Try the deployment you would actually keep
My default is the simplest permitted arrangement that passes the task checks. Self-management earns its upkeep when you need control over the deployment or have measured a useful advantage. Downloading weights is a starting point, not a reason to migrate.
Compare one hosted route and one self-managed candidate on the same non-sensitive input. If you cannot run one yet, mark it as a proposal rather than a tested alternative.
- Freeze the task. Save the prompt, input and acceptance checks. For a supplied-note update, require every stated fact to match the notes and every requested heading to appear.
- Identify the actual setup. Record the endpoint model ID or checkpoint revision, runtime version and quantization. Hugging Face’s download guide documents selecting a revision; a commit hash gives the record a specific download target.
- Use realistic input. Try the document length you expect to handle, and record failed requests as well as usable answers. If the workflow uses tools, check the resulting tool action, not just the model’s promise to act.
- Count the whole job. Record request charges where available, retries, review time and setup time separately. For self-managed inference, record hardware or rental costs and operating effort. Unknown costs stay unknown; do not turn a token-price comparison into a savings claim.
- Set a stopping rule. Decide what would make you reject the setup: an unmet data requirement, a failed task check, an unacceptable wait, or more maintenance than you can own.
A smaller download can change the comparison. Hugging Face explains that quantization reduces memory use by storing weights, and sometimes activations, in fewer bits, with trade-offs in accuracy and speed. Recheck the exact converted model you intend to serve. A result from another precision or runtime is useful background, not your deployment result.
Trace where your data goes
Draw the actual route: input file, app, model endpoint, tools, logs, and output. Check each service that receives the data. A locally running model can still be surrounded by tools that send requests elsewhere.
For example, Hugging Face’s download reference documents local_files_only=True for looking up cached files without downloading. Its environment-variable reference documents HF_HUB_OFFLINE=1 for avoiding Hub HTTP calls; a missing cached file produces an error. Set that variable before importing the library.
Those settings control Hugging Face Hub access. They do not disconnect a search tool, remote embedding endpoint or logging service. For an offline requirement, prepare the needed files first, then test the complete workflow in an environment with outbound access blocked and inspect attempted connections. A successful model load alone does not establish an offline agent.
| Component | Record in your decision |
|---|---|
| Model request | Destination, data sent and applicable service policy |
| Retrieval or search | Whether documents or queries leave the machine |
| Agent tools | Which tools can send data or change external state |
| Logs and traces | Storage location, access and retention settings |
If the model is local but the document search is hosted, write down that mixed arrangement explicitly. “Local AI” is too vague to describe the data route.
For work governed by an employer or client agreement, use their allowed services and data-handling requirements. Do not infer permission from the model’s price or license label.
Write the decision record
Use a real task, or keep the supplied-note update task from the previous lesson:
Task and expected output:
Quality checks and observed results:
Chosen model, version, and access route:
Checkpoint revision / endpoint ID, runtime, and quantization:
License or service terms checked, with date:
Where inputs, tool requests, and logs go:
Who handles setup, updates, and failures:
Observed cost or limits; unknown costs:
Why this is a better fit than the alternative:
Fallback if the chosen route fails:
When to reconsider:
Keep unknowns visible. If you have not measured latency on your hardware, write “unmeasured” rather than treating a provider demonstration as your own result.
Example: a decision with missing evidence
Hypothetical planning example, not a tested deployment: a team wants an agent to turn internal notes into a weekly update. Its approved hosted service is the first candidate because someone already owns that integration. A local checkpoint is the alternative if the team’s data requirements rule out the hosted route.
A useful provisional record says: “Test the approved endpoint on synthetic notes first. Accept only an update whose facts match the input. Local latency and operating cost are unmeasured. If neither route meets the data requirements, keep the update manual.”
That is enough to choose the next experiment. It is not enough to declare either model a winner. Replace the provisional entries with saved outputs and observations before treating the choice as validated. For release-specific license checks, use the open-weight lesson; for comparing cost per completed task, use the cost lesson.
Change one thing when the workflow fails
If a result misses a source fact, inspect the input and retrieval first. If a tool fails, check access and the tool response. If the model repeatedly fails a well-specified check, compare another model on the same input.
Changing the model, prompt, tools, and input together makes it hard to learn what helped. Save the failing example and make one deliberate change at a time.
You are finished when your record explains both why the model passes your quality bar and why its operating arrangement fits your situation. Return to the model-choice path to review your two deliverables. Use the model-family references when you need candidates for the next comparison.
Sources and checked date
Official primary documentation checked November 27, 2026; this is the review date, not a release date.
- Hugging Face download guide: cached downloads and revision selection.
- Hugging Face download API reference:
local_files_onlybehavior. - Hugging Face environment variables: Hub offline mode and when environment variables are read.
- Transformers quantization overview: memory, speed and accuracy trade-offs.
The trial and decision record are authored exercises. No hosted or local model was benchmarked for this refresh.