vllm.utils ยถ
Modules:
-
argparse_utilsโArgument parsing utilities for vLLM.
-
async_utilsโContains helpers related to asynchronous code.
-
b12xโAccessors for the optional
b12xpackage. -
cacheโ -
collection_utilsโContains helpers that are applied to collections.
-
counterโ -
cpu_resource_utilsโ -
cpu_triton_utilsโContains replacement functions to fallback Triton usages in CPU backend
-
deep_gemmโCompatibility wrapper for DeepGEMM API changes.
-
flashinferโCompatibility wrapper for FlashInfer API changes.
-
flashinfer_moe_epโFlashInfer
moe_ephelpers for DeepSeek V4 vLLM integration. -
func_utilsโContains helpers that are applied to functions.
-
gc_utilsโ -
gpu_sync_debugโDetect unintended GPU<->CPU syncs in the hot path.
-
hashingโ -
hpcโCompatibility wrapper for HPC API changes.
-
hummingโLazy facade for the optional
hummingpackage. -
import_utilsโContains helpers related to importing modules.
-
jit_monitorโMonitor unexpected kernel JIT compilation during inference.
-
jsontreeโHelper functions to work with nested JSON structures.
-
math_utilsโMath utility functions for vLLM.
-
mem_constantsโ -
mem_utilsโ -
mistralโProvides lazy import of the vllm.tokenizers.mistral module.
-
multi_stream_utilsโ -
ncclโ -
network_utilsโ -
numa_utilsโNUMA binding utilities for vLLM worker processes.
-
nvtx_pytorch_hooksโ -
ompmultiprocessingโOMP Aware Multiprocessing manager for running multiprocessing.Process()
-
platform_utilsโ -
registryโ -
serial_utilsโ -
sparse_utilsโThread-safe wrapper for sparse tensor invariant validation.
-
system_utilsโ -
tensor_schemaโ -
torch_utilsโ
Functions:
-
length_from_prompt_token_ids_or_embedsโCalculate the request length (in number of tokens) give either
length_from_prompt_token_ids_or_embeds(prompt_token_ids, prompt_embeds) ยถ
Calculate the request length (in number of tokens) give either prompt_token_ids or prompt_embeds.