kingoflolz / mesh-transformer-jax

Model parallel transformers in JAX and Haiku
Apache License 2.0
6.27k stars 890 forks source link

invalid syntax in to_hf_weights.py and device_train.py #200

Closed rahimikia closed 2 years ago

rahimikia commented 2 years ago

Running to_hf_weights.py returns this error. Even to_hf_weights.py --help.

File "to_hf_weights.py", line 78
    input_ckpt: Union[FluidPath, str],
              ^
SyntaxError: invalid syntax

This is also valid for other files too (like device_train.py):

  File "device_train.py", line 58
    with open(f"gs://{bucket}/{path}/meta.json", "r") as f:
                                              ^
SyntaxError: invalid syntax
kingoflolz commented 2 years ago

It looks like your python version is too old, try using python 3.7 or later