Prompt
How do I set up a downloadable model for custom serving on our own GPU cluster?
Latest observation
To set up a downloadable model for custom serving on your own GPU cluster, the basic flow is:
- Pick the model artifact
- Package it in a format your serving stack can load
- Store it in a downloadable location
- Deploy a serving runtime on your GPU cluster
- Configure the runtime to fetch and load the model
- Expose an inference endpoint
Here’s a practical checklist.
1) Choose the model and serving format
Decide what you’re serving:
- Hugging Face / Transformers model: common for LLMs, classifiers, embeddings
- TensorFlow SavedModel
- PyTorch checkpoint / TorchScript
- ONNX
- vLLM / TensorRT-LLM / TGI-compatible LLM artifacts
If the model is “downloadable,” usually you want it packaged so it can be pulled from:
- object storage like S3 / GCS / Azure Blob
- an internal artifact repository
- Hugging Face Hub
- a Docker image layer, if the model is small enough
2) Package the model artifact
For Hugging Face models
Typical contents:
config.jsontokenizer.json/ tokenizer files- weights like
model.safetensorsorpytorch_model.bin - optional generation config
Example layout:
my-model/
config.json
tokenizer.json
tokenizer_config.json
special_tokens_map.json
model.safetensors
If using a private model, make sure access is handled via:
- access tokens
- service accounts
- private bucket/IAM roles
3) Upload the model to downloadable storage
Common choices:
S3 example
aws s3 sync ./my-model s3://my-bucket/models/my-model/
GCS example
gsutil -m cp -r ./my-model gs://my-bucket/models/my-model/
Azure Blob
Use azcopy or SDK upload.
Best practices:
- version your models, e.g.
models/my-model/1.0.3/ - keep a
latest/alias only if you want rolling updates - store SHA256 checksums
- keep metadata like model name, version, architecture, and expected input schema
4) Prepare your GPU cluster
You need:
- nodes with NVIDIA GPUs
- correct GPU drivers
- CUDA-compatible runtime
- container runtime support
- Kubernetes or another orchestrator if you’re using cluster scheduling
If using Kubernetes, typically install:
- NVIDIA device plugin
- GPU node pools
- autoscaling if needed
Check GPU visibility:
nvidia-smi
5) Choose a serving framework
Common options:
For LLMs
- vLLM
- Hugging Face TGI
- TensorRT-LLM
- NVIDIA Triton for some workloads
For general ML
- NVIDIA Triton Inference Server
- TorchServe
- BentoML
- KServe
- Seldon
Your choice depends on:
- model type
- throughput/latency requirements
- batching needs
- streaming generation support
- multi-GPU inference
6) Make the serving container download the model at startup
A common pattern is:
- container starts
- init script downloads model from storage to local disk
- inference server loads from that local path
Example startup flow
aws s3 sync s3://my-bucket/models/my-model/ /models/my-model/
python serve.py --model-path /models/my-model
If using Kubernetes, this is often done with:
- an init container to download the model
- a shared PersistentVolume
- or direct download in the main container entrypoint
7) Example Kubernetes pattern
Option A: init container downloads the model
- init container pulls model from S3
- main container serves it
Pseudo-YAML:
apiVersion: apps/v1
kind: Deployment
metadata:
name: model-server
spec:
replicas: 1
template:
spec:
volumes:
- name: model-volume
emptyDir: {}
initContainers:
- name: model-downloader
image: amazon/aws-cli
command: ["sh", "-c", "aws s3 sync s3://my-bucket/models/my-model/ /models/"]
volumeMounts:
- name: model-volume
mountPath: /models
containers:
- name: inference
image: my-serving-image:latest
args: ["--model-path", "/models"]
resources:
limits:
nvidia.com/gpu: 1
volumeMounts:
- name: model-volume
mountPath: /models
Option B: bake model download into container startup
Simpler, but slower startup and less ideal for large models.
8) Configure access to storage securely
Use:
- IAM roles for service accounts on Kubernetes
- workload identity
- short-lived credentials
- private network endpoints when possible
Avoid embedding secrets in images or configs.
9) Validate load and inference
Before production:
- verify model loads successfully on GPU
- test tokenizer/version compatibility
- benchmark throughput and latency
- confirm batch size limits and memory usage
- test cold start time
Useful checks:
- GPU memory utilization
- token/sec for LLMs
- max context length
- OOM behavior
- concurrent request handling
10) Add operational basics
Recommended:
- readiness/liveness probes
- autoscaling
- logging and tracing
- metrics for latency, errors, GPU usage
- model version pinning
- canary rollout strategy
Simple mental model
Think of it like this:
Artifact storage → cluster startup download → GPU inference server loads model → API endpoint
If you want the quickest working setup
If your model is Hugging Face based and you want GPU serving on Kubernetes, a very common stack is:
- Model stored in S3
- Kubernetes with NVIDIA GPUs
- vLLM or TGI
- Init container downloads model
- Service exposes HTTP endpoint
I can help you more specifically
If you tell me:
- the model type (LLM, classifier, embedding, etc.)
- your orchestrator (Kubernetes, Slurm, bare metal)
- your storage (S3/GCS/Azure/NFS)
- your preferred serving stack (vLLM, Triton, TGI, TorchServe)
…I can give you a concrete deployment example and config files.