Serving embedding models on vLLM

Running embedding models for search and RAG on self-hosted vLLM means one server, one model and endpoints your applications already call. This page covers what the docs support, how to configure and secure it, and what to confirm before you size it.

On this page

Serving embedding models on vLLM for search and RAG

vLLM serves embedding models through the same OpenAI-compatible server it uses for chat, so a search or RAG pipeline can call a /v1/embeddings endpoint on infrastructure you control. Consider a separate embedding deployment when indexing jobs or query embedding traffic would compete with chat latency for the same accelerators, or when the two models need different scaling, upgrade or access policies. vLLM is open source under the Apache-2.0 license, and the same vllm serve process also exposes /v1/completions, /v1/chat/completions, /v1/responses and audio transcription endpoints. Applications written for the OpenAI API can point at it with a changed base URL. The vLLM online serving documentation lists the endpoints in full.

The cost of running vLLM has four parts. Accelerator capacity is a recurring cost, whether it is GPUs in your data center or cloud instances you reserve, and it is the line most directly sized by your indexing and query volume. The surrounding infrastructure covers hosts, storage, networking, load balancing and monitoring. Implementation covers deploying the model, checking retrieval quality against your own corpus and setting access controls, which is mostly one-time work. Operators cover patching, upgrades and on-call response, which recur. vLLM has no paid edition, so none of these costs is a license fee. When you request a quote, ask for the accelerator sizing assumptions, the load test that supports them and the upgrade work planned for each vLLM release.

Before you choose a model and its runner settings, confirm the pooling runner setting for your installed vLLM version in its documentation, because how an embedding model is loaded depends on it. vLLM ships new minor releases about every two weeks, so pin a version, read the vLLM GitHub releases and compare embedding output against a saved reference set before each upgrade. Place a reverse proxy in front of the server that allowlists /v1/embeddings for callers and keeps operational paths such as /metrics away from them. The --api-key option does not protect /metrics or /health, and the vLLM security documentation advises against relying on it alone.

How indexing jobs and query traffic reach the embedding endpoint

The diagram starts with an indexing worker and a query service in the application network. Both send embedding requests to a reverse proxy on the vLLM host, which forwards only user-facing routes such as /v1/embeddings to the vLLM server. The edge between the application network and the vLLM host is the trust boundary. Prometheus does not use the proxy. It scrapes /metrics over a separate internal path, because the --api-key option does not protect that route. Check that the proxy denies /metrics, /pause, /resume and /abort_requests to application clients, and that the scrape path is reachable only from your monitoring network.

Embedding traffic crosses one proxy boundary, while metrics use a separate internal scrape path.

Why embedding models need their own sizing, apart from chat

An embedding model needs its own sizing and its own measurements, because it is usually a different model from your chat model, with a different memory footprint and a different request pattern. A chat model is sized around long, token-by-token generation for each user. An embedding model reads an input and returns a vector, so its cost depends on how much text arrives and how many inputs arrive at once. Do not assume that a server sized for chat will absorb embedding traffic without testing. The first decision is whether the embedding model gets dedicated accelerator capacity or shares a device with chat, because that choice sets every number that follows.

Four drivers decide the load. Input length comes first: a long chunk costs more per request than a short query, so the chunk size set in your indexing pipeline caps memory use and latency. Batch size comes from indexing jobs, where many chunks are sent together to keep the accelerator busy. Larger batches raise peak memory during the job and can starve query traffic if both run on the same device. Request concurrency at query time is the opposite pattern, with many small requests to /v1/embeddings arriving from users and retrieval services at once. Accelerator memory ties these together, because the weights stay resident and the remaining memory must hold activations for the largest batch and longest input you allow.

Measure before you commit hardware. No sizing figures for embedding workloads are supplied here, so run your own tests. Take a sample of your documents, chunked the way your pipeline will chunk them, and run the indexing job at the batch sizes you plan to use. Then drive query-level concurrency against /v1/embeddings on the hardware you intend to reserve, and record throughput and latency for each combination. Scrape /metrics during both runs to read token throughput, latency histograms and KV cache use, as described in the vLLM production metrics docs. Keep /metrics off any route that users or public clients can reach, because the --api-key option does not protect it. Confirm these behaviors against the vLLM version you run, since new minor releases arrive about every two weeks.

Configuration options and when each one fits

This table lists the server settings a team changes when it deploys an embedding model on vLLM, with the situation where each one fits and the points to check in the vLLM version it runs. Read each row before the first deployment, because embedding models share the server with the chat settings that people often copy from older guides. The main takeaway is that the API key does not cover every route, so the metrics and health endpoints need network controls too.

SettingWhen it fitsWhat to confirm in your vLLM version
Model name and revisionPin one model and one revision for each index so vectors stay comparable across reindexing jobs.Confirm the flag for model path and revision selection in the online serving docs for your version.
Pooling or embedding runnerUse for any embedding model served to search or RAG indexing and query code.Confirm how your version selects the pooling runner and which embedding model architectures it supports.
API key and coverageUse when clients reach the server across a network boundary or share a host with other workloads.Confirm which endpoints the key covers. The security docs say /metrics and /health are not covered, so restrict them at a reverse proxy.
Chat template settingNeeded when a chat model lacks a template, because chat completions require one.Applies to chat completions. Confirm whether your version uses it for embedding requests, and test a sample call.
Parallelism for multi-GPU hostsUse tensor parallelism within a node only when one GPU cannot hold the model weights and working batch.Confirm the parallel size settings and whether your version supports them for pooling models. Multi-node runs need an isolated network.
Metrics endpointUse from the first deployment to track request counts, latency histograms and KV cache use during indexing jobs.Confirm /metrics exposes the series you need in your version. Keep it off public networks, since the API key does not cover it.

Choosing a deployment layout for embedding models

A dedicated embedding server runs only embedding models behind the endpoints that search and retrieval-augmented generation call at request time. Queries are short, arrive unpredictably and sit on the path between a user and an answer, so the server's job is steady, low-latency responses. Nothing else competes for its accelerator memory or scheduler, which makes its behavior easier to explain.

  • Isolation: Chat traffic, chat model upgrades and indexing bursts cannot slow query embedding, and the embedding model can be patched or restarted on its own schedule.
  • Latency impact: Batches contain only search traffic, so tail latency reflects the query mix and is easier to tie back to the application.
  • Scheduling: Capacity is sized for query peaks, so the server sits partly idle between them, and that idle accelerator time is paid for either way.
  • Operations: A second service needs its own health checks, alerts, certificates and access rules, which adds operating effort for your team.
  • What to measure: Query latency at expected peak concurrency, plus request counts and latency histograms from /metrics, as described in the vLLM metrics docs.

Check whether your peak query load keeps the server busy enough to justify a reserved accelerator, and agree on the alerts with your operations team before the first load test.

Batching indexing jobs without starving query traffic

Bulk indexing and interactive retrieval put different demands on the same server. A backfill sends large batches of documents to /v1/embeddings and keeps the accelerator busy, which raises throughput. The same scheduler must also serve query embeddings that a user is waiting on, so query latency can climb while a backfill runs. Treat the two as separate workloads from the start. Before the first production run, record query latency on the embedding server with no indexing load, then repeat the measurement during a test backfill. The latency histograms exposed at /metrics show how each request is affected, so you can find the batch size where queries begin to suffer. Confirm which metrics your installed version exposes in the vLLM metrics docs.

Client-side batching and chunk length decide how much work each request carries. Smaller chunks give more predictable latency per request and spread load across more calls. Longer chunks reduce the number of calls, but each one takes more compute and fills more of the server's batch budget. Set the batch size from your own corpus, and confirm the per-request input and batch limits for the installed vLLM version in its release notes and serving docs, since these change between releases. Retries need care. Retry only on rate-limit responses and timeouts, back off with jitter, cap the number of attempts, and key each chunk by a stable ID so a retried batch overwrites its earlier vectors and cannot create duplicates.

Run backfills on their own path so query traffic keeps its share of the server. The simplest split is a second vLLM instance or GPU pool used only for indexing, with its own route and API key on the reverse proxy. The --api-key option does not cover /metrics or /health, so the proxy should allowlist only the endpoints each client needs, as the vLLM security docs recommend. If capacity is shared, schedule backfills in off-peak windows and pause them through your scheduler when query latency crosses a threshold you define. Test batch sizes against your own corpus under representative query load, then choose the largest batch that keeps query latency within your target. Confirm how any scheduling or batch setting behaves in the installed version before you rely on it.

Setup sequence for an embedding server with checks

This sequence takes a self-hosted embedding server from a hardware check to a retrieval test on your own documents. Each step ends with a result you can record, so the team can tell whether the server is ready for indexing and where a failure started. Run the steps in order on a staging host before the production build begins.

  1. Confirm accelerator and platform support

    The platform engineer checks the vLLM installation documentation against the hardware the embedding server will run on, including GPU vendor, CPU architecture and any driver or runtime the page lists for that target. Write the matched platform, driver version and operating system into the build record. The step is done when the platform, driver and operating system all match a supported entry and the operating system lists the accelerator as present. If the target is a third-party accelerator, confirm the hardware plugin and its support status with its vendor before continuing.

  2. Install the pinned vLLM version

    The platform engineer installs the exact vLLM release the team has pinned into an isolated Python environment on the serving host. Pin the version in the deployment manifest or lock file so every host runs the same engine. Read the notes for the chosen release in the vLLM release list for any changes to pooling or embedding behavior. The step is done when the version command prints the pinned number and importing the package in that environment completes without errors. Record the install command and lock file so a later upgrade can be compared against this build.

  3. Start the server with the embedding model

    The platform engineer starts the server with vllm serve and the chosen embedding model, setting the pooling options that your installed version's documentation gives for embedding models, plus the host and port the internal network will use. Bind the server to an internal address, because the access checks later in the sequence assume a proxy sits in front of it. Confirm the model license and weight source are approved before this step runs. The step is done when the startup log shows the model loaded on the expected accelerator and GET /v1/models returns the model identifier you configured.

  4. Send a test input to the embeddings endpoint

    The platform engineer sends a short test string to /v1/embeddings with curl, using the model identifier from the previous step and the API key if one is set. Check that the response contains one vector per input, that the vector length matches the dimension stated on the model card, and that the same input sent twice returns the same numbers within normal floating point variation. Also send several inputs in one request and confirm the number of vectors matches the number of inputs. The step is done when those checks pass and the response time is recorded as a baseline.

  5. Verify the Cohere-style route if used

    If your clients call a Cohere-compatible embedding route, the platform engineer sends the same kind of test request to that route on the /cohere path in your installed version, confirming the exact path in the vLLM online serving docs. Compare the field names and the shape of the returned embeddings with what the client library expects. Confirm that any extra request fields the client sends are accepted without error. If no client uses this route, record that decision and skip the check. The step is done when a saved request and response from the route match the client's expected schema.

  6. Confirm the API key protects intended routes

    The security engineer restarts the server with --api-key set, then tests each route from outside the host. Calls to /v1/embeddings without the key should fail with an authorization error, and the same call with the key should succeed. Next, check the routes that --api-key does not cover, including /metrics and /health, and confirm the reverse proxy blocks them from user networks while the monitoring host can still reach /metrics. The security docs warn against relying on the key alone, so the proxy allowlist should list only the routes users need. The step is done when a test table shows the expected result for every route.

  7. Scrape metrics from a monitoring host

    The operations engineer runs a scrape from the monitoring host against the /metrics endpoint, using the same network path the Prometheus job will use. Confirm the response is in Prometheus text format and includes request counts, token throughput, latency histograms and KV cache usage, as described in the vLLM metrics docs. Then add the target to the Prometheus configuration and check that it reports as up and that the request counter increases after a test embedding call. The step is done when the target shows as up and the counter moves. Note which histogram buckets are in use, since they can be configured.

  8. Run a retrieval check on a known document set

    The search or RAG engineer embeds a fixed document set the team already understands, along with test queries that have known relevant documents, and stores the vectors in the same index type the application will use. For each query, record whether a relevant document appears in the top results the application returns, and compare the score with a pass threshold agreed before the run. The step is done when the score is written into the build record together with the model, vLLM version and document set identifiers. Repeat this check after any model or engine upgrade, because embedding changes can shift rankings even when the API still responds.

