T5: Change default dtype to bfloat16 (#147)

* T5: Change default to bfloat16

* Add myself to contributors

* t5: Change convert.py default to float32
This commit is contained in:
Juarez Bochi
2023-12-19 16:44:36 -05:00
committed by GitHub
parent 62b455f801
commit ebbb7083cc
3 changed files with 16 additions and 5 deletions

View File

@@ -337,7 +337,7 @@ class Tokenizer:
self._tokenizer = T5Tokenizer.from_pretrained(
args.model,
legacy=False,
model_max_length=config.n_positions,
model_max_length=getattr(config, 'n_positions', 512)
)
@property
@@ -430,7 +430,7 @@ if __name__ == "__main__":
help="The model data type.",
type=str,
choices=["float16", "bfloat16", "float32"],
default="float32",
default="bfloat16",
)
parser.add_argument("--seed", type=int, default=0, help="The PRNG seed")