Getting Started with Hugging Face Inference Endpoints
Hugging Face Inference Endpoints deploys Hub models to managed cloud infrastructure in a few clicks, demonstrated here with a fine-tuned Swin image classifier on a GPU instance in AWS eu-west-1. Endpoints come in three security levels: public (no auth), protected (organization token required) and private, which is reachable only from your own AWS VPC through AWS PrivateLink. The walkthrough calls a protected endpoint from Python with a bearer token, checks the analytics and logs (including errors from a missing Content-Type header), then wires up a private endpoint by creating a VPC endpoint in the AWS console and testing it with curl from EC2.
Related posts
- Why we’re switching to Hugging Face Inference Endpoints, and maybe you should too
Hugging Face mediumAdeptA team moved CPU-based transformer inference off a self-built FastAPI + Docker + AWS ECS/Fargate stack onto Hugging Face Inference Endpoints, collapsing deployment to train, push to Hub, deploy. In ab benchmarks with a RoBERTa text classifier, a 4-vCPU endpoint answered in 80±30 ms versus ~200 ms on their ECS container, and an 8-vCPU endpoint in 43 ms. Cost runs 24–50% higher than Fargate (about $60/month more for a large instance), which they judge worth it without a dedicated MLOps team, though not at hundreds of services. The main gap they note is the lack of a Terraform provider; they deploy with their own hugie CLI.
- Deploy Hugging Face models easily with Amazon SageMaker
Hugging Face mediumAdeptHugging Face Inference Deep Learning Containers and the SageMaker Hugging Face Inference Toolkit let Transformers models be deployed as SageMaker endpoints with a few lines of Python, using transformers pipelines for zero-code pre- and post-processing. Models can be deployed straight after a SageMaker training job via the Estimator, from a model.tar.gz in S3 via HuggingFaceModel's model_data, or directly from the Model Hub by setting the HF_MODEL_ID and HF_TASK environment variables. Requests use an `inputs` key plus optional pipeline `parameters`, and custom inference code can override the defaults when needed.
- Run AI workloads on any cloud, store on Hugging Face: zero-egress storage with SkyPilot
Hugging Face mediumAdeptSkyPilot now supports Hugging Face Storage as a first-class backend (`store: hf`), so jobs on any of 20+ clouds, Kubernetes or on-prem can mount Hub buckets (read-write) or model/dataset repos (read-only) via an `hf://` URL and an existing `HF_TOKEN`. MOUNT mode uses the `hf-mount` FUSE driver with lazy, byte-range reads and an on-disk cache. Because Hugging Face charges no egress, reads onto GPUs anywhere are free; writes still pay the compute cloud's egress. A Qwen3.5-4B fine-tune loaded the model in about 30 seconds and wrote 8.43 GB checkpoints at roughly 112-168 MB/s across AWS, GCP and Lambda, while Xet content-defined chunking deduplicates incremental checkpoints, model variants and appended Parquet data.
- Deploy LLMs with Hugging Face Inference Endpoints
Hugging Face mediumAdeptFalcon 40B Instruct can be deployed to Hugging Face Inference Endpoints through the web UI by choosing a repository, cloud, region and instance. For best performance the suggested 4x T4 instance should be switched to a single A100. Once the endpoint is live it can be called with cURL, and generation is controlled through parameters such as temperature, max_new_tokens (max 512), top_k/top_p, repetition_penalty and stop sequences. Tokens can be streamed to clients using huggingface_hub's InferenceClient in Python or HfInferenceEndpoint from @huggingface/inference in JavaScript, with code that skips special tokens and stops on stop sequences.
- Running Privacy-Preserving Inferences on Hugging Face Endpoints
Hugging Face mediumAdeptZama's Concrete ML models, compiled for Fully Homomorphic Encryption (FHE), can be deployed as Hugging Face Inference Endpoints using custom inference handlers. Clients quantize and encrypt inputs locally, upload FHE evaluation keys in chunks (about 70 MB), and receive encrypted predictions that only they can decrypt. The handler exposes save_key, append_key and inference methods. Keys live in endpoint RAM, so they are lost on restart and not shared across replicas, and machines top out at 8 vCPUs. Measured latencies range from 0.4 s for logistic regression to 24 s for a CNN on MNIST.