Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 7 min read How-to mediumAdept

Run a vLLM Server on HF Jobs in One Command

A single `hf jobs run` command using the official vllm/vllm-openai image, a GPU `--flavor` and `--expose 8000` launches a private, OpenAI-compatible LLM endpoint on Hugging Face infrastructure, billed per second and gated by HF token auth through the jobs proxy. The guide covers querying via curl and the OpenAI Python client, and scaling to Qwen3.5-122B on 2×H200 with `--tensor-parallel-size`, using capped `--max-model-len` and `--max-num-seqs` to avoid out-of-memory errors. It also shows a Gradio chat UI, SSH debugging, and enabling tool-call parsing to back the Pi coding agent. HF Jobs suits experiments, evals and batch generation, while Inference Endpoints fit production workloads that need scale-to-zero and finer access control.

Assumes: OpenAI chat completions APIDocker basicsGPU model serving

Related posts

  • Deploy LLMs with Hugging Face Inference Endpoints

    Hugging Face mediumAdept

    Falcon 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.

  • Inference for PROs

    Hugging Face mediumAdept

    Hugging Face PRO subscribers get curated, rate-limit-boosted HTTP inference endpoints served by text-generation-inference for models such as Llama 3, Mixtral 8x7B, Zephyr, Code Llama, Stable Diffusion XL and Bark, intended for prototyping rather than heavy production (Inference Endpoints is recommended for that). Usage is shown via curl, the huggingface_hub InferenceClient and the OpenAI-compatible Messages API, including Llama 2 chat templates and Code Llama's <PRE>/<SUF>/<MID> infilling format. Generation parameters (do_sample, temperature, top_k, top_p, repetition_penalty, max_new_tokens, stop_sequences, SDXL guidance and steps) are explained, along with disabling response caching via the x-use-cache: 0 header and token streaming.

  • Deploy Meta Llama 3.1 405B on Google Cloud Vertex AI

    Hugging Face mediumAdept

    Meta Llama 3.1 405B Instruct in FP8 can be served on a single Google Cloud A3 node (8x H100 80GB, ~640 GB VRAM) through Vertex AI, using Hugging Face's Text Generation Inference Deep Learning Container. FP16 weights would need ~810 GB, so FP8 (~405 GB) is the recommended way to fit one node while leaving room for KV cache and CUDA graphs. The walkthrough covers the A3 quota requests, gcloud and SDK setup, registering the model with TGI environment variables (MODEL_ID, NUM_SHARD=8, HF token), and deploying to an endpoint, which takes about 25-30 minutes. It then shows how to apply the Llama 3.1 chat template with transformers and send prediction requests to the endpoint from Python.

  • Introducing the Hugging Face LLM Inference Container for Amazon SageMaker

    Hugging Face mediumAdept

    Hugging Face's LLM Inference Deep Learning Container for Amazon SageMaker is built on Text Generation Inference (TGI), which provides tensor parallelism, continuous batching, flash-attention, bitsandbytes quantization, safetensors loading and SSE token streaming. The walkthrough deploys the 12B Pythia Open Assistant model on an ml.g5.12xlarge instance (4 A10G GPUs) using the sagemaker Python SDK, with environment variables for GPU count and token limits. It then covers TGI generation parameters such as temperature, top_p, stop sequences and repetition penalty, and builds a Gradio chatbot on top of the endpoint. For a cheaper setup, a g5.2xlarge with int8 quantization is suggested.

  • Local LLM Messenger: Chat with GenAI on Your iPhone

    Docker mediumAdept

    Local LLM Messenger (LoLLMM), an honorable-mention project from Docker's AI/ML Hackathon by Justin Garrison, lets you send iMessages to LLMs running on your own machine. A FastAPI Python app receives Sendblue webhooks, routes prompts to local Ollama models (defaulting to llama2) or optionally OpenAI's GPT-3.5 Turbo and DALL-E 2, keeps conversation context in a file, and supports slash commands for switching models. Docker Compose runs the app, an ngrok tunnel exposing port 8000, and an Ollama container with optional NVIDIA GPU access. A setup walkthrough covers cloning the repo, configuring API keys in .env, and adding the ngrok authtoken.

The quest for software engineering knowledge.

Look:
Layout: