[Bugfix][TPU] Fix megacore setting for v5e-litepod (#6397)
This commit is contained in:
parent
6bc9710f6e
commit
f8f9ff57ee
@ -116,7 +116,7 @@ class PallasAttentionBackendImpl(AttentionImpl):
|
|||||||
|
|
||||||
self.megacore_mode = None
|
self.megacore_mode = None
|
||||||
tpu_type = torch_xla.tpu.get_tpu_env()["TYPE"].lower()
|
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:
|
if self.num_kv_heads % 2 == 0:
|
||||||
self.megacore_mode = "kv_head"
|
self.megacore_mode = "kv_head"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user