[Core][LoRA] Support fp32 lm_head (head_dtype) on the LoRA path (#48525)

Signed-off-by: Karthik Kothuri <karthikkothuri2009@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Karthik Kothuri
2026-07-15 09:51:09 +08:00
committed by GitHub
co-authored by Claude
parent 6e073440b1
commit 4f7fffb92f
3 changed files with 11 additions and 29 deletions
-16
View File
@@ -136,22 +136,6 @@ def test_get_top_tokens_honors_head_dtype(default_vllm_config):
assert torch.equal(top, expected)
def test_fp32_head_rejected_with_lora(default_vllm_config):
from vllm.lora.layers.logits_processor import LogitsProcessorWithLoRA
base = _build_processor(64)
base.head_dtype = torch.float32
with pytest.raises(ValueError, match="not yet supported with LoRA"):
LogitsProcessorWithLoRA(
base,
hidden_size=16,
dtype=torch.bfloat16,
device=torch.device("cpu"),
sharded_to_full_mapping=None,
)
@pytest.mark.core_model
def test_fp32_head_e2e_no_nan():
"""An fp32 head produces finite logprobs end-to-end.