From 76c9ec0ddf1519346e4f3e1d76c5513a40d3ca89 Mon Sep 17 00:00:00 2001 From: Lu Fang Date: Mon, 8 Sep 2025 17:23:15 -0700 Subject: [PATCH] adjust config type and remove config path for simplicity Signed-off-by: Lu Fang --- docs/contributing/intermediate_logging.md | 16 --------------- vllm/config.py | 5 ----- vllm/engine/arg_utils.py | 25 ++--------------------- 3 files changed, 2 insertions(+), 44 deletions(-) diff --git a/docs/contributing/intermediate_logging.md b/docs/contributing/intermediate_logging.md index 4d51592cf50a8..55edd5301a15a 100644 --- a/docs/contributing/intermediate_logging.md +++ b/docs/contributing/intermediate_logging.md @@ -30,22 +30,6 @@ Dump first layers module, all devices for step 0 python3 ./examples/offline_inference/llm_engine_example.py --model "meta-llama/Llama-3.1-8B-Instruct" --enforce-eager --intermediate-log-config '{"enabled": true, "module_call_match": "layers\\.0\\."}' ``` -Dump customized layers, devices, steps through a config file - -The configuration file should be a JSON file with the following structure: - -```json -{ - "output_dir": "/tmp/vllm_intermediates", - "module_call_match": ["layers\\.0\\.(?!.*rotary_emb).*", "rotary_emb:0", "embed_tokens", "model\\.norm"], - "log_step_ids": [0, 1], - "device_names": ["cuda:0"] -} -``` - -```bash -python3 ./examples/offline_inference/llm_engine_example.py --model "meta-llama/Llama-3.1-8B-Instruct" --enforce-eager --intermediate-log-config-path $HOME/intermediate_logging_config.json -``` #### Configuration Parameters diff --git a/vllm/config.py b/vllm/config.py index 366622819a891..e977eff632bd4 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -4122,11 +4122,6 @@ class IntermediateLoggingConfig: output_dir: str = "/tmp/vllm_intermediates" """Directory where to save the intermediate tensors.""" - reload_input_dir: Optional[str] = None - """Directory where to load the inputs for the steps/modules. - This is used when we want to check per module numerical gaps instead - of accumulated gap to further dive into the actual numerical issues.""" - module_call_match: Optional[list[str]] = None """Match modules by name regex and call index ( a module can be called multiple times in a step) diff --git a/vllm/engine/arg_utils.py b/vllm/engine/arg_utils.py index 5cd9e4d0303a7..934f5799242c6 100644 --- a/vllm/engine/arg_utils.py +++ b/vllm/engine/arg_utils.py @@ -25,8 +25,7 @@ from vllm.config import (BlockSize, CacheConfig, CacheDType, CompilationConfig, ConfigFormat, ConfigType, ConvertOption, DecodingConfig, DetailedTraceModules, Device, DeviceConfig, DistributedExecutorBackend, - GuidedDecodingBackend, HfOverrides, - IntermediateLoggingConfig, KVEventsConfig, + GuidedDecodingBackend, HfOverrides, KVEventsConfig, KVTransferConfig, LoadConfig, LogprobsMode, LoRAConfig, ModelConfig, ModelDType, ModelImpl, MultiModalConfig, ObservabilityConfig, ParallelConfig, @@ -449,9 +448,8 @@ class EngineArgs: async_scheduling: bool = SchedulerConfig.async_scheduling # DEPRECATED enable_prompt_adapter: bool = False - intermediate_log_config_path: Optional[str] = None - intermediate_log_config: Optional[IntermediateLoggingConfig] = None + intermediate_log_config: Optional[dict[str, Any]] = None kv_sharing_fast_prefill: bool = \ CacheConfig.kv_sharing_fast_prefill @@ -853,11 +851,6 @@ class EngineArgs: vllm_group.add_argument("--intermediate-log-config", **vllm_kwargs["intermediate_log_config"]) - vllm_group.add_argument( - "--intermediate-log-config-path", - type=str, - help="The path to the configurations for intermediate loggings. " - "Should be a string.") vllm_group.add_argument("--kv-transfer-config", **vllm_kwargs["kv_transfer_config"]) vllm_group.add_argument('--kv-events-config', @@ -979,18 +972,6 @@ class EngineArgs: pt_load_map_location=self.pt_load_map_location, ) - def create_intermediate_log_config_from_path(self, ) -> None: - """set intermediate_log_config from intermediate_log_config_path - """ - if self.intermediate_log_config_path is not None: - if self.intermediate_log_config is not None: - logger.warning("The `intermediate_log_config` is set," - "`intermediate_log_config_path` " - "will be ignored.") - with open(self.intermediate_log_config_path) as f: - self.intermediate_log_config = \ - IntermediateLoggingConfig.from_dict(json.load(f)) - def create_speculative_config( self, target_model_config: ModelConfig, @@ -1274,8 +1255,6 @@ class EngineArgs: disable_log_stats=self.disable_log_stats, ) - self.create_intermediate_log_config_from_path() - # Reminder: Please update docs/features/compatibility_matrix.md # If the feature combo become valid if self.num_scheduler_steps > 1: