@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e5d96dc8fc
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 6, 09:30 UTC

Fix `SpeculatorsConfig` now that `PreTrainedConfig` is a `dataclass` in Transformers (#37574)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Mar 19, 2026 at 18:04 UTC e5d96dc8fce24043dd50d1671a7674bda1728f7f
1 file changed +7
vllm/transformers_utils/configs/speculators/base.py
+7
@@ -14,6 +14,13 @@ from vllm.transformers_utils.utils import without_trust_remote_code
14 class SpeculatorsConfig(PretrainedConfig):
15 model_type = "speculators"
16
17 + def __init__(self, **kwargs):
18 + """In Transformers v5, `PretrainedConfig` is decorated with `dataclass` and
19 + `huggingface_hub.dataclasses.strict(accept_kwargs=True)`.
20 + Inheriting classes do not inherit the `accept_kwargs=True` behaviour so we must
21 + explicitly pass any kwargs to `PretrainedConfig.__init__`."""
22 + super().__init__(**kwargs)
23 +
24 @classmethod
25 def from_pretrained(
26 cls,