@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5e58bdc711
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 7, 16:30 UTC

[Bugfix] Remove erroneous lower bound on LoRA vocab size constraint (#35354)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>

Lucas Wilkinson committed Feb 26, 2026 at 13:44 UTC 5e58bdc7113a2c62a9bfb71304d0d1563b0da7f3
2 files changed +4 -6
tests/lora/test_layers.py
+2 -2
@@ -469,7 +469,7 @@ def test_lm_head_logits_processor(
469
470
471 @torch.inference_mode()
472 -@pytest.mark.parametrize("vocab_size", [512, 32000, 258049, 300000])
472 +@pytest.mark.parametrize("vocab_size", [258049, 300000])
473 @pytest.mark.parametrize("device", DEVICES)
474 def test_lm_head_logits_processor_invalid_vocab_size(
475 default_vllm_config, dist_init, vocab_size, device
@@ -489,7 +489,7 @@ def test_lm_head_logits_processor_invalid_vocab_size(
489 logits_processor, 1024, torch.float16, device, None
490 )
491
492 - with pytest.raises(ValueError, match="vocab size must be > 32000 and <= 258048"):
492 + with pytest.raises(ValueError, match="vocab size must be <= 258048"):
493 lora_logits_processor.create_lora_weights(max_loras, lora_config)
494
495
vllm/lora/layers/logits_processor.py
+2 -4
@@ -88,10 +88,8 @@ class LogitsProcessorWithLoRA(BaseLayerWithLoRA):
88 model_config: PretrainedConfig | None = None,
89 ) -> None:
90 # TODO: Verify if this condition can be further relaxed
91 - if self.base_layer.vocab_size <= 32000 or self.base_layer.vocab_size > 258048:
92 - raise ValueError(
93 - "When using LoRA, vocab size must be > 32000 and <= 258048"
94 - )
91 + if self.base_layer.vocab_size > 258048:
92 + raise ValueError("When using LoRA, vocab size must be <= 258048")
93 self.lora_a_stacked = torch.zeros(
94 (
95 max_loras,