sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
vllm-project/vllm:tests/v1/attention/test_attention_backends.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Tests for v1 attention backends without GPUModelRunner dependency.""" from functools import partial import pytest import torch from torch.nn.attention.flex_attention import create_block_mask, flex_attention ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/attention/test_attention_backends.py", "license": "Apache License 2.0", "lines": 652, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/v1/attention/utils.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Utility functions for attention-related v1 tests.""" from dataclasses import dataclass import pytest import torch from vllm.config import ( CacheConfig, CompilationConfig, DeviceConfig, LoadC...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/attention/utils.py", "license": "Apache License 2.0", "lines": 321, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/quantization/inc.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from fractions import Fraction from typing import TYPE_CHECKING, Any import regex as re import torch from vllm.logger import init_logger from vllm.model_executor.layers.linear import LinearBase, UnquantizedLine...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/quantization/inc.py", "license": "Apache License 2.0", "lines": 392, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/llama4_eagle.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright 2025 the LLAMA4, Meta Inc., vLLM, and HuggingFace Inc. team. # All rights reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/llama4_eagle.py", "license": "Apache License 2.0", "lines": 217, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/models/multimodal/generation/test_voxtral.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import json import pytest from mistral_common.audio import Audio from mistral_common.protocol.instruct.chunk import AudioChunk, RawAudio, TextChunk from mistral_common.protocol.instruct.messages import UserMessa...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/models/multimodal/generation/test_voxtral.py", "license": "Apache License 2.0", "lines": 180, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/models/voxtral.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import math from collections.abc import Iterable, Mapping, Sequence from functools import cached_property, partial from math import ceil from typing import Literal, cast import numpy as np import regex as re imp...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/voxtral.py", "license": "Apache License 2.0", "lines": 830, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/v1/core/test_async_scheduler.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections import deque import pytest from vllm.v1.core.sched.output import SchedulerOutput from vllm.v1.outputs import ModelRunnerOutput from vllm.v1.request import RequestStatus from vllm.v1.utils import...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/core/test_async_scheduler.py", "license": "Apache License 2.0", "lines": 205, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/v1/core/utils.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch from tests.v1.kv_connector.unit.utils import MockKVConfig from vllm.config import ( CacheConfig, ECTransferConfig, KVTransferConfig, ModelConfig, ParallelConfig, SchedulerCon...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/core/utils.py", "license": "Apache License 2.0", "lines": 234, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/core/sched/async_scheduler.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from vllm.logger import init_logger from vllm.v1.core.sched.output import SchedulerOutput from vllm.v1.core.sched.scheduler import Scheduler from vllm.v1.request import Request, RequestStatus logger = init_logge...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/core/sched/async_scheduler.py", "license": "Apache License 2.0", "lines": 50, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/bailing_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from # https://github.com/inclusionAI/Ling/blob/master/models/modeling_bailing_moe.py # Copyright 2023 The vLLM team. # Copyright 2023 Antgroup and The HuggingFace Inc. team. All rights reserved. # # Th...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/bailing_moe.py", "license": "Apache License 2.0", "lines": 561, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/cli_args.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import argparse import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig from .common import Config from .mk_obj...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/cli_args.py", "license": "Apache License 2.0", "lines": 142, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/common.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import Any import torch import vllm._custom_ops as ops import vllm.model_executor.layers.fused_moe.modular_kernel as mk from tests.kernels.moe.utils import make_test...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/common.py", "license": "Apache License 2.0", "lines": 580, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/make_feature_matrix.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import copy from enum import Enum from itertools import product import torch from tqdm import tqdm from vllm.config import VllmConfig, set_current_vllm_config from vllm.model_executor.layers.fused_moe.config im...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/make_feature_matrix.py", "license": "Apache License 2.0", "lines": 160, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/mk_objects.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import torch # Fused experts and PrepareFinalize imports import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm.model_executor.layers.fused_moe import Triton...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/mk_objects.py", "license": "Apache License 2.0", "lines": 407, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/parallel_utils.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import dataclasses import os import traceback from collections.abc import Callable from typing import Any, Concatenate import torch from torch.multiprocessing import spawn # pyright: ignore[reportPrivateImportUs...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/parallel_utils.py", "license": "Apache License 2.0", "lines": 116, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/modular_kernel_tools/profile_modular_kernel.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import copy from collections.abc import Callable from itertools import product from typing import Any import torch from vllm.config import VllmConfig from vllm.utils.torch_utils import set_random_seed from .co...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/modular_kernel_tools/profile_modular_kernel.py", "license": "Apache License 2.0", "lines": 109, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/test_modular_kernel_combinations.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import copy import textwrap import traceback from itertools import product from typing import Any import pytest import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm.config imp...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_modular_kernel_combinations.py", "license": "Apache License 2.0", "lines": 293, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/mamba/abstract.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from abc import abstractmethod from collections.abc import Iterable import torch from vllm.config import VllmConfig from vllm.model_executor.layers.attention_layer_base import AttentionLayerBase from vllm.v1.att...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/mamba/abstract.py", "license": "Apache License 2.0", "lines": 52, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/layers/quantization/input_quant_fp8.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import torch.nn.functional as F from vllm import _custom_ops as ops from vllm._aiter_ops import rocm_aiter_ops from vllm.model_executor.custom_op import CustomOp from vllm.model_executor.layers.quan...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/quantization/input_quant_fp8.py", "license": "Apache License 2.0", "lines": 213, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/utils/deep_gemm.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Compatibility wrapper for DeepGEMM API changes. Users of vLLM should always import **only** these wrappers. """ import functools import importlib import os from collections.abc import Callable from enum impor...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/utils/deep_gemm.py", "license": "Apache License 2.0", "lines": 471, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm._custom_ops as ops import vllm.model_executor.layers.fused_moe.modular_kernel as mk class TopKWeightAndReduceDelegate(mk.TopKWeightAndReduce): """ Useful in the case when some...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/topk_weight_and_reduce.py", "license": "Apache License 2.0", "lines": 142, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/test_count_expert_num_tokens.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Tests compute_expert_num_tokens kernels """ import dataclasses import pytest import torch from vllm.model_executor.layers.fused_moe.utils import count_expert_num_tokens @dataclasses.dataclass class TestTe...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_count_expert_num_tokens.py", "license": "Apache License 2.0", "lines": 117, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/entrypoints/openai/test_default_mm_loras.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import os import openai # use the official client for correctness check import pytest import pytest_asyncio from huggingface_hub import snapshot_download from ...conftest import AudioTestAssets from ...utils i...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/entrypoints/openai/test_default_mm_loras.py", "license": "Apache License 2.0", "lines": 80, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/lora/test_default_mm_loras.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Tests for applying default registered multimodal loras. """ import os import unittest.mock as mock import pytest from huggingface_hub import snapshot_download from vllm.lora.request import LoRARequest from...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/lora/test_default_mm_loras.py", "license": "Apache License 2.0", "lines": 130, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/structured_output/backend_outlines.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright 2025-present the Outlines developers # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from __future__ import annotations import ast import importlib import json import sys from dataclasses import dataclass, field from typing ...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/structured_output/backend_outlines.py", "license": "Apache License 2.0", "lines": 282, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/jina_vl.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Iterable, Mapping import torch import torch.nn as nn from transformers import BatchFeature from vllm.config import ModelConfig, VllmConfig from vllm.inputs import TokensPrompt from vl...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/jina_vl.py", "license": "Apache License 2.0", "lines": 126, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/reasoning/test_hunyuan_reasoning_parser.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import pytest from transformers import AutoTokenizer from tests.reasoning.utils import run_reasoning_extraction from vllm.reasoning import ReasoningParser, ReasoningParserManager parser_name = "hunyuan_a13b" ST...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/reasoning/test_hunyuan_reasoning_parser.py", "license": "Apache License 2.0", "lines": 156, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/reasoning/hunyuan_a13b_reasoning_parser.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Sequence import regex as re from transformers import PreTrainedTokenizerBase from vllm.entrypoints.openai.chat_completion.protocol import ( ChatCompletionRequest, ) from vllm.ent...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/reasoning/hunyuan_a13b_reasoning_parser.py", "license": "Apache License 2.0", "lines": 198, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:docs/mkdocs/hooks/generate_argparse.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import importlib.metadata import importlib.util import logging import sys import textwrap import traceback from argparse import SUPPRESS, Action, HelpFormatter from collections.abc import Iterable from importlib.m...
{ "repo_id": "vllm-project/vllm", "file_path": "docs/mkdocs/hooks/generate_argparse.py", "license": "Apache License 2.0", "lines": 195, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/quantization/reference_mxfp4.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch BFLOAT16_EXP_BIAS = 127 BFLOAT16_MANTISSA_BITS = 7 BFLOAT16_EXP_BITS = 8 FLOAT16_EXP_BIAS = 15 FLOAT16_MANTISSA_BITS = 10 FLOAT16_EXP_BITS = 5 FLOAT8_E8M0_MAX_EXP = 127 FLOAT4_EXP_BIAS = 1 FLOAT4_M...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/quantization/reference_mxfp4.py", "license": "Apache License 2.0", "lines": 214, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/ray/ray_env.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import json import os import vllm.envs as envs from vllm.logger import init_logger logger = init_logger(__name__) CONFIG_HOME = envs.VLLM_CONFIG_ROOT # Env vars that should NOT be copied from the driver to Ray...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/ray/ray_env.py", "license": "Apache License 2.0", "lines": 97, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/config/test_mp_reducer.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import sys from unittest.mock import patch from vllm.config import VllmConfig from vllm.engine.arg_utils import AsyncEngineArgs from vllm.v1.engine.async_llm import AsyncLLM def test_mp_reducer(): """ T...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/config/test_mp_reducer.py", "license": "Apache License 2.0", "lines": 42, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/engine/utils.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import contextlib import os import weakref from collections.abc import Callable, Iterator from dataclasses import dataclass from enum import Enum, auto from multiprocessing import Process, connection from multipr...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/engine/utils.py", "license": "Apache License 2.0", "lines": 970, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/parallel_utils.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ DeepEP test utilities """ import dataclasses import os import traceback from collections.abc import Callable from typing import Concatenate import torch from torch.distributed import ProcessGroup from torch....
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/parallel_utils.py", "license": "Apache License 2.0", "lines": 172, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/test_block_fp8.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import pytest import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from tests.kernels.moe.utils import ( make_dummy_moe_config, make_test_quant_config, make_test_weights, ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_block_fp8.py", "license": "Apache License 2.0", "lines": 257, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/test_block_int8.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import pytest import torch from tests.kernels.moe.utils import make_test_quant_config from tests.kernels.quant_utils import ( native_per_token_group_quant_int8, native_w8a8_block_matmul, ) from vllm.conf...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_block_int8.py", "license": "Apache License 2.0", "lines": 116, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/fused_moe/config.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from enum import IntEnum from typing import Union import torch import vllm.envs as envs from vllm.config import ParallelConfig from vllm.distributed import get_dp_group, get_pcp...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/config.py", "license": "Apache License 2.0", "lines": 1062, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/ernie45.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright 2025 The Baidu team. # Copyright 2023 The vLLM team. # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/ernie45.py", "license": "Apache License 2.0", "lines": 48, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/ernie45_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright 2025 The Baidu team. # Copyright 2023 The vLLM team. # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/ernie45_moe.py", "license": "Apache License 2.0", "lines": 663, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/keye.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import math from abc import abstractmethod from collections.abc import Iterable, Mapping, Sequence from functools import partial from typing import Annotated, Any, Literal, TypeAlias, TypeVar import numpy as np i...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/keye.py", "license": "Apache License 2.0", "lines": 1484, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/glm4_1v.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from # https://github.com/huggingface/transformers/blob/main/src/transformers/models/Glm4v/modeling_Glm4v.py # Copyright 2025 The vLLM team. # Copyright 2025 The ZhipuAI Team. # Copyright 2025 The Huggi...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/glm4_1v.py", "license": "Apache License 2.0", "lines": 1529, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/tools/test_config_validator.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import ast import pytest from tools.pre_commit.validate_config import validate_ast _TestConfig1 = ''' @config class _TestConfig1: a: int """docstring""" ''' _TestConfig2 = """ @config class _TestConfi...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/tools/test_config_validator.py", "license": "Apache License 2.0", "lines": 34, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/fused_moe/cpu_fused_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import weakref from collections.abc import Callable import torch from torch.nn import functional as F from vllm import _custom_ops as ops from vllm._custom_ops import cpu_fused_moe, cpu_prepack_moe_weight from v...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/cpu_fused_moe.py", "license": "Apache License 2.0", "lines": 416, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/test_deepgemm.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Unit-test DeepGEMM FP8 kernels (no DeepEP). Compare DeepGEMM path against the Triton fallback inside vLLM's fused_experts. """ import importlib import math import pytest import torch # vLLM fused-expert ref...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_deepgemm.py", "license": "Apache License 2.0", "lines": 161, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/models/dots1.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from # https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/llama/modeling_llama.py # Copyright 2025 The rednote-hilab team. # Copyright 2023 The vLLM team. # Copyright 2023 ...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/dots1.py", "license": "Apache License 2.0", "lines": 515, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/gemma3n.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright 2025 The vLLM team. # Copyright 2025 Google Inc. HuggingFace Inc. team. All rights reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/gemma3n.py", "license": "Apache License 2.0", "lines": 1058, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/config.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from copy import deepcopy from math import lcm from typing import TYPE_CHECKING from vllm.logger import init_logger from vllm.model_executor.models import ModelRegistry from vllm.platforms import current_platform...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/config.py", "license": "Apache License 2.0", "lines": 566, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/distributed/test_quick_all_reduce.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import multiprocessing import random import pytest import ray import torch import torch.distributed as dist from vllm import _custom_ops as ops from vllm.distributed.communication_op import tensor_model_paralle...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/distributed/test_quick_all_reduce.py", "license": "Apache License 2.0", "lines": 195, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/distributed/device_communicators/quick_all_reduce.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from enum import Enum import torch import torch.distributed as dist from torch.distributed import ProcessGroup import vllm.envs as envs from vllm import _custom_ops as ops from vllm.config import get_current_vl...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/device_communicators/quick_all_reduce.py", "license": "Apache License 2.0", "lines": 255, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/distributed/test_eplb_algo.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import numpy as np import pytest import torch from vllm.distributed.eplb.policy.default import DefaultEplbPolicy def test_basic_rebalance(): """Test basic rebalancing functionality""" # Example from ht...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/distributed/test_eplb_algo.py", "license": "Apache License 2.0", "lines": 380, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/distributed/test_eplb_execute.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import asyncio import random import pytest import torch import torch.distributed from vllm.config import VllmConfig, set_current_vllm_config from vllm.distributed.eplb.rebalance_execute import ( move_from_b...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/distributed/test_eplb_execute.py", "license": "Apache License 2.0", "lines": 526, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/distributed/eplb/eplb_state.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Expert parallelism load balancer (EPLB) metrics and states. # Glossary - **Logical Expert**: An expert that is part of the model's logical structure. It holds a set of weights and is replicated across mult...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/eplb/eplb_state.py", "license": "Apache License 2.0", "lines": 1028, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/distributed/eplb/rebalance_execute.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ The actual execution of the rearrangement. This involves the exchange of expert weights between GPUs. """ from collections.abc import Sequence from dataclasses import dataclass import numpy as np import tor...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/eplb/rebalance_execute.py", "license": "Apache License 2.0", "lines": 637, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/worker/xpu_model_runner.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from contextlib import contextmanager from typing import TYPE_CHECKING import torch from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.utils.torch_utils import supports_xpu_graph fr...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/worker/xpu_model_runner.py", "license": "Apache License 2.0", "lines": 42, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/worker/xpu_worker.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import gc import os from typing import Any import torch from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.profiler.wrapper import TorchP...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/worker/xpu_worker.py", "license": "Apache License 2.0", "lines": 97, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/config/test_config_generation.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import pytest from vllm.engine.arg_utils import EngineArgs from vllm.model_executor.layers.quantization.quark.utils import deep_compare def test_cuda_empty_vs_unset_configs(monkeypatch: pytest.MonkeyPatch): ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/config/test_config_generation.py", "license": "Apache License 2.0", "lines": 86, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/distributed/test_node_count.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import os import torch.distributed as dist from vllm.distributed.parallel_state import _node_count from vllm.distributed.utils import StatelessProcessGroup from vllm.utils.network_utils import get_ip, get_open_...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/distributed/test_node_count.py", "license": "Apache License 2.0", "lines": 35, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:examples/online_serving/openai_translation_client.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import asyncio import json import httpx from openai import OpenAI from vllm.assets.audio import AudioAsset def sync_openai(audio_path: str, client: OpenAI, model: str): with open(audio_path, "rb") as f: ...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/online_serving/openai_translation_client.py", "license": "Apache License 2.0", "lines": 68, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/entrypoints/openai/test_translation_validation.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import io # imports for structured outputs tests import json import httpx import librosa import numpy as np import openai import pytest import pytest_asyncio import soundfile as sf from ...utils import RemoteO...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/entrypoints/openai/test_translation_validation.py", "license": "Apache License 2.0", "lines": 251, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tools/generate_cmake_presets.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import argparse import json import multiprocessing import os import sys from shutil import which try: # Try to get CUDA_HOME from PyTorch installation, which is the # most reliable source of truth for vLL...
{ "repo_id": "vllm-project/vllm", "file_path": "tools/generate_cmake_presets.py", "license": "Apache License 2.0", "lines": 153, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/models/language/pooling/test_reward.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import json from typing import TYPE_CHECKING import pytest import torch import torch.nn.functional as F from transformers import AutoModel from vllm.platforms import current_platform from ....conftest import Hf...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/models/language/pooling/test_reward.py", "license": "Apache License 2.0", "lines": 125, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/test_silu_mul_fp8_quant_deep_gemm.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import random import pytest import torch from vllm.model_executor.layers.fused_moe.batched_deep_gemm_moe import ( persistent_masked_m_silu_mul_quant, ) from vllm.platforms import current_platform from vllm...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_silu_mul_fp8_quant_deep_gemm.py", "license": "Apache License 2.0", "lines": 243, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/core/sched/request_queue.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import heapq from abc import ABC, abstractmethod from collections import deque from collections.abc import Iterable, Iterator from enum import Enum from vllm.v1.request import Request class SchedulingPolicy(En...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/core/sched/request_queue.py", "license": "Apache License 2.0", "lines": 160, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_custom_ops.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch from vllm.model_executor.layers.rotary_embedding import RotaryEmbedding # Register CustomRotaryEmbedding to CustomOP. @RotaryEmbedding.register_oot class DummyRotaryEmbedding(RotaryEmbedding): ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/plugins/vllm_add_dummy_platform/vllm_add_dummy_platform/dummy_custom_ops.py", "license": "Apache License 2.0", "lines": 13, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": ...
test
vllm-project/vllm:tests/cuda/test_cuda_context.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import ctypes from concurrent.futures import ThreadPoolExecutor import pytest import torch from vllm.platforms import current_platform def check_cuda_context(): """Check CUDA driver context status""" ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/cuda/test_cuda_context.py", "license": "Apache License 2.0", "lines": 65, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:examples/online_serving/openai_chat_completion_client_with_tools_xlam.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # ruff: noqa: E501 """ Set up this example by starting a vLLM OpenAI-compatible server with tool call options enabled for xLAM-2 models: vllm serve --model Salesforce/Llama-xLAM-2-8b-fc-r --enable-auto-tool-choic...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/online_serving/openai_chat_completion_client_with_tools_xlam.py", "license": "Apache License 2.0", "lines": 196, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:examples/online_serving/openai_chat_completion_client_with_tools_xlam_streaming.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # ruff: noqa: E501 """ Set up this example by starting a vLLM OpenAI-compatible server with tool call options enabled for xLAM-2 models: vllm serve --model Salesforce/Llama-xLAM-2-8b-fc-r --enable-auto-tool-choic...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/online_serving/openai_chat_completion_client_with_tools_xlam_streaming.py", "license": "Apache License 2.0", "lines": 227, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template"...
license
vllm-project/vllm:tests/models/language/generation/test_gemma.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import numpy as np import pytest MODELS = ["google/gemma-2b", "google/gemma-2-2b", "google/gemma-3-4b-it"] @pytest.mark.parametrize("model", MODELS) def test_dummy_loader(vllm_runner, monkeypatch, model: str) -...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/models/language/generation/test_gemma.py", "license": "Apache License 2.0", "lines": 24, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/pool/metadata.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass import numpy as np import torch from vllm.pooling_params import PoolingParams from vllm.tasks import PoolingTask from vllm.utils.platform_utils import is_pin_memory_available p...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/pool/metadata.py", "license": "Apache License 2.0", "lines": 99, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/attention/backends/rocm_aiter_fa.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Attention layer with AiterFlashAttention.""" from dataclasses import dataclass from typing import ClassVar import torch from vllm._aiter_ops import rocm_aiter_ops from vllm.config import VllmConfig, get_laye...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/attention/backends/rocm_aiter_fa.py", "license": "Apache License 2.0", "lines": 1229, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/worker/tpu_input_batch.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Datastructures defining a TPU input batch from typing import cast import numpy as np import torch from vllm.lora.request import LoRARequest from vllm.sampling_params import SamplingType from vllm.utils import...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/worker/tpu_input_batch.py", "license": "Apache License 2.0", "lines": 501, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import TYPE_CHECKING, Any import regex as re import torch from vllm.config import VllmConfig from vllm.distributed.kv_transfer.kv_connector.v1.base import ( KVC...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_connector.py", "license": "Apache License 2.0", "lines": 445, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import json import logging import os import threading import time from collections import deque from contextlib import contextmanager from dataclasses import dataclass from typing import Any import msgpack impor...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py", "license": "Apache License 2.0", "lines": 553, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import atexit import ctypes import math from dataclasses import dataclass import torch from vllm.logger import init_logger logger = init_logger(__name__) @dataclass class MemoryBlock: size: int addr:...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/distributed/kv_transfer/kv_connector/v1/p2p/tensor_memory_pool.py", "license": "Apache License 2.0", "lines": 211, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/v1/test_request.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from vllm.v1.request import RequestStatus def test_request_status_fmt_str(): """Test that the string representation of RequestStatus is correct.""" assert f"{RequestStatus.WAITING}" == "WAITING" asse...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/test_request.py", "license": "Apache License 2.0", "lines": 15, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:benchmarks/kernels/benchmark_moe_align_block_size.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import argparse import itertools import torch from vllm.model_executor.layers.fused_moe.moe_align_block_size import ( moe_align_block_size, ) from vllm.triton_utils import triton def get_topk_ids(num_token...
{ "repo_id": "vllm-project/vllm", "file_path": "benchmarks/kernels/benchmark_moe_align_block_size.py", "license": "Apache License 2.0", "lines": 72, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/test_moe_align_block_size.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Tests for the MOE align block size function. Run `pytest tests/kernels/moe/test_moe_align_block_size.py`. """ import pytest import torch from vllm.model_executor.layers.fused_moe.moe_align_block_size import ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_moe_align_block_size.py", "license": "Apache License 2.0", "lines": 352, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/models/multimodal/test_mapping.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Iterable import pytest import torch import transformers from transformers import AutoConfig, PreTrainedModel from vllm.config import ModelConfig from vllm.model_executor.models.utils ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/models/multimodal/test_mapping.py", "license": "Apache License 2.0", "lines": 91, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:examples/online_serving/structured_outputs/structured_outputs.py
# ruff: noqa: E501 # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import argparse import asyncio import enum import os from typing import Any, Literal import openai import pydantic from openai.types.chat import ChatCompletionChunk ConstraintsFormat = Literal...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/online_serving/structured_outputs/structured_outputs.py", "license": "Apache License 2.0", "lines": 233, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:examples/offline_inference/spec_decode.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from transformers import AutoTokenizer from vllm import LLM, SamplingParams from vllm.benchmarks.datasets import add_dataset_parser, get_samples from vllm.utils.argparse_utils import FlexibleArgumentParser from ...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/offline_inference/spec_decode.py", "license": "Apache License 2.0", "lines": 231, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/v1/engine/test_fast_incdec_prefix_err.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from transformers import AutoTokenizer from vllm.sampling_params import SamplingParams from vllm.v1.engine import EngineCoreRequest from vllm.v1.engine.detokenizer import IncrementalDetokenizer # ruff: noqa: E5...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/v1/engine/test_fast_incdec_prefix_err.py", "license": "Apache License 2.0", "lines": 183, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Callable import torch from torch.nn.parameter import Parameter from vllm.model_executor.layers.quantization.compressed_tensors.schemes import ( CompressedTensorsScheme, ) from vll...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4.py", "license": "Apache License 2.0", "lines": 108, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition":...
license
vllm-project/vllm:tests/compile/test_config.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import copy from contextlib import nullcontext from unittest.mock import MagicMock, patch import pytest from pydantic import ValidationError from vllm.compilation.counter import compilation_counter from vllm.com...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/compile/test_config.py", "license": "Apache License 2.0", "lines": 496, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/test_flex_attention.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """Integration tests for FlexAttention backend vs default backend""" import pytest import torch from packaging import version from tests.utils import set_random_seed from tests.v1.attention.utils import ( Ba...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/test_flex_attention.py", "license": "Apache License 2.0", "lines": 191, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/core/kv_cache_coordinator.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from abc import ABC, abstractmethod from collections.abc import Sequence from math import lcm from vllm.v1.core.block_pool import BlockPool from vllm.v1.core.kv_cache_metrics import KVCacheMetricsCollector from v...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/core/kv_cache_coordinator.py", "license": "Apache License 2.0", "lines": 532, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/nemotron_h.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Adapted from https://github.com/vllm-project/vllm/blob/94d8ec8d2bcb4ec55e33022b313c7e978edf05e1/vllm/model_executor/models/bamba.py # Copyright 2024 HuggingFace Inc. team. All rights reserved. # Copyright (c) 2...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/nemotron_h.py", "license": "Apache License 2.0", "lines": 831, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/transformers_utils/configs/nemotron_h.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project # Copyright 2024 HuggingFace Inc. team. All rights reserved. # Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/transformers_utils/configs/nemotron_h.py", "license": "Apache License 2.0", "lines": 274, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm.forward_context import get_forward_context, is_forward_context_available from vllm.logger import init_logger from vllm.mod...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/batched_deep_gemm_moe.py", "license": "Apache License 2.0", "lines": 384, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:examples/online_serving/multi_instance_data_parallel.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import asyncio import threading from vllm.engine.arg_utils import AsyncEngineArgs from vllm.engine.async_llm_engine import AsyncLLMEngine from vllm.outputs import RequestOutput from vllm.sampling_params import Sa...
{ "repo_id": "vllm-project/vllm", "file_path": "examples/online_serving/multi_instance_data_parallel.py", "license": "Apache License 2.0", "lines": 75, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/attention/backends/mla/cutlass_mla.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import os from typing import ClassVar import torch import vllm._custom_ops as ops from vllm.config.cache import CacheDType from vllm.logger import init_logger from vllm.model_executor.layers.attention.mla_atten...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/attention/backends/mla/cutlass_mla.py", "license": "Apache License 2.0", "lines": 232, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/test_apply_repetition_penalties.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import pytest import torch from tests.kernels.utils import opcheck from vllm._custom_ops import ( apply_repetition_penalties_cuda, apply_repetition_penalties_torch, ) from vllm.platforms import current_pl...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/test_apply_repetition_penalties.py", "license": "Apache License 2.0", "lines": 108, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/v1/attention/backends/cpu_attn.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from dataclasses import dataclass from typing import ClassVar import torch from vllm import _custom_ops as ops from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms import Cp...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/attention/backends/cpu_attn.py", "license": "Apache License 2.0", "lines": 446, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/worker/cpu_model_runner.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from contextlib import contextmanager from typing import Any import torch import torch.nn as nn from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.model_executor.model_loader import...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/worker/cpu_model_runner.py", "license": "Apache License 2.0", "lines": 103, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/v1/worker/cpu_worker.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import os import platform from collections.abc import Callable from typing import Any import torch from vllm import envs from vllm.config import VllmConfig from vllm.logger import init_logger from vllm.platforms...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/v1/worker/cpu_worker.py", "license": "Apache License 2.0", "lines": 200, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/kernels/moe/test_deepep_deepgemm_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Test DeepEP + DeepGEMM integration DeepGEMM are gemm kernels specialized for the fp8 block-quantized case. """ import dataclasses from contextlib import contextmanager import pytest import torch.distributed ...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_deepep_deepgemm_moe.py", "license": "Apache License 2.0", "lines": 492, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:tests/kernels/moe/test_deepep_moe.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project """ Test deepep dispatch-combine logic """ import dataclasses import pytest import torch.distributed from torch.distributed import ProcessGroup from tests.kernels.moe.utils import make_dummy_moe_config from vll...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/kernels/moe/test_deepep_moe.py", "license": "Apache License 2.0", "lines": 469, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
vllm-project/vllm:vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Callable import deep_ep import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig from ...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/deepep_ht_prepare_finalize.py", "license": "Apache License 2.0", "lines": 391, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project from collections.abc import Callable import deep_ep import torch import vllm.model_executor.layers.fused_moe.modular_kernel as mk from vllm import envs from vllm.logger import init_logger from vllm.model_executo...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/layers/fused_moe/deepep_ll_prepare_finalize.py", "license": "Apache License 2.0", "lines": 392, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:vllm/model_executor/models/tarsier.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import math from collections.abc import Iterable, Mapping, Sequence from typing import Annotated, Final, Literal, Protocol, TypeAlias, TypeVar import torch import torch.nn as nn from transformers import ( Ba...
{ "repo_id": "vllm-project/vllm", "file_path": "vllm/model_executor/models/tarsier.py", "license": "Apache License 2.0", "lines": 526, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
vllm-project/vllm:tests/entrypoints/test_api_server_process_manager.py
# SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project import multiprocessing import socket import threading import time from unittest.mock import patch import pytest from vllm.v1.utils import APIServerProcessManager, wait_for_completion_or_failure # Global variab...
{ "repo_id": "vllm-project/vllm", "file_path": "tests/entrypoints/test_api_server_process_manager.py", "license": "Apache License 2.0", "lines": 206, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test