[Bugfix][Model] deepseek-vl2: restore original DeepseekV2Config defaults for omitted language_config fields (#51302)

Signed-off-by: Seunghyuk Park <separk@habana.ai>
This commit is contained in:
Seunghyuk Park (shepark)
2026-08-25 05:03:40 +00:00
committed by GitHub
parent a9a17e7095
commit 4f3e255dca
@@ -90,7 +90,12 @@ class MlpProjectorConfig(PretrainedConfig):
@strict
class DeepseekVLV2TextConfig(DeepseekV2Config):
kv_lora_rank: int | None = None
# DeepSeek-VL2 checkpoints (e.g. deepseek-vl2-small) omit ``vocab_size`` and
# rely on the original DeepSeek-VL2 default of 102400; the generic
# Transformers ``DeepseekV2Config`` incorrectly defaults it to 32000.
# Upstream fix: https://github.com/huggingface/transformers/pull/48159
vocab_size: int = 102400
kv_lora_rank: int | None = DeepseekV2Config.kv_lora_rank
class DeepseekVLV2Config(PretrainedConfig):