File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ class SchedulerConfig:
141141 while a larger value (e.g., 10) reduces host overhead and may increase throughput
142142 by batching multiple tokens before sending."""
143143
144+ @staticmethod
145+ def default_factory ():
146+ """
147+ Factory method to create `SchedulerConfig` with default values for `InitVar`s.
148+ """
149+ return SchedulerConfig (max_model_len = 8192 , is_encoder_decoder = False )
150+
144151 def get_scheduler_cls (self ) -> type ["SchedulerInterface" ]:
145152 if self .scheduler_cls is None :
146153 if self .async_scheduling :
Original file line number Diff line number Diff line change @@ -154,8 +154,6 @@ def enable_fusion(cfg: "VllmConfig") -> bool:
154154 OptimizationLevel .O3 : OPTIMIZATION_LEVEL_03 ,
155155}
156156
157- SCHEDULER_CONFIG_FACTORY = lambda : SchedulerConfig (8192 , False )
158-
159157
160158@config
161159@dataclass (config = ConfigDict (arbitrary_types_allowed = True ))
@@ -172,7 +170,9 @@ class VllmConfig:
172170 """Cache configuration."""
173171 parallel_config : ParallelConfig = Field (default_factory = ParallelConfig )
174172 """Parallel configuration."""
175- scheduler_config : SchedulerConfig = Field (default_factory = SCHEDULER_CONFIG_FACTORY )
173+ scheduler_config : SchedulerConfig = Field (
174+ default_factory = SchedulerConfig .default_factory ,
175+ )
176176 """Scheduler configuration."""
177177 device_config : DeviceConfig = Field (default_factory = DeviceConfig )
178178 """Device configuration."""
You can’t perform that action at this time.
0 commit comments