Securing embedding endpoints on a shared vLLM server

A shared vLLM server exposes more routes than the embedding endpoint your applications call. The security docs describe which routes the API key covers, what the network must isolate and what has to be patched, and the cards below set out the decisions for each. Work through them before any indexing job or RAG service reaches the server.

API key covers some routes

The --api-key option protects the /v1, /v2, /inference and /cohere routes, so embedding calls under /v1/embeddings are covered. It does not protect /invocations, /pause, /resume, /abort_requests, /metrics or /health. Those routes stay open to anyone who can reach the port, including the routes that pause, resume or abort work. Do not treat the key as the only control. Send an unauthenticated request to each uncovered route before go-live and record the result.

vLLM security docs

Allowlist user endpoints at a proxy

The security docs recommend a reverse proxy in front of vLLM that forwards only the endpoints meant for users. For an embedding service, that is normally the embedding route your indexing and retrieval code calls. Deny every path not on the list, including the control and monitoring routes covered in the first card. Test the proxy against each blocked route, not only the allowed ones, and repeat the test after any change to proxy rules.

Isolate nodes in multi-node runs

The security docs state that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. Place all nodes on an isolated network that only cluster members can reach, and keep the API port off that network. Confirm that the backend you choose, either Ray or the built-in multiprocessing option, works inside this isolation design before rollout. Single-node embedding servers avoid this inter-node traffic but still need the proxy and API key controls.

Parallelism and scaling docs

Scrape metrics from monitoring only

The /metrics route serves Prometheus-format data from the API server, including request counts, token throughput, latency histograms and KV cache use. The API key does not protect it, so only monitoring servers should reach it. Restrict it at the network or proxy layer and confirm your dashboards and alert rules scrape it from inside that boundary. Histogram buckets are configurable, so agree the latency buckets with the team that owns the alerts before they are set.

vLLM metrics docs

Document text flows through embeddings

Every embedding call sends the text you are indexing to the vLLM server, so the request body is your document content, which may include customer or case records. Decide which services and people can send requests, and what your gateway, access logs and tracing store from those bodies. Retention is set by your logging stack, so confirm it before indexing sensitive corpora. Treat the embedding endpoint as a data path that needs the same review as any system holding those documents.

Patch on every vLLM release

vLLM ships new minor releases about every two weeks, and v0.31.0 followed on October 5, 2026. Each upgrade may change the routes, defaults and API surface that your proxy allowlist and metrics restrictions rely on, so re-run the route checks from the earlier cards on every upgrade. Pin the tested version in each environment and record which version runs where. Confirm with your platform team who owns the upgrade calendar and the release review.

vLLM release notes

What teams ask before hiring help with embedding models on vLLM

How much does serving embedding models on vLLM cost?

vLLM itself has no license fee because it is open source under Apache-2.0, so the cost comes from accelerator capacity, surrounding infrastructure, implementation and the people who operate it. Implementation is mostly a one-time cost, while accelerator capacity, hosting, monitoring and on-call time recur every month. The main drivers are the number of replicas you run, the bursts of indexing traffic compared with steady query traffic, the accelerator type you can access, and the uptime your search or RAG application needs. Ask any partner for a quote that separates one-time implementation from recurring infrastructure and operations, lists each assumption about traffic and hardware, and states what is excluded. DeployOpen works to a fixed scope agreed in writing before work starts, and the quote follows from that scope.

How long does it take to scope and validate an embedding deployment?

Duration depends on your environment, so confirm it in a written schedule before you commit. The main drivers are how many embedding models you need to compare, the size, language mix and update rate of your corpus, whether an existing vector store must be integrated, and how much security review your organization requires. Validation takes longer when accelerator access is delayed, when network placement or identity integration needs approval, or when retrieval quality must be measured against your own queries. Ask for milestones covering scoping, a test run on your corpus, and acceptance criteria agreed before the build starts. Those milestones show which step is holding the schedule.

