Import Gated Models
Use this guide when a Hugging Face model can’t be downloaded anonymously.
This includes:
- gated public models that require license acceptance
- private models in your Hugging Face account
- models owned by your Hugging Face organization (like internal fine-tuned models stored in a private Hugging Face repository)
A gated model is a model whose files require approval and/or authentication before download. For Dedicated Inference, the import process is the same for gated, private, and organization-owned models: use a Hugging Face token from a user that can read the repository.
Dedicated Inference needs the token when creating the model in Exoscale. After the model is created, Exoscale uses the stored copy of the model files.
Before You Start
You need:
- access to the model repository on Hugging Face
- a Hugging Face token with read access to the model repository on Hugging Face
- the Exoscale CLI configured with Dedicated Inference permissions
If you don’t already have a Hugging Face token for the gated or private model repository, you may need to create a Hugging Face account. Sign up at https://huggingface.co.
If the model requires license acceptance, accept the terms on Hugging Face before importing it into Dedicated Inference.
Create a Hugging Face Token
Refer to the Hugging Face documentation for the most up-to-date steps.
Use one of these:
- a read token
- a fine-grained token scoped to the model repository with read access
Store the token in an environment variable:
export HF_TOKEN="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"Create the Model in Exoscale
Run:
exo dedicated-inference model create <namespace>/<model-name> \
--huggingface-token "$HF_TOKEN" \
-z de-fra-1<namespace> is the Hugging Face user or organization that owns the model.
The model ID must match the Hugging Face repository name exactly, including capitalization.
During creation, Exoscale downloads the model files and stores them in the selected zone. Larger models take longer because there is more data to fetch and store.
Note
Dedicated Inference supports model weights in the safetensors format. Model creation can fail if the repository doesn’t include supported weights.
Check the Import
List models in the zone:
exo dedicated-inference model list -z de-fra-1Wait until the model reaches created.
If creation fails, check these first:
- the model ID is exact
- the token can read the repository
- the Hugging Face user accepted the model terms
- the model files use a supported format
License Responsibility
Exoscale downloads the model files you request. You remain responsible for following the model license and any terms set by the model owner.