mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add TPU support for OPT-350M
The 350M model seems to have a different structure than the other ones ???
This commit is contained in:
@ -1054,7 +1054,7 @@ def load_model(path: str, driver_version="tpu_driver0.1_dev20210607", hf_checkpo
|
||||
# by the number of TPU cores, and fall back to one core if an even
|
||||
# number of TPU cores is not possible.
|
||||
for c in (8, 6, 4, 2, 1):
|
||||
if 0 == params["n_heads"] % c == params["d_model"] % c:
|
||||
if 0 == params["n_heads"] % c == params.get("d_embed", params["d_model"]) % c:
|
||||
params["cores_per_replica"] = c
|
||||
break
|
||||
|
||||
|
Reference in New Issue
Block a user