[Migration] Migrate GGUF quantization support to plugin (#39612)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Isotr0py
2026-06-12 12:02:21 -07:00
committed by GitHub
parent d6fd7ce8da
commit 6635279d8a
57 changed files with 72 additions and 9048 deletions
+1 -24
View File
@@ -42,12 +42,6 @@ from vllm.transformers_utils.config import (
uses_mrope,
uses_xdrope_dim,
)
from vllm.transformers_utils.gguf_utils import (
is_gguf,
is_remote_gguf,
maybe_patch_hf_config_from_gguf,
split_remote_gguf,
)
from vllm.transformers_utils.model_arch_config_convertor import (
MODEL_ARCH_CONFIG_CONVERTORS,
ModelArchConfigConvertorBase,
@@ -547,11 +541,6 @@ class ModelConfig:
hf_overrides_fn=hf_overrides_fn,
token=self.hf_token,
)
hf_config = maybe_patch_hf_config_from_gguf(
self.model,
hf_config,
)
self.hf_config = hf_config
if dict_overrides:
self._apply_dict_overrides(hf_config, dict_overrides)
@@ -724,14 +713,6 @@ class ModelConfig:
"disable the cache with --mm-processor-cache-gb 0."
)
# Multimodal GGUF models must use original repo for mm processing
if is_gguf(self.tokenizer) and self.is_multimodal_model:
raise ValueError(
"Loading a multimodal GGUF model needs to use original "
"tokenizer. Please specify the unquantized hf model's "
"repo name or path using the --tokenizer argument."
)
if self.disable_sliding_window:
# Set after get_and_verify_max_len to ensure that max_model_len
# can be correctly capped to sliding window size
@@ -884,10 +865,7 @@ class ModelConfig:
self.tokenizer = object_storage_tokenizer.dir
def _get_encoder_config(self) -> dict[str, Any] | None:
model = self.model
if is_remote_gguf(model):
model, _ = split_remote_gguf(model)
return get_sentence_transformer_tokenizer_config(model, self.revision)
return get_sentence_transformer_tokenizer_config(self.model, self.revision)
def _get_default_runner_type(
self,
@@ -1019,7 +997,6 @@ class ModelConfig:
"gpt_oss_mxfp4",
"deepseek_v4_fp8",
"humming",
"gguf",
]
# if the user specifies humming, we should always use humming
if self.quantization == "humming":