vllm.model_inspection
¶
Model inspection utilities for vLLM.
Functions:
-
format_model_inspection–Format a model into a transformers-style hierarchical string.
_format_index_ranges(indices)
¶
Format indices into range notation (e.g., [0,1,2,4,5,6] -> '0-2, 4-6').
Source code in vllm/model_inspection.py
_format_module_tree(module, name='', indent=0)
¶
Format a module tree with indentation, grouping identical layers.
Produces output like
(layers): ModuleList( (0-27, 29-47): 47 x LlamaDecoderLayer( ... ) (28, 48): 2 x DifferentDecoderLayer( ... ) )
Source code in vllm/model_inspection.py
_get_child_signature(child)
¶
Get a signature for a child module to detect duplicates.
Source code in vllm/model_inspection.py
_get_module_info(module)
¶
Get info string for a module.