What does our team need to provide for an embedding project?

Your team provides the access, data and decisions the build depends on, and the technical work cannot proceed properly without them. Typical inputs include:

  • Accelerator access in the cloud account, data center or air-gapped network where serving will run, with the image and driver policies that apply.
  • Sample corpora that reflect production documents, languages and update patterns, along with the rules for what may be copied into a test environment.
  • Security requirements such as network placement, the identity provider, API key or gateway policy, log retention and approval contacts.
  • Named owners for the vector store, the retrieval application and the choice of embedding model.

Ask any partner to list these inputs in the written scope, with the date each one is due.

Can our own engineers deploy embedding models on vLLM without a partner?

Yes. vLLM is open source under Apache-2.0, so a capable platform team can deploy it without buying a license, and the deciding factors are skills and capacity. Your team will need GPU operations experience, container and Kubernetes skills if you run on a cluster, a method for testing retrieval quality, and an owner for upgrades, since minor releases arrive about every two weeks. Compare that work with the people you would need to hire: who runs on-call, who reviews the security configuration, and who repeats the tests after each upgrade. A partner makes sense for the parts you do not want to staff in house, and DeployOpen scopes only the parts you choose, in writing.

How does serving embedding models differ from serving chat models on vLLM?

Embedding serving returns one vector per input and does not generate text, so the load profile differs from chat. The OpenAI-compatible server exposes /v1/embeddings, and embedding models run through vLLM's pooling runner. Batching matters more because indexing jobs send large numbers of inputs at once, while queries arrive as small, latency-sensitive requests. Size the embedding deployment separately from any chat model, since the two compete for accelerator memory and may need different replica counts. Record and test the output dimension and maximum input length, because changing either can force re-indexing of the whole corpus. Confirm for your specific model whether any chat template requirements apply to your setup.

What usually goes wrong with embedding models in production on vLLM?

Most failures come from load mixing, version drift and unclear ownership rather than from the model itself. The common problems are:

  • Indexing bursts that starve query traffic, so search latency rises during scheduled jobs. Separate batch clients or limit their concurrency.
  • Model swaps that change vector dimensions, forcing re-indexing that nobody planned for.
  • Version drift after upgrades, since vLLM ships new minor releases about every two weeks. Pin versions and rerun retrieval tests before each rollout.
  • An endpoint with no named owner, so nobody watches queue depth, error rates or latency trends.

Catch these early by writing the load test, the retrieval test and the alert rules into the handover.

Which access controls should protect an embedding endpoint on vLLM?

Put the embedding endpoint behind a reverse proxy that allowlists only the paths your applications need, because the --api-key option does not cover every route. The vLLM security docs state that --api-key protects /v1, /v2, /inference and /cohere, but not /metrics, /health, /pause, /resume, /abort_requests or /invocations, and they warn against relying on it alone. Expose /metrics only to your monitoring network, and keep /pause and /resume away from application users. For multi-node deployments, the same docs state that node-to-node traffic is insecure by default, so place nodes on an isolated network. Confirm which paths your applications call, including /v1/embeddings, before you write the allowlist.

How do we monitor embedding latency and throughput on vLLM?

vLLM exposes Prometheus-format metrics at /metrics on its API server, including request counts, token throughput, latency histograms and KV cache use. Track query latency and indexing throughput separately, since they fail for different reasons, and alert on error rates and growing queues. Histogram buckets are configurable, so set them around the latency targets your search application needs instead of accepting defaults you have never reviewed. Scrape the endpoint only from inside your monitoring network. Confirm which metrics your chosen version emits for embedding requests, because metric names and coverage can change between releases. The vLLM metrics docs list the available series.

Limits to confirm in your environment before you commit

Each item below is a point where a vLLM embedding deployment can fail or cost more than planned. Check them in your own test environment, against the vendor docs and release notes, and resolve them before you sign a scope or order hardware.

