[Chore] Use upstream Transformers DeepseekV4Config (#61392)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Kevin H. Luu <khluu000@gmail.com>
This commit is contained in:
Harry Mellor
2026-10-15 01:08:08 -07:00
committed by GitHub
co-authored by Claude Opus 5.5 mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Kevin H. Luu
parent 1c4c319792
commit b965ee564d
31 changed files with 155 additions and 120 deletions
@@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from transformers import DeepseekV4Config
from vllm.transformers_utils.deepseek_v4_utils import get_compress_ratios
# Legacy field as shipped by deepseek-ai/DeepSeek-V4-Flash-Vision-Exp
COMPRESS_RATIOS = [0, 0] + [4, 128] * 20 + [4, 0, 0, 0]
def test_compress_ratios_survive_upstream_config():
"""Upstream pops `compress_ratios`; the helper must recover it."""
config = DeepseekV4Config(
num_hidden_layers=43,
num_nextn_predict_layers=3,
compress_ratios=COMPRESS_RATIOS,
)
assert not hasattr(config, "compress_ratios")
assert get_compress_ratios(config) == COMPRESS_RATIOS