Skip to content

Helm

The Helm chart under helm/model2vec-serve/ deploys model2vec-serve on Kubernetes.

Install

bash
helm install model2vec-serve ./helm/model2vec-serve \
  --set model=minishlab/potion-multilingual-128M \
  --set apiKey=your-secret-key

Upgrade

bash
helm upgrade model2vec-serve ./helm/model2vec-serve \
  --set model=minishlab/potion-multilingual-128M

Multi-model install

Load more than one model and choose which one is used when the request does not specify a model:

bash
helm install model2vec-serve ./helm/model2vec-serve \
  --set models[0]=minishlab/potion-base-2M \
  --set models[1]=minishlab/potion-multilingual-128M \
  --set defaultModel=minishlab/potion-base-2M \
  --set apiKey=your-secret-key

Uninstall

bash
helm uninstall model2vec-serve

Configuration values

ParameterDescriptionDefault
replicaCountNumber of replicas1
image.repositoryContainer image repositorymodel2vec-serve
image.tagContainer image tag0.1.0
image.pullPolicyImage pull policyIfNotPresent
modelsList of Hugging Face model ids or local paths[]
defaultModelDefault model when a request does not specify one (defaults to the first model in the list if omitted)""
modelOwnerModel publisher or owner shown in /v1/models responses"minishlab"
model(Deprecated) Hugging Face model id or local pathminishlab/potion-multilingual-128M
apiKeyAPI key for authentication""
argsExtra CLI arguments[]
envExtra environment variables[]
service.typeKubernetes service typeClusterIP
service.portService port80
service.targetPortContainer port8080
resourcesCPU/memory requests and limitssee values.yaml
autoscaling.enabledEnable Horizontal Pod Autoscalerfalse
autoscaling.minReplicasMinimum replicas1
autoscaling.maxReplicasMaximum replicas10
autoscaling.targetCPUUtilizationPercentageHPA CPU target80
autoscaling.targetMemoryUtilizationPercentageHPA memory target80
extraVolumesExtra volumes[]
extraVolumeMountsExtra volume mounts[]
podSecurityContextPod security context{}
securityContextContainer security context{}
nodeSelectorNode selector{}
tolerationsTolerations[]
affinityAffinity rules{}

Readiness and liveness

The chart exposes Kubernetes probes on:

  • /ready for readiness
  • /health for liveness

The service is considered ready only after the model has loaded successfully at startup.

Volume-mounted models

To use a model stored on a cluster volume instead of downloading from Hugging Face:

bash
helm install model2vec-serve ./helm/model2vec-serve \
  --set model=/models/my-model \
  --set extraVolumes[0].name=model-volume \
  --set extraVolumes[0].hostPath.path=/path/to/local/model \
  --set extraVolumeMounts[0].name=model-volume \
  --set extraVolumeMounts[0].mountPath=/models/my-model

Resource defaults

The default resources block in values.yaml is:

yaml
resources:
  limits:
    cpu: 1000m
    memory: 1500Mi
  requests:
    cpu: 500m
    memory: 512Mi

Tune these based on your model size and request volume.

Horizontal Pod Autoscaler

Enable autoscaling with:

bash
helm install model2vec-serve ./helm/model2vec-serve \
  --set model=minishlab/potion-multilingual-128M \
  --set autoscaling.enabled=true \
  --set autoscaling.minReplicas=2 \
  --set autoscaling.maxReplicas=10

See also

  • helm/model2vec-serve/README.md for the embedded chart README.
  • helm/model2vec-serve/values.yaml for all defaults and comments.

Powered by model2vec