Hugging Face
AstroPulse serves a model from Hugging Face by its name, pinned to one commit. A public model needs nothing else. A gated or private model needs your organization's Hugging Face token, connected once for every cluster.
Before you start
- A cluster with Certificates and Model Serving installed, from the cluster's Add-ons tab. To call the model from outside the cluster, see what a model needs in Serve a model.
- For a gated or private model: your organization's Hugging Face token, connected once under Integrations: Hugging Face. The token's account must be able to see the model.
In the console
-
Open Workloads > Models > Deploy model. Name the model and pick its cluster and profile.
-
On the Model step, keep Hugging Face under Model source. In Model, search for or type the model as it appears on huggingface.co, for example
Qwen/Qwen2.5-0.5B-Instruct. Open … on Hugging Face opens its page. -
In Revision (optional), paste the commit you want (see Pin a revision). Left empty, the model follows
main. -
Read the line under the fields. For a gated or private model it must say "Private and gated models use your organization's Hugging Face token: connected". If it says not connected, connect one, select it and connect the token first.
-
Select Check model. "The platform can serve this model." means the check passed. Anything else is a refusal; see If it's refused.
Open zoom view -
Continue through Compute, Scaling and Access, then Review and Deploy, as in Serve a model.
You should see
The model on Workloads > Models reads Running, with its endpoint and Try it.
Every new node downloads the model again, and on a private cluster those bytes go through the NAT gateway, which the cloud bills per GB. On an EKS cluster AstroPulse creates, a model at an s3:// address or an oci:// image in your ECR, in the cluster's region, skips that charge: see Cut model download cost.
Choose a model
Check three things on the model's Hugging Face page, for example huggingface.co/Qwen/Qwen2.5-0.5B-Instruct, before you deploy it:
- Its size, the parameter count or the Files tab. The weights, the runtime and the KV cache all need memory. See Sizing a replica.
- A licence or access banner. A model that asks you to accept terms is gated. See Gated models.
- The context length on the model card. A context length above the model's own limit makes the runtime stop at start. See Context length.
A 0.5B instruct model serves on CPU in a few minutes and exercises the add-ons, the endpoint and the metrics. To serve a larger model afterwards, change Model and Revision; the other settings stay.
Pin a revision
Enter the 40-character commit hash in Revision.
- The same bytes every time. A branch or tag, and
mainwhen you name none, points at whatever was last pushed there. A commit never moves, so a redeploy or a rollback serves exactly what was served before. - The check confirms it exists. AstroPulse asks Hugging Face for that revision before it deploys, and refuses one the model does not have.
To find the commit, open the model's page on Hugging Face, then Files and versions > History (for example huggingface.co/Qwen/Qwen2.5-0.5B-Instruct/commits/main), and copy the full hash. Nothing warns you about an unpinned model; it deploys and follows the branch.
Gated models
A gated model asks you to accept its terms on Hugging Face before it can be downloaded. AstroPulse downloads it with your organization's token, so the account that owns the token must accept them: sign in to huggingface.co as that account, open the model's page (for example huggingface.co/meta-llama/Llama-3.1-8B-Instruct), and accept or request access. Some models grant access at once; others wait for their authors to approve.
With a token connected, Check model and the dry run read one of the model's files with it, so terms the token's account has not accepted are refused before anything deploys. If Hugging Face does not answer in time, the check lets the model through and the download on the cluster decides.
Other ways in
- Nova: ask it in plain language, for example "serve Qwen/Qwen2.5-0.5B-Instruct on prod-01".
- SDK and API: the Python SDK and the API reference use the same manifest.
With astroctl
name: "qwen-chat"
profileName: "prod-inference"
source:
type: "Model"
model:
uri: "hf://Qwen/Qwen2.5-0.5B-Instruct:<commit>"
astroctl app apply -f qwen-chat.yaml --dry-run # checks, deploys nothing
astroctl app apply -f qwen-chat.yaml
# the latest commit of a public model
curl -s https://huggingface.co/api/models/Qwen/Qwen2.5-0.5B-Instruct | jq -r .sha
The token itself, with astroctl integrations huggingface, is on Hugging Face integration. See the astroctl reference.
Settings
uriRequiredThe model on Hugging Face. In the console, Model and Revision together.
hf://<org>/<repo>, or hf://<org>/<repo>:<revision> with a branch, tag or commit. Pin a 40-character commit.mainformatNot needed for a Hugging Face model: AstroPulse serves it with vLLM.
vLLMThere is no field for the token. An application never carries a credential: the token is the organization's, connected under Integrations > Hugging Face.
If it's refused
@ instead of :.hf://<org>/<repo>:<commit>, or paste the commit into Revision in the console.secretRef on the model.configuration.modelServing.identity or secretRef).Next
- Sizing and scaling: put the model on a GPU and size it.
- Expose a model: give it a public HTTPS address for chosen callers.
- Hugging Face integration: connect, replace or revoke the organization's token.