From 8cdb96f1d26beb8609cdb4d56dee1ef9b22b089b Mon Sep 17 00:00:00 2001 From: Hui Liu <96135754+hliuca@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:26:36 -0800 Subject: [PATCH] fix logits_soft_cap constructor --- vllm/attention/backends/rocm_flash_attn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm/attention/backends/rocm_flash_attn.py b/vllm/attention/backends/rocm_flash_attn.py index 904e4ede90f8f..cdf1c52b92af8 100644 --- a/vllm/attention/backends/rocm_flash_attn.py +++ b/vllm/attention/backends/rocm_flash_attn.py @@ -462,8 +462,9 @@ def __init__( if logits_soft_cap is None: # In flash-attn, setting logits_soft_cap as 0 means no soft cap. - logits_soft_cap = 0 - self.logits_soft_cap = logits_soft_cap + self.logits_soft_cap = 0 + else: + self.logits_soft_cap = logits_soft_cap self.num_heads = num_heads self.head_size = head_size