[TPU] Update pallas.py to support trillium (#8871)

This commit is contained in:
Brittany 2024-09-27 01:16:55 -07:00 committed by GitHub
parent 6d792d2f31
commit 8df2dc3c88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,7 +130,7 @@ class PallasAttentionBackendImpl(AttentionImpl):
assert tpu_type is not None
tpu_type = tpu_type.lower()
if "lite" not in tpu_type:
if (("lite" not in tpu_type) and ("v6" not in tpu_type)):
if self.num_kv_heads % 2 == 0:
self.megacore_mode = "kv_head"
else: