Hub documentation

Pricing and Billing

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Pricing and Billing

Hugging Face Jobs let you run compute tasks on Hugging Face infrastructure without managing it yourself. Simply define a command, a Docker image, and a hardware flavor among various CPU and GPU options.

Jobs are available to any user or organization with a positive credit balance.

Billing on Jobs is based on hardware usage and is computed by the minute: you get charged for every minute the Jobs runs on the requested hardware.

During a Job’s lifecycle, it is only billed when the Job is Starting or Running. This means that there is no cost during build.

If a running Job starts to fail, it will be automatically suspended and the billing will stop.

Pricing

Jobs are billed per minute based on the hardware used. Below are the available hardware options and their pricing.

CPU

HardwareCPUMemoryEphemeral StorageHourly Price
CPU Basic2 vCPU16 GB50 GB$0.01
CPU Upgrade8 vCPU32 GB50 GB$0.03
CPU XL16 vCPU124 GB1000 GB$1.00
CPU Performance32 vCPU256 GB1024 GB$1.90

GPU

HardwareCPUMemoryGPU MemoryEphemeral StorageHourly Price
Nvidia T4 - small4 vCPU15 GB16 GB50 GB$0.40
Nvidia T4 - medium8 vCPU30 GB16 GB100 GB$0.60
1x Nvidia L48 vCPU30 GB24 GB400 GB$0.80
4x Nvidia L448 vCPU186 GB96 GB3200 GB$3.80
1x Nvidia L40S8 vCPU62 GB48 GB380 GB$1.80
4x Nvidia L40S48 vCPU382 GB192 GB3200 GB$8.30
8x Nvidia L40S192 vCPU1534 GB384 GB6500 GB$23.50
Nvidia A10G - small4 vCPU15 GB24 GB110 GB$1.00
Nvidia A10G - large12 vCPU46 GB24 GB200 GB$1.50
2x Nvidia A10G - large24 vCPU92 GB48 GB1000 GB$3.00
4x Nvidia A10G - large48 vCPU184 GB96 GB2000 GB$5.00
Nvidia A100 - large12 vCPU142 GB80 GB1000 GB$2.50
4x Nvidia A100 - large48 vCPU568 GB320 GB4000 GB$10.00
8x Nvidia A100 - large96 vCPU1136 GB640 GB8000 GB$20.00
Nvidia H20023 vCPU256 GB141 GB3000 GB$5.00
2x Nvidia H20046 vCPU512 GB282 GB6000 GB$10.00
4x Nvidia H20092 vCPU1024 GB564 GB12000 GB$20.00
8x Nvidia H200184 vCPU2048 GB1128 GB24000 GB$40.00
Nvidia RTX PRO 600023 vCPU256 GB96 GB475 GB$2.75
2x Nvidia RTX PRO 600046 vCPU512 GB192 GB950 GB$5.50
4x Nvidia RTX PRO 600092 vCPU1024 GB384 GB1900 GB$11.00
8x Nvidia RTX PRO 6000184 vCPU2048 GB768 GB3800 GB$22.00

You can also retrieve available hardware and pricing programmatically via the API at GET /api/jobs/hardware or via the CLI:

>>> hf jobs hardware

Exposed ports

A Job can expose one or more ports to make them reachable from the outside while the Job is running. Exposing one or more ports is billed at a flat rate per Job, in addition to the hardware price:

ProductHourly Price
Exposed ports$0.01

Like hardware, it is billed by the minute, only while the Job is Starting or Running.

Manage billing

Bill to your organization

Billing is done to the user’s namespace by default, but you can bill to your organization instead by specifying the right namespace:

hf jobs run --namespace my-org-name ...

In this case the Job runs under the organization account, and you can see it in your organization Jobs page (organization page > settings > Jobs).

Bill to a resource group

This feature is part of the Enterprise plan and above.

If your organization has Resource Groups set up, you can attribute job costs to a specific resource group. To do so:

  1. You must be a member of the resource group.
  2. Pass the resource group’s ID as the namespace when running the job.

You can find the resource group’s ID in your organization’s Resource Groups settings page.

hf jobs run --namespace <resource-group-id> ...

In Python:

>>> from huggingface_hub import run_job
>>> run_job(
...     image="python:3.12",
...     command=["python", "-c", "print('Hello!')"],
...     namespace="<resource-group-id>",
... )

View current compute usage

You can look at your current billing information for Jobs in in your Billing page, under the “Compute Usage” section:

Additional information about billing can be found in the dedicated Hub documentation.

Recommendations

Set timeout limits

Set a timeout when creating the Job to ensure it can’t run beyond a certain duration. A Job run that reaches the timeout duration is automatically stopped, and so is its billing. Here is how to set a timeout with the CLI:

hf jobs run --timeout 3h ...

Note that the default timeout is set to 30 minutes. You must therefore specify a longer timeout if your Job requires more time to run.

Cancel irrelevant Jobs

If a running Job is no longer relevant, you can cancel it prematurely to stop its billing, either via the Job page or the CLI:

hf jobs cancel <job-id>
Update on GitHub