@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e489ad7a21
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 00:45 UTC

[Misc] Add SPDX-License-Identifier headers to python source files (#12628)

- **Add SPDX license headers to python source files** - **Check for SPDX headers using pre-commit** commit 9d7ef44c3cfb72ca4c32e1c677d99259d10d4745 Author: Russell Bryant <rbryant@redhat.com> Date: Fri Jan 31 14:18:24 2025 -0500 Add SPDX license headers to python source files This commit adds SPDX license headers to python source files as recommended to the project by the Linux Foundation. These headers provide a concise way that is both human and machine readable for communicating license information for each source file. It helps avoid any ambiguity about the license of the code and can also be easily used by tools to help manage license compliance. The Linux Foundation runs license scans against the codebase to help ensure we are in compliance with the licenses of the code we use, including dependencies. Having these headers in place helps that tool do its job. More information can be found on the SPDX site: - https://spdx.dev/learn/handling-license-info/ Signed-off-by: Russell Bryant <rbryant@redhat.com> commit 5a1cf1cb3b80759131c73f6a9dddebccac039dea Author: Russell Bryant <rbryant@redhat.com> Date: Fri Jan 31 14:36:32 2025 -0500 Check for SPDX headers using pre-commit Signed-off-by: Russell Bryant <rbryant@redhat.com> --------- Signed-off-by: Russell Bryant <rbryant@redhat.com>

Russell Bryant committed Feb 2, 2025 at 14:58 UTC e489ad7a210f4234db696d1f2749d5f3662fa65b
1012 files changed +1884 -2
.buildkite/check-wheel-size.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import sys
5 import zipfile
.buildkite/generate_index.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import os
5
.buildkite/lm-eval-harness/test_lm_eval_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 LM eval harness on model to compare vs HF baseline computed offline.
4 Configs are found in configs/$MODEL.yaml
.buildkite/nightly-benchmarks/scripts/convert-results-json-to-markdown.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import os
5 from pathlib import Path
.buildkite/nightly-benchmarks/scripts/download-tokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4
5 from transformers import AutoTokenizer
.buildkite/nightly-benchmarks/scripts/generate-nightly-markdown.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import json
5 from pathlib import Path
.buildkite/nightly-benchmarks/scripts/get-lmdeploy-modelname.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from lmdeploy.serve.openai.api_client import APIClient
4
5 api_client = APIClient("http://localhost:8000")
.buildkite/nightly-benchmarks/scripts/summary-nightly-results.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import datetime
4 import json
5 import os
.pre-commit-config.yaml
+5 -1
@@ -97,10 +97,14 @@ repos:
97 language: system
98 verbose: true
99 stages: [commit-msg]
100 + - id: check-spdx-header
101 + name: Check SPDX headers
102 + entry: python tools/check_spdx_header.py
103 + language: python
104 + types: [python]
105 - id: suggestion
106 name: Suggestion
107 entry: bash -c 'echo "To bypass pre-commit hooks, add --no-verify to git commit."'
108 language: system
109 verbose: true
110 pass_filenames: false
106 -
benchmarks/backend_request_func.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import os
5 import sys
benchmarks/benchmark_guided.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Benchmark guided decoding throughput."""
3 import argparse
4 import dataclasses
benchmarks/benchmark_latency.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Benchmark the latency of processing a single batch of requests."""
3 import argparse
4 import dataclasses
benchmarks/benchmark_long_document_qa_throughput.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Offline benchmark to test the long document QA throughput.
4
benchmarks/benchmark_prefix_caching.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Benchmark the efficiency of prefix caching.
4
benchmarks/benchmark_prioritization.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Benchmark offline prioritization."""
3 import argparse
4 import dataclasses
benchmarks/benchmark_serving.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 r"""Benchmark online serving throughput.
3
4 On the server side, run one of the following commands:
benchmarks/benchmark_serving_guided.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 r"""Benchmark online serving throughput with guided decoding.
3
4 On the server side, run one of the following commands:
benchmarks/benchmark_throughput.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Benchmark offline inference throughput."""
3 import argparse
4 import dataclasses
benchmarks/cutlass_benchmarks/sparse_benchmarks.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import copy
5 import itertools
benchmarks/cutlass_benchmarks/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Cutlass bench utils
4 from typing import Iterable, Tuple
5
benchmarks/cutlass_benchmarks/w8a8_benchmarks.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import copy
5 import itertools
benchmarks/cutlass_benchmarks/weight_shapes.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Weight Shapes are in the format
4 # ([K, N], TP_SPLIT_DIM)
5 # Example:
benchmarks/disagg_benchmarks/disagg_prefill_proxy_server.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import aiohttp
benchmarks/disagg_benchmarks/round_robin_proxy.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import itertools
5
benchmarks/disagg_benchmarks/visualize_benchmark_results.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4
5 import matplotlib.pyplot as plt
benchmarks/fused_kernels/layernorm_rms_benchmarks.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle as pkl
4 import time
5 from dataclasses import dataclass
benchmarks/kernels/benchmark_aqlm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import sys
5 from typing import Optional
benchmarks/kernels/benchmark_layernorm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4
5 import torch
benchmarks/kernels/benchmark_lora.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import copy
5 import json
benchmarks/kernels/benchmark_machete.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import copy
5 import itertools
benchmarks/kernels/benchmark_marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import torch
benchmarks/kernels/benchmark_moe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import time
5 from datetime import datetime
benchmarks/kernels/benchmark_paged_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 import time
5 from typing import List, Optional
benchmarks/kernels/benchmark_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4
5 import torch
benchmarks/kernels/benchmark_rmsnorm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from typing import Optional, Tuple, Union
5
benchmarks/kernels/benchmark_rope.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import accumulate
4 from typing import List, Optional
5
benchmarks/kernels/benchmark_shapes.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 WEIGHT_SHAPES = {
4 "ideal": [[4 * 256 * 32, 256 * 32]],
5 "mistralai/Mistral-7B-v0.1/TP1": [
benchmarks/kernels/graph_machete_bench.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 import pickle
5 import re
benchmarks/kernels/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Any, Callable, Iterable, Optional
5
benchmarks/kernels/weight_shapes.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Weight Shapes are in the format
4 # ([K, N], TP_SPLIT_DIM)
5 # Example:
benchmarks/overheads/benchmark_hashing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import cProfile
4 import pstats
5
cmake/hipify.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 #!/usr/bin/env python3
4
5 #
collect_env.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa
4 # code borrowed from https://github.com/pytorch/pytorch/blob/main/torch/utils/collect_env.py
5
csrc/cutlass_extensions/vllm_cutlass_library_extension.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from typing import Dict, Union
5
csrc/quantization/machete/generate.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 import math
5 import os
docs/source/conf.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Configuration file for the Sphinx documentation builder.
4 #
5 # This file only contains a selection of the most common options. For a full
docs/source/generate_examples.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 import re
5 from dataclasses import dataclass, field
examples/offline_inference/aqlm_example.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4 from vllm.utils import FlexibleArgumentParser
5
examples/offline_inference/arctic.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 # Sample prompts.
examples/offline_inference/audio_language.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use vLLM for running offline inference
4 with the correct prompt format on audio language models.
examples/offline_inference/basic.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 # Sample prompts.
examples/offline_inference/basic_with_model_default_sampling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM
4
5 # Sample prompts.
examples/offline_inference/chat.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 llm = LLM(model="meta-llama/Meta-Llama-3-8B-Instruct")
examples/offline_inference/chat_with_tools.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa
4 import json
5 import random
examples/offline_inference/classification.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM
4
5 # Sample prompts.
examples/offline_inference/cli.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import asdict
4
5 from vllm import LLM, SamplingParams
examples/offline_inference/cpu_offload.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 # Sample prompts.
examples/offline_inference/distributed.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use Ray Data for running offline batch inference
4 distributively on a multi-nodes cluster.
examples/offline_inference/embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM
4
5 # Sample prompts.
examples/offline_inference/encoder_decoder.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 '''
3 Demonstrate prompting of text-to-text
4 encoder/decoder models, specifically BART
examples/offline_inference/florence2_inference.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 '''
3 Demonstrate prompting of text-to-text
4 encoder/decoder models, specifically Florence-2
examples/offline_inference/gguf_inference.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from huggingface_hub import hf_hub_download
4
5 from vllm import LLM, SamplingParams
examples/offline_inference/llm_engine_example.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 from typing import List, Tuple
5
examples/offline_inference/lora_with_quantization_inference.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use LoRA with different quantization techniques
4 for offline inference.
examples/offline_inference/mlpspeculator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import gc
4 import time
5 from typing import List
examples/offline_inference/multilora_inference.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use the multi-LoRA functionality
4 for offline inference.
examples/offline_inference/neuron.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 # Sample prompts.
examples/offline_inference/neuron_int8_quantization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 from vllm import LLM, SamplingParams
examples/offline_inference/pixtral.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa
4 import argparse
5
examples/offline_inference/prefix_caching.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4 from vllm.distributed import cleanup_dist_env_and_memory
5
examples/offline_inference/profiling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import inspect
4 import json
5 import os
examples/offline_inference/profiling_tpu/profiling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import dataclasses
5 import os
examples/offline_inference/rlhf.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 a simple demonstration of RLHF with vLLM, inspired by
4 the OpenRLHF framework https://github.com/OpenRLHF/OpenRLHF .
examples/offline_inference/save_sharded_state.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Saves each worker's model state dict directly to a checkpoint, which enables a
4 fast load path for large tensor-parallel models where each worker only needs to
examples/offline_inference/scoring.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM
4
5 # Sample prompts.
examples/offline_inference/simple_profiling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import time
5
examples/offline_inference/structured_outputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from enum import Enum
4
5 from pydantic import BaseModel
examples/offline_inference/torchrun_example.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 experimental support for tensor-parallel inference with torchrun,
4 see https://github.com/vllm-project/vllm/issues/11400 for
examples/offline_inference/tpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5 prompts = [
examples/offline_inference/vision_language.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use vLLM for running offline inference with
4 the correct prompt format on vision language models for text generation.
examples/offline_inference/vision_language_embedding.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use vLLM for running offline inference with
4 the correct prompt format on vision language models for multimodal embedding.
examples/offline_inference/vision_language_multi_image.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This example shows how to use vLLM for running offline inference with
4 multi-image input on vision language models for text generation,
examples/offline_inference/whisper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4
5 from vllm import LLM, SamplingParams
examples/online_serving/api_client.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Example Python client for `vllm.entrypoints.api_server`
3 NOTE: The API server is used only for demonstration and simple performance
4 benchmarks. It is not intended for production use.
examples/online_serving/cohere_rerank_client.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Example of using the OpenAI entrypoint's rerank API which is compatible with
4 the Cohere SDK: https://github.com/cohere-ai/cohere-python
examples/online_serving/gradio_openai_chatbot_webserver.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4
5 import gradio as gr
examples/online_serving/gradio_webserver.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import json
5
examples/online_serving/jinaai_rerank_client.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Example of using the OpenAI entrypoint's rerank API which is compatible with
4 Jina and Cohere https://jina.ai/reranker
examples/online_serving/openai_chat_completion_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from openai import OpenAI
4
5 # Modify OpenAI's API key and API base to use vLLM's API server.
examples/online_serving/openai_chat_completion_client_for_multimodal.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """An example showing how to use vLLM to serve multimodal models
3 and run online serving with OpenAI client.
4
examples/online_serving/openai_chat_completion_client_with_tools.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Set up this example by starting a vLLM OpenAI-compatible server with tool call
4 options enabled. For example:
examples/online_serving/openai_chat_completion_structured_outputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from enum import Enum
4
5 from openai import OpenAI
examples/online_serving/openai_chat_completion_with_reasoning.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 An example shows how to generate chat completions from reasoning models
4 like DeepSeekR1.
examples/online_serving/openai_chat_completion_with_reasoning_streaming.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 An example shows how to generate chat completions from reasoning models
4 like DeepSeekR1.
examples/online_serving/openai_chat_embedding_client_for_multimodal.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import base64
5 import io
examples/online_serving/openai_completion_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from openai import OpenAI
4
5 # Modify OpenAI's API key and API base to use vLLM's API server.
examples/online_serving/openai_cross_encoder_score.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Example online usage of Score API.
4
examples/online_serving/openai_embedding_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from openai import OpenAI
4
5 # Modify OpenAI's API key and API base to use vLLM's API server.
examples/online_serving/openai_pooling_client.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Example online usage of Pooling API.
4
examples/online_serving/opentelemetry/dummy_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import requests
4 from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
5 OTLPSpanExporter)
examples/other/tensorize_vllm_model.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import dataclasses
5 import json
find_cuda_init.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import importlib
4 import traceback
5 from typing import Callable
python_only_dev.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 msg = """Old style python only build (without compilation) is deprecated, please check https://docs.vllm.ai/en/latest/getting_started/installation.html#python-only-build-without-compilation for the new way to do python only build (without compilation).
4
5 TL;DR:
setup.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ctypes
4 import importlib.util
5 import logging
tests/async_engine/api_server_async_engine.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """vllm.entrypoints.api_server with some extra logging for testing."""
3 from typing import Any, Dict, Iterable
4
tests/async_engine/test_api_server.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import subprocess
4 import sys
5 import time
tests/async_engine/test_async_llm_engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 import uuid
tests/async_engine/test_request_tracker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.engine.async_llm_engine import RequestTracker
tests/basic_correctness/test_basic_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the short outputs of HF and vLLM when using greedy sampling.
3
4 Run `pytest tests/basic_correctness/test_basic_correctness.py`.
tests/basic_correctness/test_chunked_prefill.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM when using greedy sampling.
3
4 It tests chunked prefill. Chunked prefill can be enabled by
tests/basic_correctness/test_cpu_offload.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from ..utils import compare_two_settings
4
5
tests/basic_correctness/test_cumem.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm import LLM, SamplingParams
tests/basic_correctness/test_preemption.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the short outputs of HF and vLLM when using greedy sampling.
3
4 VLLM_TEST_ENABLE_ARTIFICIAL_PREEMPT=1 has to be set before running this test.
tests/compile/backend.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from copy import deepcopy
4 from typing import Callable, Union
5
tests/compile/piecewise/test_simple.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Test the piecewise compilation with a simple model so that we
4 can exactly calculate the expected output and side effects.
tests/compile/piecewise/test_toy_llama.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Test the piecewise compilation with a simple model, comparing the output
4 with and without the piecewise compilation.
tests/compile/test_basic_correctness.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Dict, List, Optional
5
tests/compile/test_full_graph.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.config import CompilationLevel
tests/compile/test_functionalization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/compile/test_fusion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5 from compressed_tensors.quantization import FP8_DTYPE
tests/compile/test_pass_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4
5 import pytest
tests/compile/test_wrapper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import torch
tests/compile/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import torch
tests/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import os
5 import tempfile
tests/core/block/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5
tests/core/block/e2e/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, Iterable, Optional
4
5 import pytest
tests/core/block/e2e/test_correctness.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import cycle
4
5 import pytest
tests/core/block/e2e/test_correctness_sliding_window.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import List
5
tests/core/block/test_block_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.core.block.utils import (STR_NOT_IMPL_ENC_DEC_PREFIX_CACHE,
tests/core/block/test_block_table.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/core/block/test_common.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4
5 import pytest
tests/core/block/test_cpu_gpu_block_allocator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.core.block.cpu_gpu_block_allocator import CpuGpuBlockAllocator
tests/core/block/test_naive_block.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4
5 import pytest
tests/core/block/test_prefix_caching_block.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 import random
5 from typing import List, Optional
tests/core/test_chunked_prefill_scheduler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4 from unittest.mock import MagicMock
5
tests/core/test_num_computed_tokens_update.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from tests.conftest import VllmRunner
tests/core/test_scheduler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from collections import deque
5 from typing import List, Set, Tuple
tests/core/test_scheduler_encoder_decoder.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest # noqa
tests/core/test_serialization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import msgspec
4
5 from vllm.executor.msgspec_utils import decode_hook, encode_hook
tests/core/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from collections import defaultdict
5 from typing import Any, Dict, List, Optional
tests/distributed/test_ca_buffer_sharing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # can only run on machines with p2p access across GPUs
4 # can only run with torchrun:
5 # torchrun --nproc_per_node=2 tests/distributed/test_ca_buffer_sharing.py
tests/distributed/test_comm_ops.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test the communication operators.
3
4 Run `pytest tests/distributed/test_comm_ops.py`.
tests/distributed/test_custom_all_reduce.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import random
5
tests/distributed/test_distributed_oot.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from ..entrypoints.openai.test_oot_registration import (
4 run_and_test_dummy_opt_api_server)
5
tests/distributed/test_multi_node_assignment.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Make sure ray assigns GPU workers to the correct node.
3
4 Run:
tests/distributed/test_pipeline_parallel.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 WARNING: This test runs in both single-node (4 GPUs) and multi-node
4 (2 node with 2 GPUs each) modes. If the test only uses 2 GPUs, it is
tests/distributed/test_pipeline_partition.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/distributed/test_pp_cudagraph.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/distributed/test_pynccl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import multiprocessing
4 import os
5 from typing import Dict, List
tests/distributed/test_same_node.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import torch.distributed as dist
tests/distributed/test_shm_broadcast.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import multiprocessing
4 import random
5 import time
tests/distributed/test_torchrun_example.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # unit test for `examples/offline_inference/torchrun_example.py`
4
5 import random
tests/distributed/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import socket
4
5 import pytest
tests/encoder_decoder/test_e2e_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """E2E tests to verify the correctness of the encoder-decoder framework
3
4 Run `pytest tests/encoder_decoder/test_e2e_correctness.py`.
tests/engine/output_processor/test_multi_step.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from unittest.mock import MagicMock
5
tests/engine/output_processor/test_stop_checker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from unittest.mock import MagicMock
4
5 import pytest
tests/engine/test_arg_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from argparse import ArgumentTypeError
4
5 import pytest
tests/engine/test_computed_prefix_blocks.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.engine.arg_utils import EngineArgs
tests/engine/test_custom_executor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 from typing import Any, Callable, Dict, List, Optional, Tuple, Union
tests/engine/test_detokenization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.entrypoints.llm import LLM
tests/engine/test_multiproc_workers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from concurrent.futures import ThreadPoolExecutor
5 from functools import partial
tests/engine/test_short_mm_context.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from ..conftest import IMAGE_ASSETS
tests/engine/test_skip_tokenizer_init.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.entrypoints.llm import LLM
tests/engine/test_stop_reason.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test the different finish_reason="stop" situations during generation:
3 1. One of the provided stop strings
4 2. One of the provided stop tokens
tests/engine/test_stop_strings.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, List, Optional
4
5 import pytest
tests/entrypoints/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5
tests/entrypoints/llm/test_accuracy.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file test accuracy of the vLLM server via LMEval.
4 It uses local-completions, which interacts with vLLM
tests/entrypoints/llm/test_chat.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/entrypoints/llm/test_collective_rpc.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import LLM
tests/entrypoints/llm/test_encode.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import weakref
4 from typing import List
5
tests/entrypoints/llm/test_generate.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import weakref
4 from typing import List
5
tests/entrypoints/llm/test_generate_multiple_loras.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import weakref
4
5 import pytest
tests/entrypoints/llm/test_gpu_utilization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5
tests/entrypoints/llm/test_guided_generate.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 import weakref
tests/entrypoints/llm/test_init.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import LLM
tests/entrypoints/llm/test_lazy_outlines.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import sys
4 from contextlib import nullcontext
5
tests/entrypoints/llm/test_prompt_validation.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import LLM
tests/entrypoints/offline_mode/test_offline_mode.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for HF_HUB_OFFLINE mode"""
3 import importlib
4 import sys
tests/entrypoints/openai/reasoning_parsers/test_deepseekr1_reasoning_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/entrypoints/openai/reasoning_parsers/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple, Union
4
5 from vllm.entrypoints.openai.protocol import (ChatCompletionRequest,
tests/entrypoints/openai/test_accuracy.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file test accuracy of the vLLM server via LMEval.
4 It uses local-completions, which interacts with vLLM
tests/entrypoints/openai/test_async_tokenization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import contextlib
5 import random
tests/entrypoints/openai/test_audio.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List
4
5 import openai
tests/entrypoints/openai/test_basic.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from http import HTTPStatus
5 from typing import List
tests/entrypoints/openai/test_chat.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # imports for guided decoding tests
4 import json
5 import re
tests/entrypoints/openai/test_chat_echo.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import NamedTuple
4
5 import openai # use the official client for correctness check
tests/entrypoints/openai/test_chat_template.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.entrypoints.chat_utils import (apply_hf_chat_template,
tests/entrypoints/openai/test_chunked_prompt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import openai # use the official client for correctness check
4 import pytest
5 import pytest_asyncio
tests/entrypoints/openai/test_cli_args.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4
5 import pytest
tests/entrypoints/openai/test_completion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # imports for guided decoding tests
4 import json
5 import re
tests/entrypoints/openai/test_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4
5 import numpy as np
tests/entrypoints/openai/test_encoder_decoder.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import openai
4 import pytest
5 import pytest_asyncio
tests/entrypoints/openai/test_lora_adapters.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import json
5 import shutil
tests/entrypoints/openai/test_metrics.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import subprocess
4 import sys
5 import tempfile
tests/entrypoints/openai/test_models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import openai # use the official client for correctness check
4 import pytest
5 import pytest_asyncio
tests/entrypoints/openai/test_oot_registration.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from ...utils import VLLM_PATH, RemoteOpenAIServer
4
5 chatml_jinja_path = VLLM_PATH / "examples/template_chatml.jinja"
tests/entrypoints/openai/test_pooling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4
5 import numpy as np
tests/entrypoints/openai/test_prompt_validation.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # imports for guided decoding tests
4 import re
5
tests/entrypoints/openai/test_rerank.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import requests
5
tests/entrypoints/openai/test_return_tokens_as_ids.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Separate these tests out from test_completion and test_chat, because they
4 # require launching a second server with a different flag. Running both servers
5 # at the same time on a single node will OOM.
tests/entrypoints/openai/test_root_path.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import contextlib
4 import os
5 from typing import Any, List, NamedTuple
tests/entrypoints/openai/test_run_batch.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import subprocess
5 import sys
tests/entrypoints/openai/test_score.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import requests
5
tests/entrypoints/openai/test_serving_chat.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from contextlib import suppress
5 from dataclasses import dataclass
tests/entrypoints/openai/test_serving_models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from http import HTTPStatus
4 from unittest.mock import MagicMock
5
tests/entrypoints/openai/test_shutdown.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import openai
4 import pytest
5
tests/entrypoints/openai/test_tokenization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import pytest_asyncio
5 import requests
tests/entrypoints/openai/test_video.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List
4
5 import openai
tests/entrypoints/openai/test_vision.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List
4
5 import openai
tests/entrypoints/openai/test_vision_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict
4
5 import pytest
tests/entrypoints/openai/tool_parsers/test_pythonic_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4 from unittest.mock import MagicMock
5
tests/entrypoints/openai/tool_parsers/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Tuple, Union
4
5 from vllm.entrypoints.openai.protocol import (ChatCompletionRequest,
tests/entrypoints/test_chat_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import warnings
4 from typing import Optional
5
tests/kernels/allclose_default.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 # Reference default values of atol and rtol are from
tests/kernels/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.utils import (create_kv_caches_with_random,
tests/kernels/quant_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple, Union
4
5 import torch
tests/kernels/test_activation.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import Type
5
tests/kernels/test_aqlm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from tests.kernels.utils import opcheck
tests/kernels/test_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import List, Optional, Tuple
5
tests/kernels/test_attention_selector.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from unittest.mock import Mock, patch
4
5 import pytest
tests/kernels/test_awq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/kernels/test_awq_marlin.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test AWQ with fused MoE Marlin kernels.
3
4 Run `pytest tests/kernels/test_awq_marlin.py`.
tests/kernels/test_awq_triton.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the AWQ Triton kernel.
3
4 Run `pytest tests/kernels/test_awq_triton.py`.
tests/kernels/test_block_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from https://github.com/sgl-project/sglang/pull/2575
4 import itertools
5
tests/kernels/test_blocksparse_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import List, Optional, Tuple
5
tests/kernels/test_cache.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import List, Tuple
5
tests/kernels/test_cascade_flash_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import pytest
tests/kernels/test_causal_conv1d.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import pytest
tests/kernels/test_cutlass.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for cutlass kernels
3
4 Run `pytest tests/kernels/test_cutlass.py`.
tests/kernels/test_cutlass_2of4_sparse.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for sparse cutlass kernels
3
4 Run `pytest tests/kernels/test_semi_structured.py`.
tests/kernels/test_encoder_decoder_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Tests:
4
tests/kernels/test_flash_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import pytest
tests/kernels/test_flashinfer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import flashinfer
tests/kernels/test_fp8_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/kernels/test_fused_quant_layernorm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple, Union
4
5 import pytest
tests/kernels/test_ggml.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import gguf
4 import pytest
5 import torch
tests/kernels/test_gguf.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from pathlib import Path
4 from typing import List
5
tests/kernels/test_gptq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from tests.kernels.utils import opcheck
tests/kernels/test_int8_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/kernels/test_layernorm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/kernels/test_machete_mm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the machete kernel.
3
4 Run `pytest tests/kernels/test_machete_mm.py`.
tests/kernels/test_mamba_ssm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5 import torch.nn.functional as F
tests/kernels/test_marlin_gemm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the marlin kernel.
3
4 Run `pytest tests/kernels/marlin/test_marlin_gemm.py`.
tests/kernels/test_mha_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Test:
4
tests/kernels/test_moe.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the MOE layers.
3
4 Run `pytest tests/kernels/test_moe.py`.
tests/kernels/test_permute_cols.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/kernels/test_pos_encoding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import accumulate, product
4 from typing import Dict, List, Optional
5
tests/kernels/test_prefix_prefill.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 import random
5 import time
tests/kernels/test_rotary_embedding.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Tests for miscellaneous utilities
4 """
tests/kernels/test_triton_decode_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/kernels/test_triton_scaled_mm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the triton_scaled_mm kernel
3
4 Run `pytest tests/kernels/test_triton_scaled_mm.py`.
tests/kernels/test_utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Tests for miscellaneous utilities
4 """
tests/kernels/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Kernel test utils"""
3
4 import itertools
tests/kv_transfer/disagg_test.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import subprocess
5 import sys
tests/kv_transfer/module_test.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import subprocess
4 import sys
5
tests/kv_transfer/test_lookup_buffer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import random
5
tests/kv_transfer/test_send_recv.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import time
5 from typing import List
tests/lora/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import tempfile
4 from collections import OrderedDict
5 from typing import Dict, List, TypedDict
tests/lora/data/long_context_test_data.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa
4 """This file contains a dictionary of prompts and golden responses."""
5
tests/lora/test_baichuan.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_chatglm3_tp.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import vllm
tests/lora/test_gemma.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_jamba.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_layers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from copy import deepcopy
5 from dataclasses import dataclass
tests/lora/test_llama_tp.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import ray
tests/lora/test_long_context.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ast
4 from typing import List, Optional, Tuple
5
tests/lora/test_lora_bias_e2e.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_lora_checkpoints.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_lora_huggingface.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_lora_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Dict, List
5
tests/lora/test_minicpmv_tp.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_mixtral.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_peft_helper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import math
5 import shutil
tests/lora/test_phi.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import vllm
tests/lora/test_punica_ops_sizes.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This script is mainly used to tests various hidden_sizes. We have collected the
4 hidden_sizes included in the LoRA models currently supported by vLLM. It tests
tests/lora/test_punica_ops_variation.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This script is mainly used to test whether trtion kernels can run normally
4 under different conditions, including various batches, numbers of LoRA , and
tests/lora/test_quant_model.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/fmmoret/vllm/blob/fm-support-lora-on-quantized-models/tests/lora/test_llama.py
5 from dataclasses import dataclass
tests/lora/test_qwen2vl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/lora/test_tokenizer_group.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 from transformers import AutoTokenizer, PreTrainedTokenizerBase
5
tests/lora/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import OrderedDict
4 from unittest.mock import patch
5
tests/lora/test_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import random
5 import tempfile
tests/lora/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Optional
4
5 import torch
tests/metrics/test_metrics.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from typing import List
5
tests/model_executor/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5
tests/model_executor/test_enabled_custom_ops.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/model_executor/test_guided_processors.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4
5 import pytest
tests/model_executor/test_model_load_with_params.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/model_executor/weight_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import tempfile
5
tests/models/decoder_only/audio_language/test_ultravox.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple, Type
4
5 import numpy as np
tests/models/decoder_only/language/test_aqlm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of a AQLM model between vLLM and HF Transformers
3
4 Run `pytest tests/models/test_aqlm.py`.
tests/models/decoder_only/language/test_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # flake8: noqa
4 """Tests fp8 models against ground truth generation
5 Note: these tests will only pass on L4 GPU.
tests/models/decoder_only/language/test_gguf.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Tests gguf models against unquantized models generations
4 Note: To pass the test, quantization higher than Q4 should be used
tests/models/decoder_only/language/test_gptq_marlin.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compares the outputs of gptq vs gptq_marlin
3 Note: GPTQ and Marlin do not have bitwise correctness.
4 As a result, in this test, we just confirm that the top selected tokens of the
tests/models/decoder_only/language/test_gptq_marlin_24.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of a GPTQ model to a Marlin_24 model.
3
4 Note: GPTQ and Marlin_24 do not have bitwise correctness.
tests/models/decoder_only/language/test_granite.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for Granite models using greedy sampling.
3
4 Run `pytest tests/models/test_granite.py`.
tests/models/decoder_only/language/test_jamba.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from tests.utils import multi_gpu_test
tests/models/decoder_only/language/test_mamba.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM when using greedy sampling for Mamba.
3
4 Run `pytest tests/models/test_mamba.py`.
tests/models/decoder_only/language/test_mistral.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for Mistral models using greedy sampling.
3
4 Run `pytest tests/models/test_mistral.py`.
tests/models/decoder_only/language/test_modelopt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # flake8: noqa
4 """Tests Model Optimizer fp8 models against ground truth generation
5 Note: these tests will only pass on H100
tests/models/decoder_only/language/test_models.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM when using greedy sampling.
3
4 Run `pytest tests/models/test_models.py`.
tests/models/decoder_only/language/test_phimoe.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for moe models using greedy sampling.
3
4 Run `pytest tests/models/test_phimoe.py`.
tests/models/decoder_only/vision_language/test_awq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Type
4
5 import pytest
tests/models/decoder_only/vision_language/test_h2ovl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple
4
5 import pytest
tests/models/decoder_only/vision_language/test_intern_vit.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import pytest
tests/models/decoder_only/vision_language/test_models.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Common tests for testing .generate() functionality for single / multiple
3 image, embedding, and video support for different VLMs in vLLM.
4 """
tests/models/decoder_only/vision_language/test_phi3v.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import re
5 from typing import List, Optional, Tuple, Type
tests/models/decoder_only/vision_language/test_pixtral.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for Mistral models using greedy sampling.
3
4 Run `pytest tests/models/test_mistral.py`.
tests/models/decoder_only/vision_language/test_qwen2_vl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, List, Optional, Tuple, Type, TypedDict, Union
4
5 import numpy.typing as npt
tests/models/decoder_only/vision_language/vlm_utils/builders.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Helpers for building inputs that can be leveraged for different test types.
3 """
4 from pathlib import PosixPath
tests/models/decoder_only/vision_language/vlm_utils/case_filtering.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utils for determining which subset of model tests belong to a specific
3 modality, getting all combinations (similar to pytest's parametrization),
4 handling multimodal placeholder substitution, and so on.
tests/models/decoder_only/vision_language/vlm_utils/core.py
+2 -1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Core test implementation to be shared across modalities."""
3 from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
4
@@ -153,4 +154,4 @@ def process_runner_outputs(
154 def process_outputs(output_processor, model, outputs_per_image):
155 """Applies a model specific post-processor function to a runner's output"""
156 return [[output_processor(res, model) for res in outputs]
156 - for outputs in outputs_per_image]
\ No newline at end of file
157 + for outputs in outputs_per_image]
tests/models/decoder_only/vision_language/vlm_utils/custom_inputs.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Custom input builders for edge-cases in different models."""
3 from typing import Callable
4
tests/models/decoder_only/vision_language/vlm_utils/model_utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Common utility functions relating to different models that are useful
3 for manipulating the input / output of HF & vLLM test runners, which are
4 typically specific to a small subset of models.
tests/models/decoder_only/vision_language/vlm_utils/runners.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Entrypoints for wrapping the core run_test implementation for specific test
3 types / modalities.
4 """
tests/models/decoder_only/vision_language/vlm_utils/types.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Types for writing multimodal model tests."""
3 from enum import Enum
4 from pathlib import PosixPath
tests/models/embedding/language/test_cls_models.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the classification outputs of HF and vLLM models.
3
4 Run `pytest tests/models/test_cls_models.py`.
tests/models/embedding/language/test_embedding.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the embedding outputs of HF and vLLM models.
3
4 Run `pytest tests/models/embedding/language/test_embedding.py`.
tests/models/embedding/language/test_gritlm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import importlib.util
4 import math
5 from array import array
tests/models/embedding/language/test_scoring.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the scoring outputs of HF and vLLM models.
3
4 Run `pytest tests/models/embedding/language/test_scoring.py`.
tests/models/embedding/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Sequence
4
5 import torch
tests/models/embedding/vision_language/test_dse_qwen2_vl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import partial
4 from typing import Callable, Dict, List, Type
5
tests/models/embedding/vision_language/test_llava_next.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Type
4
5 import pytest
tests/models/embedding/vision_language/test_phi3v.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Type
4
5 import pytest
tests/models/encoder_decoder/audio_language/test_whisper.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for Whisper models using greedy sampling.
3
4 Run `pytest tests/models/encoder_decoder/audio/test_whisper.py`.
tests/models/encoder_decoder/language/test_bart.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM for BART models using greedy sampling.
3
4 Run `pytest tests/models/encoder_decoder/language/test_bart.py`.
tests/models/encoder_decoder/vision_language/test_broadcast.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from ....utils import multi_gpu_test
tests/models/encoder_decoder/vision_language/test_florence2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import partial
4 from typing import List, Optional, Tuple, Type
5
tests/models/encoder_decoder/vision_language/test_mllama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple, Type, overload
4
5 import pytest
tests/models/multimodal/processing/test_common.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import partial
4
5 import numpy as np
tests/models/multimodal/processing/test_idefics3.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for Idefics3's multimodal preprocessing kwargs."""
3 from typing import Optional
4
tests/models/multimodal/processing/test_internvl.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for InternVL's multimodal preprocessing kwargs."""
3 from typing import Callable, Optional
4
tests/models/multimodal/processing/test_llava_next.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from functools import partial
5
tests/models/multimodal/processing/test_llava_onevision.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from functools import partial
5
tests/models/multimodal/processing/test_phi3v.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for phi3v's multimodal preprocessing kwargs."""
3 import pytest
4
tests/models/multimodal/processing/test_qwen2_vl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.multimodal import MULTIMODAL_REGISTRY
tests/models/registry.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass, field
4 from typing import AbstractSet, Any, Literal, Mapping, Optional
5
tests/models/test_initialization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from unittest.mock import patch
4
5 import pytest
tests/models/test_oot_registration.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/models/test_registry.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import warnings
4
5 import pytest
tests/models/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import warnings
4 from typing import Dict, List, Optional, Sequence, Tuple, Union
5
tests/mq_llm_engine/test_abort.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test that aborting is handled properly."""
3
4 import asyncio
tests/mq_llm_engine/test_error_handling.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test that various errors are handled properly."""
3
4 import asyncio
tests/mq_llm_engine/test_load.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test that the MQLLMEngine is able to handle 10k concurrent requests."""
3
4 import asyncio
tests/mq_llm_engine/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import multiprocessing
5 from typing import Callable, Tuple, Union
tests/multi_step/test_correctness_async_llm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Test the AsyncLLMEngine with multi-step-decoding
4 from typing import List, Optional
5
tests/multi_step/test_correctness_llm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Test the LLMEngine with multi-step-decoding
4
5 import copy
tests/multimodal/test_inputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm.multimodal.inputs import MultiModalKwargs, NestedTensors
tests/multimodal/test_processing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from contextlib import nullcontext
4 from typing import cast
5 from unittest.mock import MagicMock
tests/multimodal/test_processor_kwargs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from array import array
4 from typing import Callable, Dict, Mapping, Optional
5 from unittest.mock import patch
tests/multimodal/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4 import mimetypes
5 import os
tests/multimodal/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import numpy as np
4 from PIL import Image
5
tests/neuron/test_prefix_prefill.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import Optional
5
tests/plugins/vllm_add_dummy_model/setup.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from setuptools import setup
4
5 setup(name='vllm_add_dummy_model',
tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import ModelRegistry
4
5
tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Optional, Tuple, Union
4
5 import torch
tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_llava.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import torch
tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_opt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import torch
tests/plugins/vllm_add_dummy_platform/setup.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from setuptools import setup
4
5 setup(
tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5
tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_attention_backend.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.attention.backends.flash_attn import FlashAttentionBackend
4
5
tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_platform.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.platforms.cuda import CudaPlatform
4
5
tests/plugins_tests/test_platform_plugins.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from tests.kernels.utils import override_backend_env_variable
tests/prefix_caching/test_disable_sliding_window.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the with and without prefix caching.
3
4 Run `pytest tests/prefix_caching/test_prefix_caching.py`.
tests/prefix_caching/test_prefix_caching.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the with and without prefix caching.
3
4 Run `pytest tests/prefix_caching/test_prefix_caching.py`.
tests/prompt_adapter/test_bloom.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 import vllm
tests/prompt_adapter/test_multi_adapter_inference.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import EngineArgs, LLMEngine, SamplingParams
4 from vllm.prompt_adapter.request import PromptAdapterRequest
5
tests/prompt_adapter/test_pa_lora.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from huggingface_hub import snapshot_download
4
5 from vllm import EngineArgs, LLMEngine, SamplingParams
tests/quantization/test_bitsandbytes.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 '''Tests whether bitsandbytes computation is enabled correctly.
3
4 Run `pytest tests/quantization/test_bitsandbytes.py`.
tests/quantization/test_compressed_tensors.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test model set-up and weight loading for llmcompressor-quantized models.
3
4 Run `pytest tests/quantization/test_compressed_tensors.py`.
tests/quantization/test_configs.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests whether Marlin models can be loaded from the autogptq config.
3
4 Run `pytest tests/quantization/test_configs.py --forked`.
tests/quantization/test_cpu_offload.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Expanded quantized model tests for CPU offloading
4 # Base tests: tests/basic_correctness/test_cpu_offload.py
5
tests/quantization/test_experts_int8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # flake8: noqa
4 """Tests experts_int8 quantization startup and generation,
5 doesn't test correctness
tests/quantization/test_fp8.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests whether FP8 computation is enabled correctly.
3
4 Run `pytest tests/quantization/test_fp8.py --forked`.
tests/quantization/test_ipex_quant.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test model set-up and inference for quantized HF models supported
3 on the CPU/GPU backend using IPEX (including AWQ/GPTQ).
4
tests/quantization/test_lm_head.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests whether gptq models with quantized lm_head can be loaded.
3
4 Run `pytest tests/quantization/test_quant_lm_head_true.py --forked`.
tests/quantization/test_quark.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test model set-up and weight loading for quark-quantized models.
3
4 Run `pytest tests/quantization/test_quark.py`.
tests/quantization/test_register_quantization_config.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests register custom quantization config.
3
4 See https://github.com/vllm-project/vllm/issues/11926 for more details.
tests/quantization/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.model_executor.layers.quantization import get_quantization_config
4 from vllm.platforms import current_platform
5
tests/runai_model_streamer/test_runai_model_streamer_loader.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import SamplingParams
4 from vllm.config import LoadConfig, LoadFormat
5 from vllm.model_executor.model_loader.loader import (RunaiModelStreamerLoader,
tests/runai_model_streamer/test_weight_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import glob
4 import tempfile
5
tests/samplers/test_beam_search.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the outputs of HF and vLLM when using beam search.
3
4 Run `pytest tests/samplers/test_beam_search.py`.
tests/samplers/test_ignore_eos.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Make sure ignore_eos works.
3
4 Run `pytest tests/samplers/test_ignore_eos.py`.
tests/samplers/test_logits_processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/samplers/test_logprobs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/samplers/test_no_bad_words.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Make sure bad_words works.
3
4 Run `pytest tests/samplers/test_no_bad_words.py`.
tests/samplers/test_ranks.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import SamplingParams
tests/samplers/test_rejection_sampler.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for rejection sampling."""
3 from typing import List, Tuple
4
tests/samplers/test_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 import random
5 from dataclasses import dataclass
tests/samplers/test_seeded_generate.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Verify that seeded random sampling is deterministic.
3
4 Run `pytest tests/samplers/test_seeded_generate.py`.
tests/samplers/test_typical_acceptance_sampler.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for rejection sampling."""
3
4 import pytest
tests/spec_decode/e2e/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import cycle
4 from typing import List, Optional, Sequence, Tuple, Union
5
tests/spec_decode/e2e/test_compatibility.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import SamplingParams
tests/spec_decode/e2e/test_eagle_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This docstring details important information on the testing methodology.
3
4 Most of the tests rely on "greedy equality", where we expect the output of
tests/spec_decode/e2e/test_integration.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests which cover integration of the speculative decoding framework with
3 other features, e.g. cuda graphs.
4 """
tests/spec_decode/e2e/test_integration_dist_tp2.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests which cover integration of the speculative decoding framework with
3 tensor parallelism.
4 """
tests/spec_decode/e2e/test_integration_dist_tp4.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests which cover integration of the speculative decoding framework with
3 tensor parallelism.
4 """
tests/spec_decode/e2e/test_logprobs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import cycle
4
5 import pytest
tests/spec_decode/e2e/test_medusa_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This docstring details important information on the testing methodology.
3
4 Most of the tests rely on "greedy equality", where we expect the output of
tests/spec_decode/e2e/test_mlp_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This docstring details important information on the testing methodology.
3
4 Most of the tests rely on "greedy equality", where we expect the output of
tests/spec_decode/e2e/test_multistep_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """The tests in this file verify end-to-end speculative decoding correctness.
3
4 This docstring details important information on the testing methodology.
tests/spec_decode/e2e/test_ngram_correctness.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This docstring details important information on the testing methodology.
3
4 Most of the tests rely on "greedy equality", where we expect the output of
tests/spec_decode/e2e/test_seed.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from .conftest import run_equality_correctness_test
tests/spec_decode/test_batch_expansion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/spec_decode/test_dynamic_spec_decode.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from unittest.mock import MagicMock, patch
4
5 import pytest
tests/spec_decode/test_metrics.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from unittest.mock import MagicMock
5
tests/spec_decode/test_multi_step_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import Dict, List
5 from unittest.mock import MagicMock
tests/spec_decode/test_ngram_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm.sequence import ExecuteModelRequest
tests/spec_decode/test_scorer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import List
5
tests/spec_decode/test_spec_decode_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from collections import defaultdict
5 from types import SimpleNamespace
tests/spec_decode/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from unittest.mock import MagicMock
4
5 import pytest
tests/spec_decode/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from itertools import count
4 from typing import Callable, Dict, List, Optional
5 from typing import Sequence as GenericSequence
tests/standalone_tests/lazy_torch_compile.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Description: Test the lazy import module
4 # The utility function cannot be placed in `vllm.utils`
5 # this needs to be a standalone script
tests/tensorizer_loader/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 import gc
5 from typing import Callable, TypeVar
tests/tensorizer_loader/test_tensorizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import gc
4 import json
5 import os
tests/test_cache_block_hashing.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Test hashing of cache blocks.
3
4 Run `pytest tests/test_cache_block_hashing.py`.
tests/test_config.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import asdict
4
5 import pytest
tests/test_embedded_commit.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import vllm
4
5
tests/test_inputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/test_logger.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import logging
5 import os
tests/test_logits_processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import random
4 from typing import Tuple
5 from unittest.mock import patch
tests/test_regression.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Containing tests that check for regressions in vLLM's behavior.
3
4 It should include tests that are reported by users and making sure they
tests/test_sampling_params.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Tests for the SamplingParams class.
3 """
4 from vllm import SamplingParams
tests/test_scalartype.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import torch
5
tests/test_sequence.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.model_executor.layers.sampler import SamplerOutput
tests/test_sharded_state_loader.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import multiprocessing as mp
4 import os
5 import shutil
tests/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 import socket
tests/tokenization/test_cached_tokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from copy import deepcopy
4
5 from transformers import AutoTokenizer
tests/tokenization/test_detokenize.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, Generator, List, Optional
4
5 import pytest
tests/tokenization/test_get_eos.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This test file includes some cases where it is inappropriate to
4 only get the `eos_token_id` from the tokenizer as defined by
tests/tokenization/test_tokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 from transformers import PreTrainedTokenizerBase
5
tests/tokenization/test_tokenizer_group.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 import sys
tests/tool_use/conftest.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4 import pytest_asyncio
5 from huggingface_hub import snapshot_download
tests/tool_use/test_chat_completion_request_validations.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.entrypoints.openai.protocol import ChatCompletionRequest
tests/tool_use/test_chat_completions.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import openai
tests/tool_use/test_jamba_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from typing import Generator, List, Optional
5
tests/tool_use/test_parallel_tool_calls.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from typing import Dict, List, Optional
5
tests/tool_use/test_tool_calls.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from typing import Dict, List, Optional
5
tests/tool_use/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from copy import deepcopy
4 from typing import Any, Dict, List, Optional
5
tests/tpu/test_compilation.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import glob
4 import os
5 import tempfile
tests/tpu/test_custom_dispatcher.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 from vllm.config import CompilationLevel
tests/tpu/test_quantization_accuracy.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4
5 import lm_eval
tests/tracing/test_tracing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import threading
5 from concurrent import futures
tests/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import copy
5 import functools
tests/v1/core/test_kv_cache_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.multimodal.inputs import MultiModalKwargs
tests/v1/core/test_prefix_caching.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Compare the with and without prefix caching."""
3 import pytest
4
tests/v1/e2e/test_cascade_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm import LLM, SamplingParams
4
5
tests/v1/engine/test_async_llm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from contextlib import ExitStack
5 from typing import List, Tuple
tests/v1/engine/test_engine_args.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm import envs
tests/v1/engine/test_engine_core.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 import uuid
5
tests/v1/engine/test_engine_core_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import time
5 import uuid
tests/v1/engine/test_output_processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/v1/sample/test_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Set, Tuple
4
5 import numpy as np
tests/v1/test_stats.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pytest
4
5 from vllm.sampling_params import SamplingParams
tests/v1/test_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import torch
tests/v1/worker/test_gpu_input_batch.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Set, Tuple
4
5 import numpy as np
tests/vllm_test_utils/setup.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from setuptools import setup
4
5 setup(
tests/vllm_test_utils/vllm_test_utils/__init__.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 vllm_utils is a package for vLLM testing utilities.
4 It does not import any vLLM modules.
tests/vllm_test_utils/vllm_test_utils/blame.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import contextlib
4 import dataclasses
5 import sys
tests/vllm_test_utils/vllm_test_utils/monitor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import contextlib
4 import dataclasses
5 import sys
tests/weight_loading/test_weight_loading.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import pytest
tests/worker/test_encoder_decoder_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from typing import List
5
tests/worker/test_model_input.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import List, Tuple, Type
5
tests/worker/test_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import pytest
tests/worker/test_profile.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm.engine.arg_utils import EngineArgs
tests/worker/test_swap.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm.engine.arg_utils import EngineArgs
tools/check_spdx_header.py new
+43
@@ -0,0 +1,43 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 +import sys
4 +
5 +SPDX_HEADER = "# SPDX-License-Identifier: Apache-2.0"
6 +SPDX_HEADER_PREFIX = "# SPDX-License-Identifier:"
7 +
8 +
9 +def check_spdx_header(file_path):
10 + with open(file_path, encoding='UTF-8') as file:
11 + lines = file.readlines()
12 + if not lines:
13 + # not necessary for an empty file like __init__.py
14 + return True
15 + if not lines[0].strip().startswith(SPDX_HEADER_PREFIX):
16 + return False
17 + return True
18 +
19 +
20 +def add_header(file_path):
21 + with open(file_path, 'r+', encoding='UTF-8') as file:
22 + lines = file.readlines()
23 + file.seek(0, 0)
24 + file.write(SPDX_HEADER + '\n\n' + ''.join(lines))
25 +
26 +
27 +def main():
28 + files_with_missing_header = []
29 + for file_path in sys.argv[1:]:
30 + if not check_spdx_header(file_path):
31 + files_with_missing_header.append(file_path)
32 +
33 + if files_with_missing_header:
34 + print("The following files are missing the SPDX header:")
35 + for file_path in files_with_missing_header:
36 + print(f" {file_path}")
37 + add_header(file_path)
38 +
39 + sys.exit(1 if files_with_missing_header else 0)
40 +
41 +
42 +if __name__ == "__main__":
43 + main()
tools/profiler/print_layerwise_table.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import json
5 from typing import Dict
tools/profiler/visualize_layerwise_profile.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import copy
5 import json
tools/report_build_time_ninja.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 #!/usr/bin/env python3
4 # Copyright (c) 2018 The Chromium Authors. All rights reserved.
5 # Use of this source code is governed by a BSD-style license that can be
use_existing_torch.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import glob
4
5 requires_files = glob.glob('requirements*.txt')
vllm/__init__.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """vLLM: a high-throughput and memory-efficient inference engine for LLMs"""
3 import os
4
vllm/_custom_ops.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import contextlib
4 import importlib
5 from typing import TYPE_CHECKING, List, Optional, Tuple, Union
vllm/_ipex_ops.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import torch
vllm/adapter_commons/layers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Tuple
5
vllm/adapter_commons/models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Any, Callable, Dict, Optional, TypeVar
5
vllm/adapter_commons/request.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4
5
vllm/adapter_commons/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, Optional, Set
4
5
vllm/adapter_commons/worker_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Any, Optional, Set
5
vllm/assets/audio.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Literal
5 from urllib.parse import urljoin
vllm/assets/base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import lru_cache
4 from pathlib import Path
5 from typing import Optional
vllm/assets/image.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Literal
5
vllm/assets/video.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from functools import lru_cache
5 from typing import List, Literal
vllm/attention/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.attention.backends.abstract import (AttentionBackend,
4 AttentionMetadata,
5 AttentionMetadataBuilder,
vllm/attention/backends/abstract.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from contextlib import contextmanager
5 from dataclasses import dataclass, fields
vllm/attention/backends/blocksparse_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass, field
4 from typing import Any, Dict, List, Optional, Tuple, Type
5
vllm/attention/backends/flash_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention layer with FlashAttention."""
3 from collections import defaultdict
4 from dataclasses import dataclass
vllm/attention/backends/flashinfer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from collections import defaultdict
5 from contextlib import contextmanager
vllm/attention/backends/hpu_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 ###############################################################################
4 # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company
5 ###############################################################################
vllm/attention/backends/ipex_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """ Attention layer with torch scaled_dot_product_attention
3 and PagedAttention."""
4 from dataclasses import dataclass
vllm/attention/backends/mla/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import abstractmethod
4 from dataclasses import dataclass
5 from typing import Any, Dict, Generic, List, Optional, Tuple
vllm/attention/backends/openvino.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List, Optional, Tuple, Type
5
vllm/attention/backends/pallas.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Any, Dict, List, Optional, Tuple, Type
5
vllm/attention/backends/placeholder_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import defaultdict
4 from dataclasses import dataclass
5 from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type
vllm/attention/backends/rocm_flash_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention layer ROCm GPUs."""
3 from dataclasses import dataclass
4 from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type
vllm/attention/backends/torch_sdpa.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """ Attention layer with torch scaled_dot_product_attention
3 and PagedAttention."""
4 from dataclasses import dataclass
vllm/attention/backends/triton_mla.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import defaultdict
4 from contextlib import contextmanager
5 from dataclasses import dataclass
vllm/attention/backends/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention backend utils"""
3 from collections import defaultdict
4 from contextlib import contextmanager
vllm/attention/backends/xformers.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention layer with xFormers and PagedAttention."""
3 from dataclasses import dataclass
4 from typing import Any, Dict, List, Optional, Tuple, Type
vllm/attention/layer.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention layer."""
3 from typing import Any, Dict, List, Optional
4
vllm/attention/ops/blocksparse_attention/blocksparse_attention_kernel.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import triton
5 import triton.language as tl
vllm/attention/ops/blocksparse_attention/interface.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4
5 import torch
vllm/attention/ops/blocksparse_attention/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Helper functions for 3D sparse pattern
4 # These function are not optimized and very inefficient.
5 # Avoid calling them too frequent or use a cache mechanism.
vllm/attention/ops/hpu_paged_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 ###############################################################################
4 # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company
5 ###############################################################################
vllm/attention/ops/ipex_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Optional, Tuple
4
5 try:
vllm/attention/ops/nki_flash_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4
5 import neuronxcc.nki.isa as nisa
vllm/attention/ops/paged_attn.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import List, Optional, Tuple
5
vllm/attention/ops/prefix_prefill.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # The kernels in this file are adapted from LightLLM's context_attention_fwd:
4 # https://github.com/ModelTC/lightllm/blob/main/lightllm/models/llama/triton_kernel/context_flashattention_nopad.py
5
vllm/attention/ops/triton_decode_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/sgl-project/sglang/blob/9f635ea50de920aa507f486daafba26a5b837574/python/sglang/srt/layers/attention/triton_ops/decode_attention.py
5 # which was originally adapted from
vllm/attention/ops/triton_flash_attention.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 #!/usr/bin/env python
4 """
5 Fused Attention
vllm/attention/selector.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from contextlib import contextmanager
5 from functools import cache
vllm/beam_search.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
5
vllm/compilation/backends.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ast
4 import copy
5 import dataclasses
vllm/compilation/counter.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 import dataclasses
5 from contextlib import contextmanager
vllm/compilation/decorators.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import inspect
4 from typing import Callable, Dict, List, Optional, TypeVar, Union, overload
5 from unittest.mock import patch
vllm/compilation/fix_functionalization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import operator
4 from typing import Dict, Iterable, List, Optional, Tuple, Union
5
vllm/compilation/fusion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, Dict, List, NamedTuple, Optional, Tuple
4
5 import torch
vllm/compilation/fx_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import operator
4 from typing import Iterable, Optional
5
vllm/compilation/inductor_pass.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import hashlib
4 import inspect
5 import types
vllm/compilation/monitor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import time
5
vllm/compilation/multi_output_match.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import abc
4 import operator
5 from abc import abstractmethod
vllm/compilation/pass_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List
4
5 from torch import fx as fx
vllm/compilation/reshapes.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Union
4
5 import torch.fx
vllm/compilation/vllm_inductor_pass.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4
5 import torch
vllm/compilation/wrapper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import sys
5 from abc import abstractmethod
vllm/config.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ast
4 import copy
5 import enum
vllm/connections.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from pathlib import Path
4 from typing import Mapping, MutableMapping, Optional
5 from urllib.parse import urlparse
vllm/core/block/block_table.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from typing import List, Optional
5
vllm/core/block/common.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import deque
4 from dataclasses import dataclass
5 from typing import Deque, Dict, Iterable, List, Optional, Protocol, Tuple
vllm/core/block/cpu_gpu_block_allocator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, FrozenSet, List, Optional, Tuple
4
5 from vllm.core.block.interfaces import (Block, BlockAllocator, BlockId,
vllm/core/block/interfaces.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Dict, FrozenSet, List, Optional, Protocol, Tuple
5
vllm/core/block/naive_block.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import deque
4 from typing import Deque, FrozenSet, Iterable, List, Optional, Tuple, Union
5
vllm/core/block/prefix_caching_block.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Token blocks."""
3 import sys
4 from bisect import bisect_left
vllm/core/block/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Block manager utils."""
3 from vllm.sequence import SequenceGroup
4 from vllm.utils import (STR_NOT_IMPL_ENC_DEC_PREFIX_CACHE,
vllm/core/block_manager.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A block manager that manages token blocks."""
3 from typing import Dict, List, Optional
4 from typing import Sequence as GenericSequence
vllm/core/evictor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 import heapq
5 from abc import ABC, abstractmethod
vllm/core/interfaces.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from abc import ABC, abstractmethod
5 from typing import List
vllm/core/placeholder_block_space_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Tuple
4
5 from vllm.core.interfaces import AllocStatus, BlockSpaceManager
vllm/core/scheduler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 import os
5 import random
vllm/device_allocator/cumem.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # cumem-based pytorch pluggable allocator to implement sleep mode.
4 # other approaches tried but failed:
5 # - cuda-python package binding
vllm/distributed/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .communication_op import *
4 from .parallel_state import *
5 from .utils import *
vllm/distributed/communication_op.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, Optional, Union
4
5 import torch
vllm/distributed/device_communicators/cuda_wrapper.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This file is a pure Python wrapper for the cudart library.
3 It avoids the need to compile a separate shared library, and is
4 convenient for use when we just need to call a few functions.
vllm/distributed/device_communicators/custom_all_reduce.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ctypes
4 from contextlib import contextmanager
5 from typing import List, Optional, Union
vllm/distributed/device_communicators/custom_all_reduce_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ctypes
4 import json
5 import os
vllm/distributed/device_communicators/hpu_communicator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import torch.distributed as dist
5 from torch.distributed import ProcessGroup
vllm/distributed/device_communicators/pynccl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Union
4
5 # ===================== import region =====================
vllm/distributed/device_communicators/pynccl_wrapper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # This file is a pure Python wrapper for the NCCL library.
4 # The main purpose is to use NCCL combined with CUDA graph.
5 # Before writing this script, we tried the following approach:
vllm/distributed/device_communicators/shm_broadcast.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import pickle
5 import sys
vllm/distributed/device_communicators/tpu_communicator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 import torch
vllm/distributed/device_communicators/xpu_communicator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import torch.distributed as dist
5 from torch.distributed import ProcessGroup
vllm/distributed/kv_transfer/kv_connector/base.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 KVConnectorBase Class for Distributed KV Cache & Hidden State communication
4
vllm/distributed/kv_transfer/kv_connector/factory.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import importlib
4 from typing import TYPE_CHECKING, Callable, Dict, Type
5
vllm/distributed/kv_transfer/kv_connector/simple_connector.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Simple KV Cache Connector for Distributed Machine Learning Inference
4
vllm/distributed/kv_transfer/kv_lookup_buffer/base.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file contains a new class `KVLookupBufferBase` that allows developers to
4 think of KV cache operations as inserting new KV cache entries (`insert`)
vllm/distributed/kv_transfer/kv_lookup_buffer/simple_buffer.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Implements a distributed key-value (KV) cache transfer mechanism.
4
vllm/distributed/kv_transfer/kv_pipe/base.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file defines an interface `KVPipeBase`
4 that provides an abstraction for sending and receiving tensors, or None, via
vllm/distributed/kv_transfer/kv_pipe/mooncake_pipe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import os
5 import pickle
vllm/distributed/kv_transfer/kv_pipe/pynccl_pipe.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This module implements a PyNccl pipe for sending and receiving
4 Optional[torch.Tensor] between distributed ranks with advanced
vllm/distributed/kv_transfer/kv_transfer_agent.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A centralized entrypoint to perform distributed KV cache transfer.
3
4 This implementation is a shim wrapper on two APIs exposed by `kv_connector`:
vllm/distributed/parallel_state.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 The vLLM team.
4 # Adapted from
5 # https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/parallel_state.py
vllm/distributed/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 The vLLM team.
4 # Adapted from
5 # https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/tensor_parallel/utils.py
vllm/engine/arg_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import dataclasses
5 import json
vllm/engine/async_llm_engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import copy
5 import time
vllm/engine/async_timeout.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Workaround for https://github.com/python/cpython/issues/86296
4 #
5 # From https://github.com/aio-libs/async-timeout/blob/master/async_timeout/__init__.py
vllm/engine/llm_engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 import time
5 from collections import Counter as collectionsCounter
vllm/engine/metrics.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from typing import TYPE_CHECKING
5 from typing import Counter as CollectionsCounter
vllm/engine/metrics_types.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 These types are defined in this file to avoid importing vllm.engine.metrics
4 and therefore importing prometheus_client.
vllm/engine/multiprocessing/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import uuid
4 from dataclasses import dataclass, field
5 from enum import Enum
vllm/engine/multiprocessing/client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import copy
5 import pickle
vllm/engine/multiprocessing/engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4 import signal
5 from contextlib import contextmanager
vllm/engine/output_processor/interfaces.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Callable, List
5
vllm/engine/output_processor/multi_step.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 from typing import Callable, List, cast
5
vllm/engine/output_processor/single_step.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 from vllm.config import SchedulerConfig
vllm/engine/output_processor/stop_checker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional, Tuple
4
5 from vllm.lora.request import LoRARequest
vllm/engine/output_processor/util.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4 from typing import Sequence as GenericSequence
5 from typing import cast
vllm/engine/protocol.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from abc import ABC, abstractmethod
5 from typing import AsyncGenerator, List, Mapping, Optional
vllm/entrypoints/api_server.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 NOTE: This API server is used only for demonstrating usage of AsyncEngine
4 and simple performance benchmarks. It is not intended for production use.
vllm/entrypoints/chat_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import codecs
5 import json
vllm/entrypoints/launcher.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import signal
5 from http import HTTPStatus
vllm/entrypoints/llm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 import warnings
5 from contextlib import contextmanager
vllm/entrypoints/logger.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Union
4
5 from vllm.logger import init_logger
vllm/entrypoints/openai/api_server.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import atexit
5 import gc
vllm/entrypoints/openai/cli_args.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file contains the command line arguments for the vLLM's
4 OpenAI-compatible server. It is kept in a separate file for documentation
vllm/entrypoints/openai/logits_processors.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import lru_cache, partial
4 from typing import Dict, FrozenSet, Iterable, List, Optional, Union
5
vllm/entrypoints/openai/protocol.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py
5 import re
vllm/entrypoints/openai/reasoning_parsers/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .abs_reasoning_parsers import ReasoningParser, ReasoningParserManager
4 from .deepseek_r1_reasoning_parser import DeepSeekR1ReasoningParser
5
vllm/entrypoints/openai/reasoning_parsers/abs_reasoning_parsers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from functools import cached_property
5 from typing import Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
vllm/entrypoints/openai/reasoning_parsers/deepseek_r1_reasoning_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import re
4 from typing import Optional, Sequence, Tuple, Union
5
vllm/entrypoints/openai/run_batch.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from http import HTTPStatus
5 from io import StringIO
vllm/entrypoints/openai/serving_chat.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import json
5 import time
vllm/entrypoints/openai/serving_completion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import time
5 from typing import AsyncGenerator, AsyncIterator, Dict, List, Optional
vllm/entrypoints/openai/serving_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import base64
5 import time
vllm/entrypoints/openai/serving_engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from concurrent.futures.thread import ThreadPoolExecutor
5 from http import HTTPStatus
vllm/entrypoints/openai/serving_models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import pathlib
5 from dataclasses import dataclass
vllm/entrypoints/openai/serving_pooling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import base64
5 import time
vllm/entrypoints/openai/serving_rerank.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast
5
vllm/entrypoints/openai/serving_score.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import time
5 from typing import Any, AsyncGenerator, Dict, List, Optional, Union, cast
vllm/entrypoints/openai/serving_tokenization.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Final, List, Optional, Union
4
5 from fastapi import Request
vllm/entrypoints/openai/tool_parsers/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .abstract_tool_parser import ToolParser, ToolParserManager
4 from .granite_20b_fc_tool_parser import Granite20bFCToolParser
5 from .granite_tool_parser import GraniteToolParser
vllm/entrypoints/openai/tool_parsers/abstract_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from functools import cached_property
5 from typing import Callable, Dict, List, Optional, Sequence, Type, Union
vllm/entrypoints/openai/tool_parsers/granite_20b_fc_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 from json import JSONDecoder
vllm/entrypoints/openai/tool_parsers/granite_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from typing import Dict, Sequence, Union
5
vllm/entrypoints/openai/tool_parsers/hermes_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 from typing import Dict, List, Sequence, Union
vllm/entrypoints/openai/tool_parsers/internlm2_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from typing import Dict, Sequence, Union
5
vllm/entrypoints/openai/tool_parsers/jamba_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 from typing import Dict, List, Sequence, Union
vllm/entrypoints/openai/tool_parsers/llama_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 from json import JSONDecoder
vllm/entrypoints/openai/tool_parsers/mistral_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 import re
5 from random import choices
vllm/entrypoints/openai/tool_parsers/pythonic_tool_parser.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import ast
4 import json
5 import re
vllm/entrypoints/openai/tool_parsers/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import json
4 from json import JSONDecodeError, JSONDecoder
5 from typing import Any, List, Tuple
vllm/entrypoints/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import functools
5
vllm/envs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import tempfile
5 from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional
vllm/executor/executor_base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from abc import ABC, abstractmethod
5 from typing import (Any, Awaitable, Callable, Dict, List, Optional, Set, Tuple,
vllm/executor/mp_distributed_executor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 from typing import Any, Callable, List, Optional, Union
vllm/executor/msgspec_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from array import array
4 from typing import Any, Type
5
vllm/executor/multiproc_worker_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 import sys
vllm/executor/ray_distributed_executor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 from collections import defaultdict
vllm/executor/ray_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import time
5 from collections import defaultdict
vllm/executor/uniproc_executor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Any, Callable, Dict, List, Optional, Tuple, Union
5
vllm/forward_context.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from collections import defaultdict
5 from contextlib import contextmanager
vllm/inputs/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .data import (DecoderOnlyInputs, EncoderDecoderInputs,
4 ExplicitEncoderDecoderPrompt, ProcessorInputs, PromptType,
5 SingletonInputs, SingletonInputsAdapter, SingletonPrompt,
vllm/inputs/data.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from functools import cached_property
5 from typing import (TYPE_CHECKING, Any, Dict, Generic, Iterable, List, Literal,
vllm/inputs/parse.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Literal, Sequence, TypedDict, Union, cast, overload
4
5 from typing_extensions import TypeIs
vllm/inputs/preprocess.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from typing import List, Mapping, Optional, Union
5
vllm/inputs/registry.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 from collections import UserDict
5 from dataclasses import dataclass
vllm/logger.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Logging configuration for vLLM."""
3 import datetime
4 import json
vllm/logging_utils/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.logging_utils.formatter import NewLineFormatter
4
5 __all__ = [
vllm/logging_utils/formatter.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import logging
4
5
vllm/logits_process.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Tuple, Union
4
5 import torch
vllm/lora/fully_sharded_layers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # pylint: disable=unused-argument
4 from typing import TYPE_CHECKING, List, Optional, Tuple, Union, cast
5
vllm/lora/layers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # pylint: disable=unused-argument
4 import math
5 from dataclasses import dataclass
vllm/lora/lora.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4 from typing import Sequence as GenericSequence
5
vllm/lora/models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 import math
5 import os
vllm/lora/ops/torch_ops/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.lora.ops.torch_ops.lora_ops import bgmv_expand # noqa: F401
4 from vllm.lora.ops.torch_ops.lora_ops import (bgmv_expand_slice, bgmv_shrink,
5 sgmv_expand, sgmv_expand_slice,
vllm/lora/ops/torch_ops/lora_ops.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5
vllm/lora/ops/triton_ops/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.lora.ops.triton_ops.bgmv_expand import bgmv_expand
4 from vllm.lora.ops.triton_ops.bgmv_expand_slice import bgmv_expand_slice
5 from vllm.lora.ops.triton_ops.bgmv_shrink import bgmv_shrink
vllm/lora/ops/triton_ops/bgmv_expand.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/ops/triton_ops/bgmv_expand_slice.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/ops/triton_ops/bgmv_shrink.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/ops/triton_ops/sgmv_expand.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/ops/triton_ops/sgmv_shrink.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/ops/triton_ops/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 from typing import Dict, List, Tuple
5
vllm/lora/peft_helper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from: https://github.com/huggingface/peft/blob/main/src/peft/tuners/lora/config.py
4
5 import json
vllm/lora/punica_wrapper/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.lora.punica_wrapper.punica_base import PunicaWrapperBase
4 from vllm.lora.punica_wrapper.punica_selector import get_punica_wrapper
5
vllm/lora/punica_wrapper/punica_base.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/punica_wrapper/punica_cpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, Optional, Tuple, Union
4
5 import torch
vllm/lora/punica_wrapper/punica_gpu.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Based on:
4 Chen, L., Ye, Z., Wu, Y., Zhuo, D., Ceze, L., & Krishnamurthy, A. (2023).
vllm/lora/punica_wrapper/punica_hpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple, Union, final
4
5 import torch
vllm/lora/punica_wrapper/punica_selector.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.logger import init_logger
4 from vllm.platforms import current_platform
5 from vllm.utils import resolve_obj_by_qualname
vllm/lora/punica_wrapper/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, List, Optional, Tuple, Union
4
5 import torch
vllm/lora/request.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import warnings
4 from typing import Optional
5
vllm/lora/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import re
5 from typing import List, Optional, Set, Tuple, Type, Union
vllm/lora/worker_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from contextlib import contextmanager
4 from typing import Any, Dict, List, Literal, Optional, Set, Type, Union
5
vllm/model_executor/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.model_executor.parameter import (BasevLLMParameter,
4 PackedvLLMParameter)
5 from vllm.model_executor.sampling_metadata import (SamplingMetadata,
vllm/model_executor/custom_op.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, Type
4
5 import torch.nn as nn
vllm/model_executor/guided_decoding/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from __future__ import annotations
4
5 from typing import TYPE_CHECKING
vllm/model_executor/guided_decoding/guided_fields.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List, Optional, TypedDict, Union
5
vllm/model_executor/guided_decoding/lm_format_enforcer_decoding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import lru_cache
4 from json import loads as json_loads
5 from typing import Optional, Union
vllm/model_executor/guided_decoding/outlines_decoding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import concurrent.futures
5 import os
vllm/model_executor/guided_decoding/outlines_logits_processors.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024- the Outlines developers
4 # This file is adapted from
5 # https://github.com/outlines-dev/outlines/blob/main/outlines/serve/vllm.py
vllm/model_executor/guided_decoding/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import re
4
5
vllm/model_executor/guided_decoding/xgrammar_decoding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # noqa: UP007
4 from __future__ import annotations
5
vllm/model_executor/layers/activation.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Custom activation functions."""
3 import math
4 from typing import Optional
vllm/model_executor/layers/fused_moe/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from contextlib import contextmanager
4 from typing import Any, Dict, Optional
5
vllm/model_executor/layers/fused_moe/fused_marlin_moe.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Fused MoE utilities for GPTQ."""
3 import functools
4 from typing import Optional
vllm/model_executor/layers/fused_moe/fused_moe.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Fused MoE kernel."""
3 import functools
4 import json
vllm/model_executor/layers/fused_moe/layer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import abstractmethod
4 from enum import Enum
5 from typing import Callable, List, Optional, Tuple
vllm/model_executor/layers/fused_moe/moe_pallas.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import torch.nn.functional as F
5 from torch_xla.experimental.custom_kernel import _histogram
vllm/model_executor/layers/fused_moe/moe_torch_iterative.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import torch.nn.functional as F
5
vllm/model_executor/layers/layernorm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Custom normalization layers."""
3 from typing import Optional, Tuple, Union
4
vllm/model_executor/layers/linear.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from abc import abstractmethod
5 from typing import Dict, List, Optional, Tuple
vllm/model_executor/layers/logits_processor.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A layer that compute logits from hidden_stats."""
3 import inspect
4 from typing import Optional
vllm/model_executor/layers/mamba/mamba_mixer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 from torch import nn
5 from torch.nn.parameter import Parameter
vllm/model_executor/layers/mamba/ops/causal_conv1d.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright (c) 2024, Tri Dao.
4 # Adapted from https://github.com/Dao-AILab/causal-conv1d/blob/main/causal_conv1d/causal_conv1d_interface.py
5
vllm/model_executor/layers/mamba/ops/mamba_ssm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright (c) 2024, Tri Dao, Albert Gu.
4 # Adapted from https://github.com/state-spaces/mamba/blob/main/mamba_ssm/ops/triton/selective_state_update.py
5
vllm/model_executor/layers/pooler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from enum import IntEnum
4 from typing import List, Optional, Union
5
vllm/model_executor/layers/quantization/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Type
4
5 from vllm.model_executor.layers.quantization.base_config import (
vllm/model_executor/layers/quantization/aqlm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Supports AQLM compression, see https://github.com/Vahe1994/AQLM
4 # and https://arxiv.org/pdf/2401.06118.pdf
5
vllm/model_executor/layers/quantization/awq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/awq_marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/awq_triton.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import triton
5 import triton.language as tl
vllm/model_executor/layers/quantization/base_config.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import inspect
4 from abc import ABC, abstractmethod
5 from typing import Any, Dict, List, Optional, Type
vllm/model_executor/layers/quantization/bitsandbytes.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from contextlib import suppress
4 from typing import Any, Dict, List, Literal, Optional, Tuple, cast
5
vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from enum import Enum
5 from typing import Callable, List, Optional
vllm/model_executor/layers/quantization/compressed_tensors/schemes/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .compressed_tensors_scheme import CompressedTensorsScheme
4 from .compressed_tensors_w4a16_24 import (W4A16SPARSE24_SUPPORTED_BITS,
5 CompressedTensorsW4A16Sparse24)
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_24.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_scheme.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Optional
5
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a16_24.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a16_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional, Set
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_wNa16.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional, Set
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/triton_scaled_mm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Type
4
5 import torch
vllm/model_executor/layers/quantization/compressed_tensors/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import re
4 from typing import Iterable, Optional
5
vllm/model_executor/layers/quantization/deepspeedfp.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/experts_int8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/fbgemm_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/gguf.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import gguf
vllm/model_executor/layers/quantization/gptq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from enum import Enum
5 from fractions import Fraction
vllm/model_executor/layers/quantization/gptq_marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, List, Optional, Set, Union
4
5 import torch
vllm/model_executor/layers/quantization/gptq_marlin_24.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/hqq_marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/ipex_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/kernels/mixed_precision/MPLinearKernel.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from dataclasses import dataclass
5 from typing import Callable, Optional, Tuple
vllm/model_executor/layers/quantization/kernels/mixed_precision/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Type
4
5 import vllm.envs as envs
vllm/model_executor/layers/quantization/kernels/mixed_precision/exllama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/kernels/mixed_precision/machete.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import partial
4 from typing import Optional, Tuple
5
vllm/model_executor/layers/quantization/kernels/mixed_precision/marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/kernels/scaled_mm/ScaledMMLinearKernel.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from dataclasses import dataclass
5 from typing import Optional, Tuple
vllm/model_executor/layers/quantization/kernels/scaled_mm/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Dict, List, Optional, Type
5
vllm/model_executor/layers/quantization/kernels/scaled_mm/cutlass.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/kernels/scaled_mm/triton.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/kernels/scaled_mm/xla.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import warnings
4 from typing import Optional, Tuple
5
vllm/model_executor/layers/quantization/kv_cache.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4
5 from vllm.logger import init_logger
vllm/model_executor/layers/quantization/marlin.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/modelopt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/moe_wna16.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/neuron_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from importlib.util import find_spec
5 from typing import Any, Dict, List, Optional
vllm/model_executor/layers/quantization/qqq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/quark/quark.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import fnmatch
4 import re
5 from typing import Any, Dict, List, Optional, cast
vllm/model_executor/layers/quantization/quark/quark_moe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Callable, Dict, Optional
4
5 import torch
vllm/model_executor/layers/quantization/quark/schemes/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .quark_scheme import QuarkScheme
4 from .quark_w8a8_fp8 import QuarkW8A8Fp8
5 from .quark_w8a8_int8 import QuarkW8A8Int8
vllm/model_executor/layers/quantization/quark/schemes/quark_scheme.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Optional
5
vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional
4
5 import torch
vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_int8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Callable, List, Optional, Set
4
5 import torch
vllm/model_executor/layers/quantization/quark/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import re
4 from typing import Any, Iterable, Optional
5
vllm/model_executor/layers/quantization/schema.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 This file contains the Pydantic schemas for various quantization-related
4 parameters. When a relevant quantization technique is specified, these
vllm/model_executor/layers/quantization/tpu_int8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/utils/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .layer_utils import replace_parameter, update_tensor_inplace
4
5 __all__ = ['update_tensor_inplace', 'replace_parameter']
vllm/model_executor/layers/quantization/utils/fp8_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from https://github.com/sgl-project/sglang/pull/2575
4 import functools
5 import json
vllm/model_executor/layers/quantization/utils/layer_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Union
4
5 import torch
vllm/model_executor/layers/quantization/utils/machete_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import torch
vllm/model_executor/layers/quantization/utils/marlin_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 import numpy
vllm/model_executor/layers/quantization/utils/marlin_utils_fp8.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional
4
5 import torch
vllm/model_executor/layers/quantization/utils/marlin_utils_test.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utility functions used for tests and benchmarks"""
3
4 from typing import List, Optional
vllm/model_executor/layers/quantization/utils/marlin_utils_test_24.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utility functions used for tests and benchmarks"""
3
4 import random
vllm/model_executor/layers/quantization/utils/marlin_utils_test_qqq.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import numpy
vllm/model_executor/layers/quantization/utils/quant_utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """This file is used for /tests and /benchmarks"""
3 from typing import List, Optional, Tuple
4
vllm/model_executor/layers/quantization/utils/w8a8_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple, Union
4
5 import torch
vllm/model_executor/layers/rejection_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import cached_property
4 from importlib.util import find_spec
5 from typing import Dict, Optional, Tuple
vllm/model_executor/layers/resampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py
vllm/model_executor/layers/rotary_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.33.2/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/layers/sampler.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A layer that samples the next tokens from the model's outputs."""
3 import itertools
4 import warnings
vllm/model_executor/layers/spec_decode_base_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import abstractmethod
4 from typing import Dict, Optional, Union
5
vllm/model_executor/layers/typical_acceptance_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import torch
4 import torch.jit
5
vllm/model_executor/layers/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utility methods for model layers."""
3 from typing import Tuple
4
vllm/model_executor/layers/vocab_parallel_embedding.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import List, Optional, Sequence, Tuple
5
vllm/model_executor/model_loader/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from torch import nn
4
5 from vllm.config import VllmConfig
vllm/model_executor/model_loader/loader.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa: SIM117
4 import collections
5 import copy
vllm/model_executor/model_loader/neuron.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utilities for selecting and loading neuron models."""
3 import copy
4 import importlib
vllm/model_executor/model_loader/openvino.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa: SIM117
4 from pathlib import Path
5 from typing import List, Optional, Tuple
vllm/model_executor/model_loader/tensorizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import dataclasses
5 import io
vllm/model_executor/model_loader/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utilities for selecting and loading models."""
3 import contextlib
4 from dataclasses import dataclass, field
vllm/model_executor/model_loader/weight_utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utilities for downloading and initializing model weights."""
3 import fnmatch
4 import glob
vllm/model_executor/models/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .interfaces import (HasInnerState, SupportsLoRA, SupportsMultiModal,
4 SupportsPP, has_inner_state, supports_lora,
5 supports_multimodal, supports_pp)
vllm/model_executor/models/adapters.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections.abc import Iterable
4 from typing import TYPE_CHECKING, Any, Optional, TypeVar
5
vllm/model_executor/models/arctic.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Inference-only Snowflake Arctic model."""
3 from typing import Iterable, List, Optional, Set, Tuple, Union
4
vllm/model_executor/models/aria.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import (Iterable, List, Mapping, Optional, Set, Tuple, TypedDict,
4 Union)
5
vllm/model_executor/models/baichuan.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
4 #
5 # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
vllm/model_executor/models/bart.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Derived from BART implementation posted on HuggingFace; license below:
4 #
5 # coding=utf-8
vllm/model_executor/models/bert.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Optional, Set, Tuple
4
5 import torch
vllm/model_executor/models/blip.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Minimal implementation of BlipVisionModel intended to be only used
3 within a vision language model."""
4 from typing import Iterable, Optional, Set, Tuple, Union
vllm/model_executor/models/blip2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import cached_property
4 from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple,
5 TypedDict, Union)
vllm/model_executor/models/bloom.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/bloom/modeling_bloom.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/chameleon.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import cached_property
4 from typing import (Any, Dict, Iterable, List, Literal, Mapping, Optional, Set,
5 Tuple, TypedDict, Union)
vllm/model_executor/models/chatglm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/THUDM/CogAgent
5 """Inference-only CogAgent model compatible with THUDM weights."""
vllm/model_executor/models/clip.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Minimal implementation of CLIPVisionModel intended to be only used
3 within a vision language model."""
4 from typing import Iterable, List, Optional, Set, Tuple, Union
vllm/model_executor/models/commandr.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 Cohere and the HuggingFace Inc. team. All rights reserved.
4 #
5 # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
vllm/model_executor/models/dbrx.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Optional, Set, Tuple, Union
4
5 import torch
vllm/model_executor/models/decilm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 DeciAI Research Team. All rights reserved.
vllm/model_executor/models/deepseek.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/deepseek_v2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/deepseek_v3.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/deepseek_vl2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py
4 """Inference-only Deepseek-VL2 model compatible with HuggingFace weights."""
5 import math
vllm/model_executor/models/eagle.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Optional, Tuple
4
5 import torch
vllm/model_executor/models/exaone.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct/blob/main/modeling_exaone.py
5 # Copyright 2024 The LG U+ CTO AI Tech Lab.
vllm/model_executor/models/fairseq2_llama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 The vLLM team.
4 # Copyright 2024 Meta Platforms, Inc. and affiliates. All rights reserved.
5 #
vllm/model_executor/models/falcon.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/a5cc30d72ae2dc19af534e4b35c986cc28db1275/src/transformers/models/falcon/modeling_falcon.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/florence2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from typing import Iterable, List, Optional, Set, Tuple
5
vllm/model_executor/models/fuyu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/fuyu/modeling_fuyu.py
4 # Copyright 2023 The vLLM team.
5 # Copyright 2023 HuggingFace Inc. team. All rights reserved.
vllm/model_executor/models/gemma.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 The vLLM team.
4 # Copyright (c) Google Inc.
5 #
vllm/model_executor/models/gemma2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 The vLLM team.
4 # Copyright 2024 Google Inc. HuggingFace Inc. team. All rights reserved.
5 #
vllm/model_executor/models/glm.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Inference-only HF format GLM-4 model compatible with THUDM weights."""
3 from vllm.config import VllmConfig
4 from vllm.model_executor.models.llama import LlamaForCausalLM
vllm/model_executor/models/glm4_vision_encoder.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/THUDM/GLM-4
5 """Inference-only GLM-4v model visual encoder compatible with THUDM weights."""
vllm/model_executor/models/gpt2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/gpt_bigcode.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt2/modeling_gpt2.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/gpt_j.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gptj/modeling_gptj.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/gpt_neox.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gpt_neox/modeling_gpt_neox.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/granite.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/granitemoe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/gritlm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from array import array
4 from typing import List, Optional, Union
5
vllm/model_executor/models/h2ovl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/modeling_h2ovl_chat.py
4 # https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/image_process.py
5 # --------------------------------------------------------
vllm/model_executor/models/idefics2_vision_model.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://github.com/huggingface/transformers/blob/v4.43.2/src/transformers/models/idefics2/modeling_idefics2.py
4 # Copyright 2024 The vLLM team.
5 # Copyright 2024 the HuggingFace Inc. team. All rights reserved.
vllm/model_executor/models/idefics3.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 the HuggingFace Inc. team. All rights reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
vllm/model_executor/models/interfaces.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import (TYPE_CHECKING, ClassVar, Dict, List, Literal, Optional,
4 Protocol, Type, Union, overload, runtime_checkable)
5
vllm/model_executor/models/interfaces_base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import (TYPE_CHECKING, List, Optional, Protocol, Type, Union,
4 overload, runtime_checkable)
5
vllm/model_executor/models/intern_vit.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://huggingface.co/OpenGVLab/InternVL2-4B/blob/main/modeling_intern_vit.py
4 # --------------------------------------------------------
5 # InternVL
vllm/model_executor/models/internlm2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import partial
4 from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Type, Union
5
vllm/model_executor/models/internlm2_ve.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple, Union
4
5 import torch
vllm/model_executor/models/internvl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://huggingface.co/OpenGVLab/InternVL2-4B/blob/main/modeling_internvl_chat.py
4 # --------------------------------------------------------
5 # InternVL
vllm/model_executor/models/jais.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/inceptionai/jais-30b-chat-v3/blob/main/modeling_jais.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/jamba.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Inference-only Jamba model."""
3 from typing import Iterable, List, Optional, Set, Tuple
4
vllm/model_executor/models/llama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/llava.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import abstractmethod
4 from functools import cached_property
5 from typing import (Final, Iterable, List, Literal, Mapping, Optional,
vllm/model_executor/models/llava_next.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import abstractmethod
4 from functools import cached_property
5 from typing import (Final, Iterable, List, Literal, Mapping, Optional,
vllm/model_executor/models/llava_next_video.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from functools import cached_property
5 from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple,
vllm/model_executor/models/llava_onevision.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from functools import cached_property
5 from typing import (Final, Iterable, List, Literal, Mapping, Optional,
vllm/model_executor/models/mamba.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """PyTorch MAMBA model."""
3 from typing import Iterable, List, Optional, Set, Tuple
4
vllm/model_executor/models/mamba_cache.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List
5
vllm/model_executor/models/medusa.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Iterable, List, Optional, Set, Tuple
4
5 import torch
vllm/model_executor/models/minicpm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/minicpm3.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2024 The ModelBest team.
vllm/model_executor/models/minicpmo.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/minicpmv.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/mixtral.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/mixtral_quant.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/mllama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 the HuggingFace Inc. team. All rights reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
vllm/model_executor/models/mlp_speculator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from typing import Iterable, List, Set, Tuple
5
vllm/model_executor/models/module_mapping.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/modelscope/ms-swift/blob/v2.4.2/swift/utils/module_mapping.py
5
vllm/model_executor/models/molmo.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 import re
5 from array import array
vllm/model_executor/models/mpt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from https://huggingface.co/mosaicml/mpt-7b/tree/main
4 import math
5 from typing import Iterable, List, Optional, Set, Tuple, Union
vllm/model_executor/models/nemotron.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/nvlm_d.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://huggingface.co/nvidia/NVLM-D-72B/blob/main/modeling_nvlm_d.py
4 # --------------------------------------------------------
5 # NVLM-D
vllm/model_executor/models/olmo.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.40.1/src/transformers/models/olmo/modeling_olmo.py
5 # Copyright 2024 The vLLM team.
vllm/model_executor/models/olmo2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo2/modeling_olmo2.py
5 # Copyright 2024 The vLLM team.
vllm/model_executor/models/olmoe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
vllm/model_executor/models/opt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/opt/modeling_opt.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/orion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/OrionStarAI/Orion-14B-Base/blob/main/modeling_orion.py
5 # Copyright (c) OrionStar Inc.
vllm/model_executor/models/paligemma.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import (Iterable, List, Literal, Mapping, Optional, Set, Tuple,
4 TypedDict, Union)
5
vllm/model_executor/models/persimmon.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://github.com/huggingface/transformers/blob/v4.39.3/src/transformers/models/persimmon/modeling_persimmon.py
4 # Copyright 2023 The vLLM team.
5 # Copyright 2023 EleutherAI and the HuggingFace Inc. team. All rights reserved.
vllm/model_executor/models/phi.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/microsoft/phi-1_5/blob/main/modeling_phi.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/phi3.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from llama.py
4 """Inference-only Phi3 model code inherit from Llama.py"""
5
vllm/model_executor/models/phi3_small.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from typing import Iterable, List, Optional, Set, Tuple, Union
5
vllm/model_executor/models/phi3v.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 The vLLM team.
4 # Copyright 2024 Microsoft and the HuggingFace Inc. team. All rights reserved.
5 #
vllm/model_executor/models/phimoe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/pixtral.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from dataclasses import dataclass, fields
5 from functools import cached_property
vllm/model_executor/models/qwen.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/Qwen/Qwen-7B/blob/main/modeling_qwen.py
5 # Copyright (c) Alibaba Cloud.
vllm/model_executor/models/qwen2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2/modeling_qwen2.py
5 # Copyright 2024 The Qwen team.
vllm/model_executor/models/qwen2_audio.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 The Qwen team.
4 # Copyright 2023 The vLLM team.
5 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
vllm/model_executor/models/qwen2_moe.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/qwen2_moe/modeling_qwen2_moe.py
5 # Copyright 2024 The Qwen team.
vllm/model_executor/models/qwen2_rm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/Qwen/Qwen2.5-Math-RM-72B/blob/main/modeling_qwen2_rm.py
5 # Copyright 2024 The Qwen team.
vllm/model_executor/models/qwen2_vl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/19e6e80e10118f855137b90740936c0b11ac397f/src/transformers/models/qwen2_vl/modeling_qwen2_vl.py
5 # Copyright 2024 The Qwen team.
vllm/model_executor/models/registry.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """
3 Whenever you add an architecture to this page, please also update
4 `tests/models/registry.py` with example HuggingFace models for it.
vllm/model_executor/models/roberta.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from typing import Iterable, List, Optional, Tuple
5
vllm/model_executor/models/siglip.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Implementation of SiglipVisionModel intended to be only used
3 within a vision language model."""
4
vllm/model_executor/models/solar.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py
5 # Copyright 2023 The vLLM team.
vllm/model_executor/models/stablelm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 Stability AI, EleutherAI, and The HuggingFace Inc. team.
4 # All rights reserved.
5 #
vllm/model_executor/models/starcoder2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 BigCode and the HuggingFace Inc. team. All rights reserved.
4 #
5 # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
vllm/model_executor/models/telechat2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 The vLLM team.
4 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
5 #
vllm/model_executor/models/ultravox.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from https://github.com/fixie-ai/ultravox/blob/ecd58c4041030bae2ad15aa6bcf04ab43199ea02/ultravox/model/ultravox_model.py
4 """PyTorch Ultravox model."""
5 import math
vllm/model_executor/models/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import itertools
4 from dataclasses import dataclass, field
5 from typing import (Callable, Dict, Iterable, List, Literal, Mapping, Optional,
vllm/model_executor/models/vision.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import Final, Generic, Optional, Protocol, TypeVar, Union
5
vllm/model_executor/models/whisper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import math
4 from typing import (Iterable, List, Mapping, Optional, Set, Tuple, TypedDict,
5 Union)
vllm/model_executor/parameter.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from fractions import Fraction
4 from typing import Callable, Optional, Union
5
vllm/model_executor/pooling_metadata.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Any, Dict, List, Tuple
5
vllm/model_executor/sampling_metadata.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from array import array
4 from dataclasses import dataclass
5 from typing import Dict, List, Optional, Tuple
vllm/model_executor/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Utils for model executor."""
3 from typing import Any, Dict, Optional
4
vllm/multimodal/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .base import MultiModalPlaceholderMap, MultiModalPlugin
4 from .hasher import MultiModalHashDict, MultiModalHasher
5 from .inputs import (BatchedTensorInputs, ModalityData, MultiModalDataBuiltins,
vllm/multimodal/audio.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4 from io import BytesIO
5 from pathlib import Path
vllm/multimodal/base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from collections import defaultdict
5 from pathlib import Path
vllm/multimodal/hasher.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4 from typing import TYPE_CHECKING, Iterable, Mapping, Optional
5
vllm/multimodal/image.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4 from functools import lru_cache
5 from io import BytesIO
vllm/multimodal/inputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from collections import UserDict, defaultdict
5 from collections.abc import Mapping, Sequence
vllm/multimodal/parse.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from collections import UserDict
5 from collections.abc import Callable, Iterator, Mapping, Sequence
vllm/multimodal/processing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import re
4 from abc import ABC, abstractmethod
5 from collections import defaultdict
vllm/multimodal/profiling.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from collections.abc import Mapping
5 from dataclasses import dataclass, field
vllm/multimodal/registry.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 from collections import UserDict
5 from dataclasses import dataclass
vllm/multimodal/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import lru_cache
4 from itertools import groupby
5 from pathlib import Path
vllm/multimodal/video.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import base64
4 from functools import lru_cache, partial
5 from io import BytesIO
vllm/outputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from dataclasses import dataclass
5 from typing import Dict, Generic, List, MutableSequence, Optional
vllm/platforms/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import logging
4 import traceback
5 from itertools import chain
vllm/platforms/cpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import TYPE_CHECKING, Optional
5
vllm/platforms/cuda.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Code inside this file can safely assume cuda platform, e.g. importing
3 pynvml. However, it should not initialize cuda context.
4 """
vllm/platforms/hpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import TYPE_CHECKING, Optional
5
vllm/platforms/interface.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 import platform
5 import random
vllm/platforms/neuron.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, Optional
4
5 from vllm.logger import init_logger
vllm/platforms/openvino.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, Optional
4
5 import torch
vllm/platforms/rocm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from functools import lru_cache
5 from typing import TYPE_CHECKING, Dict, List, Optional
vllm/platforms/tpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, Optional
4
5 import torch
vllm/platforms/xpu.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, Optional
4
5 import torch
vllm/plugins/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import logging
4 import os
5 from typing import Callable, Dict
vllm/pooling_params.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Optional
4
5 import msgspec
vllm/profiler/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .layerwise_profile import layerwise_profile
4
5 __all__ = [
vllm/profiler/layerwise_profile.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 from collections import defaultdict
5 from dataclasses import asdict, dataclass, field
vllm/profiler/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Callable, Dict, List, Type, Union
5
vllm/prompt_adapter/layers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Optional
5
vllm/prompt_adapter/models.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import logging
4 import math
5 from typing import Any, Callable, Dict, List, Optional, Type
vllm/prompt_adapter/request.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import msgspec
4
5 from vllm.adapter_commons.request import AdapterRequest
vllm/prompt_adapter/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # code borrowed from: https://github.com/huggingface/peft/blob/v0.12.0/src/peft/utils/save_and_load.py#L420
4
5 import os
vllm/prompt_adapter/worker_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import logging
4 from typing import Any, Optional, Set, Type
5
vllm/sampling_params.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Sampling parameters for text generation."""
3 import copy
4 from dataclasses import dataclass
vllm/scalar_type.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import functools
4 import struct
5 from dataclasses import dataclass
vllm/scripts.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # The CLI entrypoint to vLLM.
4 import argparse
5 import os
vllm/sequence.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Sequence and its related classes."""
3 import copy
4 import enum
vllm/spec_decode/batch_expansion.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from array import array
4 from itertools import chain, count
5 from typing import Iterator, List, Optional, Tuple
vllm/spec_decode/draft_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4
5 import torch
vllm/spec_decode/interfaces.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from dataclasses import dataclass
5 from typing import List, Optional, Set, Union
vllm/spec_decode/medusa_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import weakref
4 from typing import List, Optional, Set, Tuple
5
vllm/spec_decode/metrics.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from typing import Callable, Optional, Union
5
vllm/spec_decode/mlp_speculator_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Set, Tuple
4
5 import torch
vllm/spec_decode/mqa_scorer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.sequence import (ExecuteModelRequest, SequenceData,
4 SequenceGroupMetadata, get_all_seq_ids)
5 from vllm.spec_decode.interfaces import (SpeculativeProposals,
vllm/spec_decode/multi_step_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 import weakref
5 from typing import Dict, List, Set, Tuple
vllm/spec_decode/ngram_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import weakref
4 from typing import List, Optional, Set, Tuple
5
vllm/spec_decode/proposer_worker_base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import List, Optional, Set, Tuple
5
vllm/spec_decode/smaller_tp_proposer_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Set, Tuple
4
5 import torch
vllm/spec_decode/spec_decode_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import copy
4 from collections import defaultdict
5 from functools import cached_property
vllm/spec_decode/target_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4
5 from vllm.sequence import SequenceGroupMetadata
vllm/spec_decode/top1_proposer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Set, Tuple
4
5 import torch
vllm/spec_decode/util.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from contextlib import contextmanager
5 from typing import Dict, List, Optional, Sequence, Tuple
vllm/tracing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Mapping, Optional
5
vllm/transformers_utils/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.envs import VLLM_USE_MODELSCOPE
4
5 if VLLM_USE_MODELSCOPE:
vllm/transformers_utils/config.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 import json
5 import os
vllm/transformers_utils/configs/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.transformers_utils.configs.chatglm import ChatGLMConfig
4 from vllm.transformers_utils.configs.cohere2 import Cohere2Config
5 from vllm.transformers_utils.configs.dbrx import DbrxConfig
vllm/transformers_utils/configs/arctic.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # yapf: disable
4 # ruff: noqa: E501
5 # coding=utf-8
vllm/transformers_utils/configs/chatglm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://github.com/THUDM/ChatGLM2-6B
5 from transformers import PretrainedConfig
vllm/transformers_utils/configs/cohere2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # ruff: noqa
4
5 # Adapted from
vllm/transformers_utils/configs/dbrx.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # yapf: disable
4 # ruff: noqa: E501
5 # coding=utf-8
vllm/transformers_utils/configs/deepseek_vl2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://github.com/deepseek-ai/DeepSeek-VL2/blob/faf18023f24b962b32d9f0a2d89e402a8d383a78/deepseek_vl2/models/modeling_deepseek_vl_v2.py#L115-L268
4 from typing import Tuple
5
vllm/transformers_utils/configs/eagle.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Optional, Union
5
vllm/transformers_utils/configs/exaone.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copied from
4 # https://huggingface.co/LGAI-EXAONE/EXAONE-3.0-7.8B-Instruct/blob/main/configuration_exaone.py
5 # Copyright 2021 The LG AI Research EXAONE Lab. All rights reserved.
vllm/transformers_utils/configs/falcon.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/tiiuae/falcon-7b/blob/main/configuration_RW.py
5 # Copyright 2023 The vLLM team.
vllm/transformers_utils/configs/h2ovl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/h2oai/h2ovl-mississippi-2b/blob/main/configuration_h2ovl_chat.py
5 # --------------------------------------------------------
vllm/transformers_utils/configs/internvl.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/OpenGVLab/InternVL2-1B/blob/main/configuration_internvl_chat.py
5 # --------------------------------------------------------
vllm/transformers_utils/configs/jais.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2023 The OpenAI Team Authors and HuggingFace Inc. team.
4 # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
5 # Copyright 2023 Cerebras Systems.
vllm/transformers_utils/configs/medusa.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import Optional, Union
5
vllm/transformers_utils/configs/mllama.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from transformers.models.mllama import configuration_mllama as mllama_hf_config
4
5
vllm/transformers_utils/configs/mlp_speculator.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4
5 from transformers import PretrainedConfig
vllm/transformers_utils/configs/mpt.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copied from
4 # https://huggingface.co/mosaicml/mpt-7b/blob/main/configuration_mpt.py
5 """A HuggingFace-style model configuration."""
vllm/transformers_utils/configs/nemotron.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2024 HuggingFace Inc. team. All rights reserved.
4 # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
5 #
vllm/transformers_utils/configs/nvlm_d.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from
4 # https://huggingface.co/nvidia/NVLM-D-72B/blob/main/configuration_nvlm_d.py
5 # --------------------------------------------------------
vllm/transformers_utils/configs/olmo2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # yapf: disable
4 # ruff: noqa: E501
5 # coding=utf-8
vllm/transformers_utils/configs/solar.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
4 #
5 # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
vllm/transformers_utils/configs/telechat2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # adapted from https://www.modelscope.cn/models/TeleAI/TeleChat2-3B/resolve/master/configuration_telechat2.py
4 """ Telechat configuration compatible with LlamaConfig. """
5
vllm/transformers_utils/configs/ultravox.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Adapted from https://github.com/fixie-ai/ultravox/blob/ecd58c4041030bae2ad15aa6bcf04ab43199ea02/ultravox/model/ultravox_config.py
4 from typing import Any, Dict, Optional
5
vllm/transformers_utils/detokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Optional
4
5 from vllm.sequence import (VLLM_INVALID_TOKEN_ID, Logprob, SamplingParams,
vllm/transformers_utils/detokenizer_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional, Tuple
4
5 from .tokenizer import AnyTokenizer
vllm/transformers_utils/processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from functools import lru_cache
4 from typing import Any, cast
5
vllm/transformers_utils/processors/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.transformers_utils.processors.deepseek_vl2 import (
4 DeepseekVLV2Processor)
5
vllm/transformers_utils/processors/deepseek_vl2.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # yapf: disable
4 # ruff: noqa: E501
5 # coding=utf-8
vllm/transformers_utils/s3_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import fnmatch
4 import os
5 import shutil
vllm/transformers_utils/tokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import contextlib
4 import os
5 import warnings
vllm/transformers_utils/tokenizer_group/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Optional, Type
4
5 from vllm.config import (LoRAConfig, ModelConfig, ParallelConfig,
vllm/transformers_utils/tokenizer_group/base_tokenizer_group.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from abc import ABC, abstractmethod
4 from typing import List, Optional
5
vllm/transformers_utils/tokenizer_group/ray_tokenizer_group.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 from typing import List, Optional
vllm/transformers_utils/tokenizer_group/tokenizer_group.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Optional
4
5 from vllm.config import TokenizerPoolConfig
vllm/transformers_utils/tokenizers/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from .mistral import MistralTokenizer, maybe_serialize_tool_calls
4
5 __all__ = ["MistralTokenizer", "maybe_serialize_tool_calls"]
vllm/transformers_utils/tokenizers/mistral.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import re
5 from dataclasses import dataclass
vllm/transformers_utils/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from os import PathLike
4 from pathlib import Path
5 from typing import Union
vllm/triton_utils/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from vllm.triton_utils.importing import HAS_TRITON
4
5 __all__ = ["HAS_TRITON"]
vllm/triton_utils/custom_cache_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4
5 from triton.runtime.cache import (FileCacheManager, default_cache_dir,
vllm/triton_utils/importing.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from importlib.util import find_spec
4
5 from vllm.logger import init_logger
vllm/usage/usage_lib.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import datetime
4 import json
5 import logging
vllm/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import argparse
4 import asyncio
5 import concurrent
vllm/v1/attention/backends/flash_attn.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """Attention layer with FlashAttention."""
3 from dataclasses import dataclass
4 from typing import Any, Dict, List, Optional, Tuple, Type
vllm/v1/core/encoder_cache_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import TYPE_CHECKING, Dict, List, Set, Tuple
4
5 from vllm.logger import init_logger
vllm/v1/core/kv_cache_manager.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import defaultdict
4 from typing import DefaultDict, Dict, Iterable, List, Optional, Tuple
5
vllm/v1/core/kv_cache_utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """KV-Cache Utilities."""
3 from collections.abc import Sequence
4 from dataclasses import dataclass
vllm/v1/core/scheduler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import deque
4 from dataclasses import dataclass
5 from typing import (TYPE_CHECKING, Deque, Dict, Iterable, List, Optional, Set,
vllm/v1/engine/__init__.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from dataclasses import dataclass
5 from typing import TYPE_CHECKING, List, Optional, Union
vllm/v1/engine/async_llm.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 from typing import AsyncGenerator, List, Mapping, Optional, Type, Union
vllm/v1/engine/core.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4 import queue
5 import signal
vllm/v1/engine/core_client.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 import os
5 import signal
vllm/v1/engine/detokenizer.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import List, Optional, Union
5
vllm/v1/engine/llm_engine.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict, List, Mapping, Optional, Type, Union
4
5 from typing_extensions import TypeVar
vllm/v1/engine/mm_input_mapper.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Any, Dict, List, Optional
4
5 from vllm.config import ModelConfig
vllm/v1/engine/output_processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import asyncio
4 from dataclasses import dataclass
5 from typing import Dict, List, Optional
vllm/v1/engine/processor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from typing import Mapping, Optional, Union
5
vllm/v1/executor/abstract.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Type
4
5 from vllm.config import VllmConfig
vllm/v1/executor/multiproc_executor.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 import pickle
5 import signal
vllm/v1/kv_cache_interface.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List
5
vllm/v1/metrics/loggers.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from abc import ABC, abstractmethod
5 from typing import List
vllm/v1/metrics/stats.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from dataclasses import dataclass
5 from typing import TYPE_CHECKING, List
vllm/v1/outputs.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List, Optional
5
vllm/v1/request.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 from typing import TYPE_CHECKING, List, Optional, Union
5
vllm/v1/sample/metadata.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from dataclasses import dataclass
4 from typing import Dict, List, Optional, Set
5
vllm/v1/sample/ops/penalties.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List, Set, Tuple
4
5 import torch
vllm/v1/sample/ops/topk_topp_sampler.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import Dict
4
5 import torch
vllm/v1/sample/sampler.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A layer that samples the next tokens from the model's outputs."""
3 from typing import Tuple
4
vllm/v1/serial_utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import pickle
4
5
vllm/v1/stats/common.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import time
4 from dataclasses import dataclass
5 from dataclasses import field as dataclass_field
vllm/v1/utils.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import multiprocessing
4 import os
5 import weakref
vllm/v1/worker/block_table.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from typing import List
4
5 import numpy as np
vllm/v1/worker/gpu_input_batch.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 # Datastructures defining an input batch
4
5 from dataclasses import dataclass
vllm/v1/worker/gpu_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import gc
4 import time
5 from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast
vllm/v1/worker/gpu_worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A GPU worker class."""
3 import gc
4 import os
vllm/version.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 try:
4 from ._version import __version__, __version_tuple__
5 except Exception as e:
vllm/worker/cache_engine.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """CacheEngine class for managing the KV cache."""
3 from typing import List
4
vllm/worker/cpu_enc_dec_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, cast
5
vllm/worker/cpu_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import weakref
5 from collections import defaultdict
vllm/worker/cpu_pooling_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Any, Dict, List, Optional, Tuple, Type, Union
5
vllm/worker/cpu_worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A CPU worker class."""
3 from typing import Dict, List, Optional, Set, Tuple, Type
4
vllm/worker/enc_dec_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import itertools
5 from typing import Any, Dict, List, Optional, Tuple, Type, cast
vllm/worker/hpu_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 ###############################################################################
4 # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company
5 ###############################################################################
vllm/worker/hpu_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 ###############################################################################
4 # Copyright (C) 2024 Habana Labs, Ltd. an Intel Company
5 ###############################################################################
vllm/worker/model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import gc
5 import inspect
vllm/worker/model_runner_base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import pickle
5 from abc import ABC, abstractmethod
vllm/worker/multi_step_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import functools
5 from dataclasses import dataclass, field
vllm/worker/multi_step_tpu_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Dict, Optional, Tuple
5
vllm/worker/multi_step_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from dataclasses import dataclass
5 from typing import Dict, List, Optional, Tuple
vllm/worker/neuron_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from dataclasses import dataclass
5 from importlib.util import find_spec
vllm/worker/neuron_worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A Neuron worker class."""
3 from typing import List, Optional, Tuple
4
vllm/worker/openvino_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 from collections import defaultdict
4 from typing import Dict, List, NamedTuple, Optional, Tuple
5
vllm/worker/openvino_worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """An OpenVINO worker class."""
3 from typing import Any, Dict, List, Optional, Tuple
4
vllm/worker/pooling_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 from typing import Any, Dict, List, Optional, Tuple, Type, Union
5
vllm/worker/tpu_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import enum
4 import time
5 from dataclasses import dataclass
vllm/worker/tpu_worker.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import os
4 from typing import List, Optional, Tuple, Union
5
vllm/worker/utils.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 '''
3 Worker-related helper functions.
4 '''
vllm/worker/worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A GPU worker class."""
3 import gc
4 import os
vllm/worker/worker_base.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import os
5 import time
vllm/worker/xpu_model_runner.py
+2
@@ -1,3 +1,5 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 +
3 import dataclasses
4 import time
5 import weakref
vllm/worker/xpu_worker.py
+1
@@ -1,3 +1,4 @@
1 +# SPDX-License-Identifier: Apache-2.0
2 """A XPU worker class."""
3 import gc
4 import os