From f8f9ff57ee365891fe9f54cd46df65cc9d5ccca0 Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Fri, 12 Jul 2024 15:59:47 -0700 Subject: [PATCH] [Bugfix][TPU] Fix megacore setting for v5e-litepod (#6397) --- vllm/attention/backends/pallas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/attention/backends/pallas.py b/vllm/attention/backends/pallas.py index 7a6954ceb6d6a..c45f7b28b2afb 100644 --- a/vllm/attention/backends/pallas.py +++ b/vllm/attention/backends/pallas.py @@ -116,7 +116,7 @@ class PallasAttentionBackendImpl(AttentionImpl): self.megacore_mode = None tpu_type = torch_xla.tpu.get_tpu_env()["TYPE"].lower() - if not tpu_type.endswith("lite"): + if "lite" not in tpu_type: if self.num_kv_heads % 2 == 0: self.megacore_mode = "kv_head" else: