Chapter 7. vLLM arguments reference


When you deploy models using Distributed Inference with llm-d, the vLLM runtime handles inference requests. Red Hat AI Inference Server provides comprehensive documentation for vLLM runtime arguments and advanced configuration that you can apply to your llm-d deployments.

For the complete list of vLLM runtime arguments and detailed configuration options, see the following resources:

7.1. Common use cases for vLLM arguments

Configure vLLM runtime arguments to achieve the following goals:

Optimize resource usage
  • Reduce GPU memory consumption to fit larger models or enable more concurrent requests. For example, using --gpu-memory-utilization=0.85 leaves headroom for system operations and prevents out-of-memory errors.
  • Adjust context length limits to match your application’s requirements. For example, use --max-model-len=8192 for smaller context length to reduce memory requirements.
Improve performance
  • Minimize latency in production by controlling log verbosity. For example, using --disable-access-log-for-endpoints=/health,/metrics,/ping reduces I/O overhead from logging high-frequency health checks while maintaining visibility into inference requests.
  • Enable faster text generation using speculative decoding. For example, --speculative-model=<draft-model> and --use-v2-block-manager use a smaller draft model to predict tokens, which is verified by the main model.
Support specific model requirements
  • Enable tool calling with custom models. For example, using --enable-auto-tool-choice and --tool-call-parser=hermes to enable the model to select tools automatically and parse tool calls using model-specific formats.
  • Support custom chat templates for models that require specific formatting.
  • Enable prefix caching to speed up requests with repeated prompts using --enable-prefix-caching.
Meet operational needs
  • Configure trust settings for custom or private model sources using --trust-remote-code.
  • Control log volume for different operational scenarios by using endpoint-specific filtering or blanket suppression.

You can configure vLLM runtime arguments to optimize inference performance by using the VLLM_ADDITIONAL_ARGS environment variable to control memory allocation, request handling, and model behavior without redeploying or rebuilding containers.

Prerequisites

  • You have OpenShift AI 3.4 EA2 or later installed.
  • You have deployed a model using Distributed Inference with llm-d for distributed inference or single-GPU deployments.
  • You have stored a model in S3, a persistent volume claim (PVC), an OCI container registry, downloaded to hostPath storage in your Kubernetes cluster, or Hugging Face.
  • You have access to the OpenShift CLI (oc) or the OpenShift web console.

Procedure

  1. Identify the vLLM arguments you want to configure. For the complete argument reference, see Red Hat AI Inference Server vLLM Server Arguments.
  2. Create or edit the LLMInferenceService custom resource to include the VLLM_ADDITIONAL_ARGS environment variable under spec.template.containers for the container named main.

    Example vLLM argument configuration:

    apiVersion: serving.kserve.io/v1alpha2
    kind: LLMInferenceService
    metadata:
      name: my-vllm-service
      namespace: <my_namespace>
    spec:
      replicas: 2
      model:
        uri: hf://RedHatAI/Qwen3-8B-FP8-dynamic
        name: RedHatAI/Qwen3-8B-FP8-dynamic
      router:
        route: {}
        gateway: {}
        scheduler: {}
      template:
        containers:
        - name: main
          env:
          - name: VLLM_ADDITIONAL_ARGS
            value: "--max-model-len=10000"
          resources:
            limits:
              cpu: '4'
              memory: 32Gi
              nvidia.com/gpu: "1"
            requests:
              cpu: '2'
              memory: 16Gi
              nvidia.com/gpu: "1"

    where:

    --max-model-len=10000

    Limits the combined prompt and output length to 10,000 tokens. If you do not specify this option, vLLM derives the maximum context length from the model configuration. Set a lower value when the model’s full context length is not required or cannot be accommodated by the available KV cache capacity. This value also affects memory and runtime structures that vLLM configures when initializing the model.

    Note

    The arguments that you specify in VLLM_ADDITIONAL_ARGS are merged with the default arguments provided by the system. If you specify the same argument as a default, your value takes precedence. You can override specific defaults without affecting other default arguments. To specify multiple arguments, use the YAML folded block scalar >- with each argument on its own line.

    You can also use VLLM_ADDITIONAL_ARGS to enable tool calling for models that support it. Add --enable-auto-tool-choice and --tool-call-parser=<parser> to the environment variable value to configure tool calling on the vLLM runtime. For the complete tool calling configuration procedure, see Configure tool calling for Distributed Inference with llm-d deployments.

  3. Apply the custom resource.

    $ oc apply -f llminferenceservice.yaml -n <my_namespace>

    Example output

    llminferenceservice.serving.kserve.io/my-vllm-service configured

    If you are creating a new resource, the output shows created instead of configured.

Verification

  1. Wait for the LLMInferenceService to become ready. This might take several minutes while the model downloads and loads.

    $ oc get llminferenceservice my-vllm-service -n <my_namespace> -w

    Wait until the READY column shows True before proceeding.

  2. Verify that the arguments are applied correctly.

    1. Check that the LLMInferenceService is running:

      $ oc get llminferenceservice my-vllm-service -n <my_namespace>

      Example output

      NAME               READY   AGE
      my-vllm-service    True    5m

      The READY column shows True.

    2. Verify your custom arguments appear in the pod specification:

      Get the pod name:

      $ oc get pods -n <my_namespace> -l app.kubernetes.io/name=my-vllm-service

      Inspect the environment variables:

      $ oc describe pod <pod_name> -n <my_namespace> | grep -A 1 "VLLM_ADDITIONAL_ARGS"

      Example output

          VLLM_ADDITIONAL_ARGS:  --max-model-len=10000

      Your custom arguments should appear in the VLLM_ADDITIONAL_ARGS value.

    3. Test that inference requests work with your configured arguments:

      Get the route URL:

      $ ROUTE_URL=$(oc get llmisvc -n <my_namespace> my-vllm-service -o jsonpath='{.status.url}')

      Send a test request:

      $ curl -X POST "${ROUTE_URL}/v1/completions" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $(oc whoami -t)" \
        -d { "model": "RedHatAI/Qwen3-8B-FP8-dynamic", "prompt": "Explain what Red Hat OpenShift AI is in one sentence.", "max_tokens": 100 }

      A successful response confirms that your vLLM service is running with the configured arguments.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top