Skip to main content
This guide uses dedicated container inference to serve Qwen2.5-VL-32B-Instruct from the public vllm/vllm-openai image. vLLM already serves an OpenAI-compatible API, so you don’t need a Sprocket worker or a Docker build. Jig deploys the image as-is, using two settings in [tool.jig.deploy]:
  • image: Deploy an existing image instead of building one. Jig skips docker build and docker push.
  • command: Override the image’s startup command. Here it runs vllm serve with the model and serving flags.
Requests go straight to vLLM’s HTTP server instead of through the managed queue, so you call the deployment with any OpenAI client or curl, not jig submit. The full example is in the Sprocket repo at examples/qwen_vllm.

Requirements

  • Together API key: Get one from together.ai.
  • Dedicated container inference access: Contact your account representative or the sales team to enable it for your organization.
  • Together CLI: Install with uv tool install "together[cli]".
  • OpenAI Python SDK: The Python request sample uses it. Add it to your Python project with uv add openai.
Export your API key. The deploy step and the request samples read it from TOGETHER_API_KEY:

Configure the deployment

Create a directory with a single pyproject.toml:
pyproject.toml
Before you deploy, check these settings:
  • Pin the image tag: This guide is tested with v0.17.1. Pin a specific tag, not latest, so a replica that restarts doesn’t pick up a new vLLM release.
  • Match GPUs to tensor parallelism: Set --tensor-parallel-size to gpu_count so vLLM uses every GPU in the replica. Here, vLLM splits the 32B model in BF16 across two H100s.
  • Match port to --port: Together routes traffic to the port in port, so it must match the port vLLM listens on.
  • Keep the default health check: The default health_check_path is /health, which vLLM serves. The deployment reports ready once vLLM has loaded the model.
  • Autoscale on vLLM’s own metric: vLLM exports Prometheus metrics on /metrics, so the CustomMetric autoscaler scales on vllm:num_requests_running with no extra code.
  • Use a unique project name: The name under [project] is the deployment name and the last segment of the endpoint URL. Deployment names must be unique, so if qwen25-vl is taken, change name and use the new name in the endpoint URL.

Serve a different model

Change the model ID in command and in your requests, then size gpu_count, --tensor-parallel-size, and memory to fit the new model. Any vllm serve flag can go in command. Qwen2.5-VL-32B-Instruct isn’t gated, so this guide needs no Hugging Face token. For a gated model, store your token as a secret before you deploy. vLLM reads HF_TOKEN from the environment when it downloads the weights. Run the command from the directory that contains pyproject.toml, so the secret attaches to this deployment:

Deploy

If you’re logged in with tg login, pass your API key explicitly on the first deploy: tg beta jig deploy --detach --api-key "$TOGETHER_API_KEY". The first deploy stores an API key in the deployment, and it can’t use a tg login session for that. While you’re logged in, the CLI ignores TOGETHER_API_KEY.
Run these from the directory that contains pyproject.toml:
--detach returns as soon as the deployment is created. Without it, jig deploy waits for the replica but gives up two minutes after the container starts, while vLLM is still loading the model, and exits with Running but not ready after 120s. The deployment keeps starting either way. The first deploy takes 5 to 15 minutes while Together schedules two H100s, pulls the vLLM image, and vLLM downloads and loads about 65 GB of weights. The deployment is ready when jig status shows Ready for Status and 1/1 ready for Replicas. When the deployment is ready, get the endpoint URL:
The URL has the form https://api.together.ai/v1/deployment-request/<DEPLOYMENT_NAME>. Requests to any path under it are forwarded to the container, authenticated with your Together API key.

Call the endpoint

Point any OpenAI client at the endpoint URL plus /v1, using your Together API key. The model field must match the model ID you pass to vllm serve in command:
The cURL request returns a standard OpenAI chat completion, and the Python sample prints only its content. A shortened response looks like this:
Other routes vLLM serves, such as /v1/completions and /v1/models, are available under the same endpoint URL.

Delete the deployment

The deployment keeps at least min_replicas replicas running, two H100s each, until you delete it:
jig destroy doesn’t delete the TOGETHER_API_KEY secret that the first deploy stored. To delete it too, run this from the same directory:

Next steps

OpenAI-compatible endpoint with Sprocket

Write your own worker when you need custom pre- or post-processing.

Autoscaling

Choose scaling metrics and targets, and see how replicas scale.

Jig CLI reference

Look up every [tool.jig.deploy] setting and deploy command.

Sprocket examples

Browse more deployable examples, from hello-world to speech-to-speech.