Runner and model support

Confirm that the vLLM release you plan to install supports the pooling runner for your chosen embedding model. Support differs by model family and version, and releases ship about every two weeks, so a model that works in one minor release may change in the next. Check the release notes for the version you pin, then run your model in your own test environment before you commit to it.

vLLM releases

Cohere and OpenAI routes

Confirm which embedding routes the installed server exposes and whether each one matches what your client sends. The OpenAI-compatible /v1/embeddings route is documented, but Cohere-style routes need their own check of paths, request fields and response shapes. Send each route real payloads from your indexing and query code, and compare responses with what your search or RAG parser expects. Also confirm authentication, because the --api-key option covers the /cohere prefix and your proxy rules must keep the routes you need reachable.

Online serving docs

GPU and accelerator fit

Confirm that the accelerator you plan to buy is supported by the vLLM build you will run. vLLM targets NVIDIA CUDA, AMD ROCm and Intel XPU GPUs, along with several CPU architectures, and further accelerators come through third-party hardware plugins outside the main repository. Support for a given embedding model can still vary by hardware, so check the installation docs and the model's listed requirements, then load the exact model on the exact GPU type in your test environment. Record memory use at your planned batch sizes before you order capacity.

Installation docs

Mixed indexing and query load

Test how the server behaves when bulk indexing jobs and live search queries hit it at the same time. Indexing runs are throughput work that can crowd out the low-latency query calls your users wait on, and the balance depends on batch size, input length and how many requests reach the server at once. Run both workloads together in your own environment, measure query latency at the percentiles your service levels use, and separate the workloads onto different queues or replicas if the numbers do not hold. The vLLM docs describe scaling options, but your latency targets are yours to measure.

Metrics for embedding requests

Confirm that the /metrics endpoint reports the signals your operators need for embedding traffic. vLLM exposes Prometheus-format metrics on its API server, including request counts, token throughput, latency histograms and KV cache use, and histogram buckets can be configured. Check whether embedding requests are counted separately from chat traffic, since dashboards built on mixed totals can hide an indexing backlog. Also confirm that /metrics is reachable only from your monitoring network, because the API key does not protect it.

Metrics docs

Air-gapped weight sourcing

Confirm how model weights reach the server when it has no outbound internet access. Decide who downloads each embedding model, where the files are stored, how they are checksummed, and how a new version is approved and copied in. Check that the tokenizer and config files travel with the weights, and that the server loads from a local path and never fetches at startup. vLLM includes an option for air-gapped environments that serves its docs offline, but the model supply chain is a process your team must design and test.

How DeployOpen scopes and delivers embedding model serving

DeployOpen treats embedding serving on vLLM as its own deployment, separate from any chat model on the same platform. The work starts with a written scope that names the models, endpoints, clients and infrastructure involved. DeployOpen then builds, tests, documents and hands over the service inside your own cloud accounts, data centers or air-gapped network, with optional retainer support afterward.

How we scope

  • Written scope names the embedding models, pooling runner settings and expected document volumes.
  • Scope covers the OpenAI-style and Cohere-style embedding endpoints your applications call.
  • Sizing for embedding models is planned separately from chat models, with its own accelerator and memory estimate.

How we build

  • Deploy the vLLM server with the pooling runner for the chosen embedding model on your accelerators.
  • Configure the OpenAI-compatible /v1/embeddings path and any Cohere-style endpoints the clients use.
  • Tune batch sizes for indexing jobs separately from interactive query traffic, then measure throughput and latency.

How we hand over

  • Documentation covers the model, endpoints, batch settings, sizing assumptions and the operating runbook.
  • Access controls combine --api-key with a reverse proxy that allowlists only the embedding endpoints users call.
  • Metrics at /metrics for request counts, token throughput, latency and KV cache use, configured for your monitoring stack.

How we support

  • Optional retainer covers upgrades across vLLM releases, which ship about every two weeks.
  • Re-test embedding output and throughput after model, engine or driver changes, with the results recorded.
  • Get the retainer terms in writing, including response expectations and exclusions, before work starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.