Give a dedicated Hugging Face Inference Endpoint two daily settings: allow zero replicas after an overnight idle timeout, then restore a one-replica minimum before the first morning job. The overnight setting gives the endpoint permission to scale down; it does not turn it off at the scheduled minute. Estimate savings from billable replica time, and keep the schedule only if the first batch still meets its deadline.

Last reviewed: 2026-11-22 (Asia/Shanghai; 2026-11-21 UTC).

Set the quiet entry and the morning warm-up

Start with one endpoint that has a predictable gap between its last evening request and first morning batch. Pull request timestamps for a typical week, including health checks that send inference requests, test traffic, and delayed jobs. If the endpoint has interactive users at all hours and they cannot tolerate a cold start, keep a warm replica. A low average request count is not proof of a usable idle window.

In the endpoint’s Autoscaling settings, open Daily Autoscaling Schedule. The Hugging Face autoscaling guide puts it under More options during endpoint creation. Each entry overrides the base settings until the next entry. The editor can display local time, but start times are stored in UTC; the final entry of the day remains in effect across midnight until the next morning’s entry.

For a first batch released at 08:00 UTC, try this on a test endpoint sized for one replica:

Entry starts (UTC)MinimumMaximumScale to ZeroPurpose
07:4511NeverGive a replica 15 minutes to become ready before the batch is released
20:000115 minutesAllow scale-down after inactivity while retaining the ability to serve an unexpected overnight request

Hugging Face sets the entry’s minimum to zero when you select an idle timeout. Keep the entry maximum within the endpoint’s configured maximum. After saving, check the clock icon on the Instance card to confirm which entry is in effect and for how long. This verifies the schedule, not replica readiness. If your batch scheduler follows local wall time, compare both UTC boundaries after a daylight-saving change. The 15-minute lead is a test input, not a startup guarantee.

Scaling to zero is distinct from manually pausing. The Hugging Face Hub guide says a paused endpoint requires an explicit resume, while inference traffic can wake one that has scaled to zero. An overnight probe that runs real inference can therefore erase the quiet interval. Review rules for pausing idle AI workloads if the endpoint should stay off until a person or workflow explicitly resumes it.

Work out how many replica minutes you can remove

Hugging Face lists hourly instance rates but calculates actual compute cost by the minute. Its pricing description includes initializing and running compute for successfully deployed endpoints. Do not price the gap from the first missing successful response to the next successful response: initialization during that gap can still be billable. Use the rate for your deployed hardware and compare the same elapsed period with the same hardware and replica limits.

estimated compute cost = billable replica minutes × hourly instance rate ÷ 60
estimated savings = always-warm compute cost − scheduled compute cost

Count minutes across replicas, not just the minutes in which the endpoint was reachable. Two replicas running for ten minutes contribute twenty replica minutes. If the hardware changes within the comparison period, price each configuration separately before adding the totals. The following worksheet holds hardware and rate constant to isolate the schedule change.

Suppose the hourly rate is $1.20 and the baseline maintains one billable replica for all 24 hours. That is 1,440 minutes, or $28.80. The evening entry runs for 11 hours and 45 minutes. For planning, assume the full 15-minute inactivity period elapses after 20:00 UTC and there are no wake-ups or transition delays. The resulting sketch has 690 minutes at zero, giving $13.80 in estimated savings. Those assumptions are not evidence that the endpoint will reach zero at 20:15.

If a later one-day comparison instead finds 780 billable replica minutes with the schedule, the worksheet yields $15.60 in compute cost and $13.20 in savings. Investigate the 30-minute difference from the plan using the replica timeline and the request log. A late request might have postponed scale-down; an overnight call might have started another replica. Do not assign the difference to either cause without evidence. All prices and outcomes in this example are illustrative, not vendor quotes or observations from a live account.

Prove the first batch still clears its deadline

Run an always-warm baseline and a scheduled pilot on comparable days with the same model revision, hardware, request mix and caller deadline. On the quiet night, use the management lookup in the Hugging Face Hub guide : fetch the endpoint by name and namespace with huggingface_hub.get_inference_endpoint() and read the returned object’s status. This does not send an inference request that could wake a replica. Record the UTC time when you first observe scaledToZero and take further status samples before the morning entry. A sample confirms the state only at the time it was taken; use the request log to check for wake-ups between samples and don’t assume the transition happened when the timer expired.

Record three UTC times for the morning transition: when the warm entry takes effect, when the first replica is running, and when the first planned inference completes with a usable result. The Analytics and Metrics guide describes the Running Replicas graph and the per-replica Timeline. Use the graph to investigate replica counts and the timeline to investigate startup. A gap in the graph or the end of a replica bar does not establish endpoint state or billable minutes. Use the caller’s clock for the delivery deadline; a running replica is not proof that a batch has finished.

Pilot observationWhat to checkDecision
No requests after the evening entryManagement status reports scaledToZero after the idle timeout, without an inference probeIf status is different or unavailable, check the active entry and late inference traffic. Leave unconfirmed time out of the estimated savings
Morning entry takes effectA representative first batch released at 08:00 UTC still produces accepted output by its deadlineMove the entry earlier and reprice the extra warm time if startup consumes too much of the margin
An unexpected request arrives while scaled to zeroFirst-attempt status and total time to usable output, including any approved retriesKeep overnight scale-to-zero only if that caller can tolerate the cold path; otherwise keep a warm minimum

Test that third case deliberately on a separate night so the probe does not invalidate the quiet-night sample. The autoscaling guide describes a 503 response during initialization and an optional X-Scale-Up-Timeout header that lets the proxy wait for readiness. A longer proxy wait does not extend the caller’s deadline. Bound any wait or retry by the time remaining, and record a timeout or rejected result as a failure rather than dropping it from the latency sample.

Decide with on-time output and billing evidence

Set the acceptance rule before the pilot. For example, require the first batch to finish by 08:05 UTC on each comparison day and reject a schedule change that reduces the fraction of planned items delivered on time. Then divide comparable endpoint compute cost by accepted on-time outputs, counting each planned item once. At the illustrative costs above, 100 on-time items in both cases would move compute cost per on-time item from $0.288 to $0.156. A cheaper day that misses the first-batch deadline fails the service gate, regardless of its unit cost. The FinOps Foundation’s Unit Economics guidance explains why measuring a useful outcome adds context to the resource cost alone.

Record the two UTC entries, timestamped status samples, rate and hardware, replica minutes, first-batch finish time, and any overnight wake-ups in the workload unit-cost scorecard . Keep projected savings separate from actual charges until you have billing evidence for the same endpoint and period. Start with one endpoint and one full overnight cycle. If the deadline fails, restore the original warm minimum by removing or reverting the schedule override; changing only the base setting won’t remove an active override. Test again with a larger morning buffer before enabling the schedule elsewhere.

Sources checked

Checked on November 22, 2026, Asia/Shanghai (November 21 UTC). These are live official references for an evergreen configuration and cost decision, not evidence of a test deployment or current account charges.