Model Serving & Inference · 2 to 3 hours
Choose a hosted API or a self-hosted model
Compare a hosted model API with a self-hosted open-weight model for a live tutor and a nightly scoring job: apply a quality gate, compute monthly cost at real utilization and the breakeven volume, check a data-location rule, and say what would reverse the choice.
Conceptual comparison
3 h
1
Step 1: The question
The team asks whether each workload should stay on the hosted API, move to the self-hosted open-weight model, or split. For the tutor and for essay scoring, state the workload's goal and constraints, compare both options on the same dimensions (quality gate, monthly cost at real utilization and the breakeven, latency and capacity, the district rule, lifecycle, and operations), and recommend one option per workload. Name the evidence that would settle what is still uncertain and the change that would reverse each recommendation.
Scenario: a live tutor and nightly essay scoring
All figures are synthetic; the provider, models, and prices are fictional. Months have 30 days (720 hours).
Suppose a language-learning app runs two AI workloads on a hosted model API, and a school district's contract starts in 10 weeks. Should each stay hosted or move to an open-weight model on the company's own GPU nodes?
| Conversation tutor (live chat) | Essay scoring (nightly batch) | |
|---|---|---|
| Volume | 432,000 turns a day (5 per second on average) | 100,000 essays a night |
| Traffic shape | 15 per second for about 3 hours on school-day afternoons; about 1 per second 22:00 to 06:00 | Submitted by 22:00, due by 06:00 (8 hours) |
| Tokens per request | 1,200 input, 100 output | 2,500 input, 500 output |
| Target | Daily p95 time to first token (TTFT) at most 800 ms | Every score delivered by 06:00 |
District rule. 40% of the essays come from the district. They must be processed in its region, no model provider may keep an essay or its output after the request, and the company's own copies (logs, traces, backups) must stay in that region. The tutor is not covered.
Option H: hosted API, pinned model version H-M
- $0.20 per million input tokens, $2.60 per million output tokens.
- Account limit for H-M: 1,500,000 tokens per minute (input plus output), shared by both workloads; higher limits on request, no committed date.
- Standard endpoint: any of the provider's regions. Regional endpoint: the chosen region only, at 15% more per token.
- Both endpoints keep inputs and outputs up to 30 days for abuse monitoring. Zero retention needs the provider's approval; the team applied two weeks ago and has no decision date.
- Versions retire with notice and a named successor.
- Tutor, last 30 days: daily p95 TTFT 500 to 650 ms. On 3 days the busiest hour's p95 reached 1.2 s, with all the extra time before the provider's first byte.
Option S: self-hosted open-weight model O
- O's license allows commercial use. Nodes in the district's region: $7.20 per node-hour, billed per minute while running; about 20 minutes to start one and load O; quota 6 nodes, about two weeks to raise.
- Two-week pilot on the company's prompts, per node: 10 tutor turns per second with p95 TTFT at or below 800 ms (450 ms at 7.5 per second); 5 essays per second with large batches.
- Tutor pool rule: the fewest nodes that keep the peak at or below 75% of their combined measured rate, plus one spare, running around the clock (a burst starts faster than a node can be added).
- Essay batch rule: plan at 80% of the measured rate (this covers start-up, retries, and uneven essay lengths); nodes run only during the batch, enough to finish within 6 of the 8 hours.
- People: any self-hosting takes about 0.4 of an engineer ($6,500 a month, one workload or both). One platform engineer has run GPU serving; the six-person on-call rotation would take serving pages after training.
Quality (the company's suites; same prompts and grading for both models)
| Suite and slice | Cases | H-M pass | O pass |
|---|---|---|---|
| Tutor: high-resource languages | 400 | 372 | 368 |
| Tutor: low-resource languages | 100 | 84 | 70 |
| Tutor: grammar correction | 100 | 84 | 84 |
| Tutor overall | 600 | 540 | 522 |
| Essays: argument | 250 | 232 | 231 |
| Essays: narrative | 250 | 228 | 224 |
| Essays overall | 500 | 460 | 455 |
Tutor pass: teachers rate the conversation 4 or 5 of 5. Essay pass: within one point of the teachers' score (6-point scale).
Quality gate. A model may replace H-M for a workload only if its pass rate is at most 2.0 percentage points below H-M's overall and at most 5.0 points below on every slice of that workload's suite.
Constraints
- Use only the scenario's figures; all are synthetic. Months have 30 days (720 hours).
- Apply the planning rules and the quality gate exactly as stated.
- Keep the spoken answer to about five minutes, with one comparison table per workload.
Deliverables
- One comparison table per workload with both options on the same dimensions
- The quality-gate result for each workload, by slice
- Monthly cost each way, the tutor pool's utilization against its breakeven, and the essay breakeven volume
- Tail latency, rate-limit headroom, node start time, and quota for each workload
- Which configurations may take the district's essays, and the lifecycle and staffing each option brings
- A recommendation per workload, the evidence that would settle the open points, and the change that would reverse each recommendation
2
Step 2: Hints
Optional. Each hint gives a little more away.
3
Step 3: Your answer
Kept in this browser. Saving your score below keeps a copy with it.
0 / 5000
4
Step 4: Reference answer
5
Step 5: Score yourself
Score each dimension 0, 1, or 2, then save the score to your history. Readiness thresholds are editorial estimates.
Grades your written answer against this rubric with your own AI provider key from Settings. It is a second opinion: the score you save is still yours.
What earns a 2: Converts the suite counts to rates, applies both gate limits to every slice of each workload before comparing cost, and says what the slice sizes can and cannot resolve.
What earns a 2: Prices both options per request and per month from tokens and from node-hours under the stated planning rules, includes spare capacity and people time, and derives a breakeven utilization and a breakeven volume.
What earns a 2: Compares measured tail latency, rate-limit headroom at the peak, node start time, and quota for each workload's traffic shape, and checks them again after growth.
What earns a 2: Checks region and retention separately for every configuration, including the company's own logs and any fallback route, and states what deprecations and staffing mean for each option.
What earns a 2: Gives a recommendation per workload that meets every gate and data rule the scenario states, after stating each workload's goal and constraints; names the evidence that would settle each open point; and states a concrete change in a scenario input that would reverse each recommendation.
0 of 10 · Scored 0 of 5 dimensions
Ready at 8 of 10, with no 0 in Quality gate on your own tasks or Cost at real utilization or Decision, evidence, and reversal
Kept in this browser until you sign up, then it moves to your account.
Complete this level when you can compare both options for each workload on the same dimensions with figures you computed, apply the quality gate and the data rule before cost, and say which change in the inputs would reverse each recommendation.
Your saved scores
Practice saves and mock interview answers on this question, newest first.
No saved scores yet. Score every dimension, then save.
6
Step 6: Follow-up questions
An interviewer may ask these next.
What does utilization do to the cost per request of a self-hosted pool?
Which two questions does a data-location rule ask of a provider's terms?
What does a hosted model's retirement notice require you to do?
Which self-hosting costs stay the same as traffic changes, and why do they matter?
What must a fallback path satisfy before it can take traffic?
7
